-
-
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
Don't use read-only mode for nix build --dry-run #3782
Conversation
cc 94eb5fa, which does not mention the impact as including this but (untested) looks like maybe it was motivated by this sort of issue? Regardless maybe this can be fixed while visiting that logic, if it hasn't already been addressed? 😇 (if there are known issues in the way, please share as maybe someone can fix them ^_^) |
d5df933
to
2b7dc27
Compare
94eb5fa doesn't fix the issue, so I rebased on top of it and updated the patch. I'm guessing this is ready for review. |
@edolstra Would you be interested in merging that? It would enable a few workflows, including https://github.com/Mic92/nix-build-uncached for flakes. |
Note that the current version works fine if the repo doesn't use IFD. |
@zimbatm I'm not sure that's true. I have here a repo without IFD, and I still get the issue (because You can reproduce with |
I marked this as stale due to inactivity. → More info |
In dry run mode, new derivations can't be create, so running the command on anything that has not been evaluated before results in an error message of the form `don't know how to build these paths (may be caused by read-only store access)`. For comparison, the classical `nix-build --dry-run` doesn't use read-only mode. Closes NixOS#1795
Hey folks! I just rebased this PR on top of master. Reminder of what this PR doesSo, right now, running This PR changes the realisation mode for I believe it's good to change the behaviour of |
I think you can remove the |
Could we also introduce a new flag that never builds anything for those who want to preserve the current behaviour (if anyone does)? |
In case anybody needs a version compatible with the latest master: https://gist.github.com/Ma27/4337efe6be1e3858b0209ad1c9cbdcfe (cc @edolstra would be awesome if this could be merged, though) |
In dry run mode, new derivations can't be create, so running the command on anything that has not been evaluated before results in an error message of the form
don't know how to build these paths (may be caused by read-only store access)
.For comparison, the classical
nix-build --dry-run
doesn't use read-only mode.Closes #1795