Skip to content

Shortcuts for executables and tests #161

Closed

Description

@tfausak

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?

Activity

  1. sol commented on Mar 20, 2017

    @sol
    Owner

    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.

  2. added a commit that references this issue on Mar 31, 2017
  3. tfausak commented on Jun 7, 2017

    @tfausak
    CollaboratorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions