-
Notifications
You must be signed in to change notification settings - Fork 240
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
always clean the source, no matter what #1403
Conversation
I think this was all introduced in #209 and mostly hasn't been touched much since. So the reasoning may be lost to time unless Hamish remembers... |
If I modify |
bors try |
tryBuild failed: |
This is failing with:
Keep in mind that canCleanSource is based on the Nixpkgs version here. |
It is probably possible to modify the source filtering to not run into this problem. |
The thing I was worried about is that neither Haskell.nix cleanSourceWIth nor the Nixpkgs one actually do anything meaningful if the source is in the store. Both rely on the For instance if I run:
I might expect to get an empty result, but instead it just returns the |
I think there is nothing to worry about. This just seems to be weird behavior of
You can filter in any arbitrary imaginable way. It doesn't matter. As long as you do filter. What is important is that you pass the result through builtins.path while assigning a name. Luckily I'm happy to experiment with this, but I need a example to reproduce the error. So far I could not. |
Error is in buildkite for the bors I think it is running something like:
|
The issue with The specific issue you're running into has been fixed in nix here: The current upstream hydra has this fix included, though the I now updated Please have a look again if your tests succeed. |
bors try |
🔒 Permission denied Existing reviewers: click here to make DavHau a reviewer |
bors try |
tryBuild succeeded: |
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 is missing a couple of things:
- A comment explaining the hydra overlay, which I guarantee will confuse people in the future.
- An audit of the other uses of
canCleanSource
- we should get rid of them also, presumably, and delete the function.
I can have a look at this and make another PR. |
Thank you :) I'm being fussy, but Nix code is hard to maintain without a certian amount of fussiness 😱 |
I believe this might now be causing us to run into this error:
Edit: I can confirm reverting just this commit fixes the problem 😞 |
This reverts commit 1ca9932.
Indeed, I also wasn't clear on the import of this hydra comments. Does this mean that |
In recent nix, builtins.path works in restricted eval mode. Therefore canCleanSource is not required anymore. follow up on input-output-hk#1403
Yes, any hydra build against nix prior to 2.4 will fail during evaluation, as it won't contain the fixes in nix required for What we could do is to modify Therefore maybe source cleaning should be a setting of haskell.nix which can only be turned off manually by the user via some flag. That makes sure that users/machines with different nix versions never build different derivations. |
Do we know the exact nix version range required? Can we check for it and abort with a warning that nix >= x.y.z is required for Haskell.nix? |
Yes, the oldest nix stable release which doesn't have the error is
Done in #1409 |
This reverts commit 1ca9932.
This reverts commit 1ca9932.
Revert "always clean the source, no matter what (input-output-hk#1403)"
This change might remove the need for materialization.
I can now edit unrelated files in my project without the
haskell-project-pla-to-nix-pkgs
derivation being re-built all the time.I haven't understood all the complexity of
clean-source-with.nix
yet, therefore I'm not sure if this change can possibly introduce breakages elsewhere.I'm happy to make changes according to your suggestions.