-
-
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
'nix build --dry-run' fails on new derivations, acts like readOnlyMode #1795
Comments
I haven't looked at diff, but I could see the temptation to reduce use less fewer privileges in a dry-run case. Agreed with @dtzWill this destroys one of the primary use-cases of |
Beep boop!
|
was hit by this as well! |
I looked into why it was behaving that way, and it looks like the https://github.com/NixOS/nix/blob/master/src/nix/installables.cc#L253-L254 If that's not the desired behaviour, then removing these two lines should be enough. It looks like no other command is calling that function, so it should not have any side-effect. |
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
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
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
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
I think I ran into this problem too. I was using
After that, even if I tried without
|
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
Could the dry-run flag be split into a completely dry run (--arid-run?) and a dry run that still instantiates perhaps? |
That would be especially nice if |
Using nixpkgs master (shouldn't matter which, but):
Using
nix build --dry-run
on an installable we don't have a.drv
file for, fails:Which honestly is an error I've only seen when doing unusual things previously.
nix-build
on the same works as expected:And since it instantiates the
.drv
file,nix build
works again:This is breaks one of my primary uses for
--dry-build
: using it after modifying expressions to see what the fallout is. Anyway I don't think it's quite the intention of--dry-run
anyway.FWIW this seems to have been introduced in c36467a#diff-fc4f446fc21b1365be7f6339ceb8efe8L232 although I'm not sure why, haven't looked too closely.
The text was updated successfully, but these errors were encountered: