Repository navigation
treewide: fix rec-set-dynamic-attrs - #479126
Conversation
5ed5ee1 to
b88701a
Compare
b88701a to
ccd040d
Compare
Can you link to some documentation about this? |
|
https://gerrit.lix.systems/c/lix/+/4652/11 is the CL for this which contains documentation for the feature flag and release notes, but there will be announcements on the Lix blog as well in time |
|
I don't necessarily have a problem with the changes here, but has there been some discussion somewhere leading to a consensus that this should be enforced? The linked review seems to be WIP and has no discussion. I'd really like to see an example of the kind of counter-intuitive behaviour this can help avoid. |
|
The motivating incidents are NixOS/nix#14642 (comment) and NixOS/nix#11268 (comment)
Unlike other deprecations currently being worked on, the subtle language semantics here are not as big of an issue for typical programmers, apart from them maybe running into an unintuitive "variable not defined" error. But as these issues show, the implementation is complex, heavy on maintenance and brittle, elevating a minor grammar regression into a major soundness issue. |
|
| passthru = rec { | ||
| new = fstarNewZ3; | ||
| "z3_${lib.replaceStrings [ "." ] [ "_" ] fstarNewZ3.version}" = new; | ||
|
|
||
| old = fstarOldZ3; | ||
| "z3_${lib.replaceStrings [ "." ] [ "_" ] fstarOldZ3.version}" = old; | ||
| }; |
There was a problem hiding this comment.
Could just remove the rec and use the same value for both attributes.
There was a problem hiding this comment.
Yeah. I'd prefer we keep the passthru on this, since it is useful to expose these attributes
There was a problem hiding this comment.
Sorry, we were told they were not used, but yeah we can keep them.
There was a problem hiding this comment.
No worries. No, not used inside nixpkgs at least :)
ccd040d to
ab1ea48
Compare
Thanks! That's very interesting. The dotnet changes all look good to me. |
|
Is there any sort of plan to check/enforce this in nixpkgs? I just came across a case where I wanted to locally change an attribute to dynamic, and it occurred to me that it would be frustrating if I had to refactor a This might not be the place to discuss it, but none of the linked issues seem right. |
|
We already have parser tests https://github.com/NixOS/nixpkgs/blob/master/ci/parse.nix, so this will automatically apply when the changes are released in Lix. We may want to modify the check so that it also triggers on deprecation warnings and not only parse errors, but that should be fairly straightforward to do |
|
Are there any sort of standards for nixpkgs compatibility with Lix? I know there's usually an older version of Nix that it's meant to evaluate on. Assuming we do want to enforce this deprecation, how would we check for regressions? |
I must admit I had to check the timestamps of your message and of @piegamesde message right above. But it seems you were already aware of that message. That makes me confused. The message said: (I don't even know what to quote, it's the whole message talking exactly about this). What exactly are you asking? |
Sorry, I thought that was only tested on nix. I kept digging and found: That's what I was missing. I was just trying to find the place where we enforce that nixpkgs parses on Lix. |
Lix will soon warn, and in the future, error on `rec-set-dynamic-attrs`. This commit fix where attrs are dynamically set in a recursive function currently present in nixpkgs.
ab1ea48 to
a7b37ea
Compare
|
Successfully created backport PR for |
This is a backport of `NixOS#479126`. > Lix will soon warn, and in the future, error on `rec-set-dynamic-attrs`. > This commit fix where attrs are dynamically set in a recursive function > currently present in nixpkgs.
This is a backport of `NixOS#479126`. > Lix will soon warn, and in the future, error on `rec-set-dynamic-attrs`. > This commit fix where attrs are dynamically set in a recursive function > currently present in nixpkgs.
This is a backport of `NixOS#479126`. Not-cherry-picked-because: there was more packages to fix then in 25.11 and master. > Lix will soon warn, and in the future, error on `rec-set-dynamic-attrs`. > This commit fix where attrs are dynamically set in a recursive function > currently present in nixpkgs.
This is a backport of `NixOS#479126`. Not-cherry-picked-because: there was more packages to fix then in 25.11 and master. > Lix will soon warn, and in the future, error on `rec-set-dynamic-attrs`. > This commit fix where attrs are dynamically set in a recursive function > currently present in nixpkgs.
This is a backport of `NixOS#479126`. Not-cherry-picked-because: there was more packages to fix then in 25.11 and master. > Lix will soon warn, and in the future, error on `rec-set-dynamic-attrs`. > This commit fix where attrs are dynamically set in a recursive function > currently present in nixpkgs.
Same motivation for all of that as a7b37ea & NixOS#479126 (comment)
Same motivation for all of that as a7b37ea & NixOS#479126 (comment)
Lix will soon warn, and in the future, error on
rec-set-dynamic-attrs. This commit fix where attrs are dynamically set in a recursive function currently present in nixpkgs.@piegamesde
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.