Parse allowed* = null properly in structuredAttrs #14750
Parse allowed* = null properly in structuredAttrs #14750Ericson2314 wants to merge 3 commits intomasterfrom
allowed* = null properly in structuredAttrs #14750Conversation
|
This seems like a breaking change? `null' was never allowed. |
src/libstore/derivation-options.cc
Outdated
| storePaths.insert(parseSingleDerivedPath(s)); | ||
| ret.insert_or_assign(key, std::move(storePaths)); | ||
| if (auto * e = get(parsed->structuredAttrs, "exportReferencesGraph")) { | ||
| for (auto & [key, storePathsJson] : getObject(*e)) { |
There was a problem hiding this comment.
This will fail if it's not an object. That's not what the code above used to do.
There was a problem hiding this comment.
OK sure we can put that back, this is the only breaking change of that nature?
|
This isn't a regression. I don't see why this needs to change. |
|
Looking at this discussion, I'm realising this should really be fixed in
But I think the bottom line is that With regard to (1), I will see if this can be backported, but I don't think it's a recent regression, so we might have to think of something else. |
|
To be clear, this might be a worthwhile change to make to Nix as well, but it is a breaking change, so we should discuss it more thoroughly. Thanks for looking into it @Ericson2314 💜 |
|
@Radvendii to be clear, I think there is still a good chance that I am fixing an accidental breaking change from a much older version of Nix. |
When did this first break? I think I've tested 2.4 and it also disallowed nulls. |
This is the explicit way to indicate that there is no allow list.
af61b92 to
691c28d
Compare
|
I've checked the code and the issue has existed since 2.3 at the very least, so we are better off testing current behavior and being done with this. I don't see how changing the semantics of the store layer isn't a rat's nest. We simply must preserve it at all costs when it comes to subtle behavioural differences. |
|
Yeah sounds good. We can devise some sort opt-in at a later point if we want to. |
Motivation
This is the explicit way to indicate that there is no allow list.
Context
Should help with failures in #14688 CC @Radvendii
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.