Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortcuts for executables and tests #161

Closed
tfausak opened this issue Mar 9, 2017 · 2 comments
Closed

Shortcuts for executables and tests #161

tfausak opened this issue Mar 9, 2017 · 2 comments

Comments

@tfausak
Copy link
Collaborator

tfausak commented Mar 9, 2017

I think it would be nice to have shortcuts for defining executables and tests (and probably benchmarks too). Pretty much every package I define with executables and tests looks like this:

name: some-package
library: ...
executables:
  some-package: ...
tests:
  test: ...

That is, I have a single executable with the same name as the package and a single test suite with the name "test". I always wish it could be shortened to this:

name: some-package
library: ...
executable: ...
test: ...

The top level executable: x would be transformed into executables: { some-package: x }, and the test part would do the same.

Is there any interest in this feature?

@sol
Copy link
Owner

sol commented Mar 20, 2017

Hi! Sorry for the late reply. I'm on the fence with this one. I see how this is convenient but there are also costs / downsides:

  • more complex user documentation
  • what happens if both executable and executables is specified?
  • code complexity

That said, I see the biggest benefit for executable, as here we actually have duplicated information that we would like to DRY up (package name and executable name are the same, but we specify it twice).

For tests and benchmarks the benefit is less clear to me, as I see it we would mainly save one line in the package description.

Given this, I would be interested to see an implementation for executable first, before making a final call.

@tfausak
Copy link
Collaborator Author

tfausak commented Jun 7, 2017

Fixed by f405602 and fda6b8b. See also #177 and #178.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants