-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Do not attempt to write a lock file in builtins.getFlake #6544
Do not attempt to write a lock file in builtins.getFlake #6544
Conversation
I don’t think we can just do that, because that would break purity (since For the pure use-case, maybe the interface of |
This should be covered by the lines above: nix/src/libexpr/flake/flake.cc Lines 719 to 720 in 681fc3c
|
@ncfavier That only checks whether the flake reference is locked (e.g. |
Ah I should have looked better. The line you point to isn’t enough (it only checks whether the ref passed to |
Well, it’s all right, bit given how non-trivial it is, I think it’s definitely worth a test to ensure that it doesn’t get accidentally broken ;) The whole thing actually deserves some tests imho |
There seems to already be one: Lines 158 to 161 in 51d13c4
Can you think of other scenarios to test? |
681fc3c
to
169384a
Compare
Added a test for the case that this PR fixes |
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.
Added a test for the case that this PR fixes
Thanks :)
Can you think of other scenarios to test?
Nope, should be good since the impure case is already tested :)
Thanks for that then!
Fixes #6541