Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[nix-local-build] new-run, new-test, new-bench, new-exec #3638
Summary by @ezyang. These should be easy to do, it's a copy-paste job of the existing run/test/bench code on top of invoking the new-build logic to build things.
These are very important quality-of-life features that make it impractical to use
Avoiding unnecessary work
This is a lot more important when working with metapackages, since we don't want to have to build every test suite in the metapackage in order to build one particular test. The way the
Easier argument passing for test and bench
referenced this issue
Jul 28, 2016
I spent a little time looking at how to implement
@ezyang I don't understand why it's so difficult. Isn't it just a matter of doing what new-build does for an exe target, ie making sure it's up-to-date, and then executing it?
Sure we have to check that the target the user has given does correspond to an exe. Not so hard. Then that gives us an elaborated plan that's up to date for the exe, and we can read off from that where the exe lives in the file system, then we just run it.
If a "no rebuild" mode is needed, then we just make sure the plan is up to date, read off the location of the executable from the elaborated plan, checking the exe exists, and do the same invocation.
And yes, the logic for invoking needs to be ported from
What am I missing?
So, this sounds like we're almost there? is the only thing left to do actually invoke the produced executable component now?
I should note that this syntax is ambiguous: does
IMHO, everything left of
To keep things simple (and avoid clever heuristics), this would imply that the use of
Some examples to clarify what I mean:
We can still support per-test-component flags via