-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
tests.haskell: prevent unnecessary rebuilds #320572
tests.haskell: prevent unnecessary rebuilds #320572
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems reasonable. Thanks
Hugh, I didn’t know this was a thing. Cool. |
This change breaks the resulting tests, namely the assumption tests. Revert at #321246. Serves to illustrate that a) all changes should be tested properly even if it appears that making them couldn't possibly break anything (I admit, in this case it is a little surprising, but ofborg correctly reports the other tests as changed!) and b) grepping for |
Sorry. but serious question: What's the correct workflow to catch this. I remember verifying that ofBorg built the tests correctly. Clearly that was not enough, as I didn't know there were more tests affected. My general stance was, that we will see build errors once they reach hydra, (which is a luxury we would have if we merge into haskell-updates, I should insist on that more)... |
Yeah, I'd love to learn. I thought I did my due diligence (see the tests listed). I see after investigation into the breadcrumbs you left in #321246 that the test is:
This test (along with others) were added in #174176 by @roberth. Specifically, what I'd like to learn is:
|
A non-essential property of the way Haskell derivations are put together. If the assumption is broken, that suggests that the test may need to be updated, specifically because the more relevant test
It turns off the implicit behavior that Nix will build the outputs of a
The test just treats
Both refer to the same thing. I just didn't communicate my intent. |
I've opened #322556, in case it helps. |
That explains it. Thanks, Robert. |
The generated file sets its own directory as the source, including the generated file itself, which causes rebuilds when that file is reformatted. We can avoid this by overriding the source with a filtered version and using that throughout the tests. See NixOS#320572 for more context
Description of changes
Prevent unnecessary rebuilds when Nix code is reformatted.
src = ./.
entries that unintentionally include their own.nix
files #301014Things done
nix-build -A tests.haskell.setBuildTarget
nix-build -A tests.haskell.cabalSdist.localFromCabalSdist