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
Forbid drvPath in strictDerivation outputs attribute #10666
Conversation
builtins.strictDerivation returns an attribute set with drvPath and output paths. For some reason, current implementation forbids drv instead of drvPath.
I may be wrong, but I think this code is less about forbidding the name of an attribute, and more forbidding the name of an output (i.e. the Looks like (something like) this check (for the |
Thanks for pointing that out. Looks like the Lines 522 to 528 in d329c3e
Notice line 526. That is, back then, the resulting attribute set contained Lines 1447 to 1451 in 081faed
|
Maybe with dynamic derivations, |
@roberth, I don’t think this is making new rules. Currently, Nix returns an error for builtins.derivationStrict { outputs = [ "out" "drv" ]; name = "x"; system = "x"; builder = "x"; }
Presumably because it didn’t make sense when that check was added since the resulting attribute set contained builtins.derivationStrict { outputs = [ "out" "drvPath" ]; name = "x"; system = "x"; builder = "x"; } and returns
🤷 Perhaps we can remove the check with dynamic derivations, or a new builtin. That’s not the point of this PR though. |
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 to be the right behavior for now, for builtins.strictDerivation
.
I don't think we need to perpetuate this limitation, but that's of later concern.
Thank you for the improvement and enabling those test!
Motivation
builtins.strictDerivation returns an attribute set with drvPath and output paths. For some reason, current implementation forbids drv instead of drvPath.
Context
n/a
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.