.github/workflows/nix-parse-v2: also check parseability with Nix 2.3#398122
.github/workflows/nix-parse-v2: also check parseability with Nix 2.3#398122sternenseemann wants to merge 1 commit intoNixOS:masterfrom
Conversation
4243ff5 to
c6b4486
Compare
d7104d9 to
3132149
Compare
90% of eval issues affecting Nix < 2.4 (which is supported as per lib/minver.nix) are actually already detected at parse time since they involve use of path interpolation / path antiquotations added in Nix 2.4 (https://nix.dev/manual/nix/2.28/release-notes/rl-2.4). This means that we can cheaply (compared to a full eval) prevent a lot of eval issues with the minimum supported version of Nix from ever reaching channels.
d93e2a9 to
1b89848
Compare
|
See https://github.com/sternenseemann/nixpkgs/actions/runs/14419515028?pr=2 for an example run. |
wolfgangwalther
left a comment
There was a problem hiding this comment.
See https://github.com/sternenseemann/nixpkgs/actions/runs/14419515028?pr=2 for an example run.
Since this only runs on changed files, but the test PR didn't have any, I think this only tested the install.
Are we sure that currently all files on master parse with nix 2.3, so that CI doesn't start failing for unrelated changes?
since #398119 yes. |
It had one changed file at the time of the run. |
|
Can we easily give feedback to contributers why eval is failing in the CI but not for them locally? |
I think it's good enough, i.e. it'll tell users about the Nix version that is failing. In any case a slightly confusing error message is better than silently breaking channels. It's unnecessary imo to block this on investing a ton of time into making this a little clearer by parsing the error output or whatever. (As a side note, if someone is looking for a “fun” project, they could try adding github actions annotations so that eval errors from CI show up in the diff viewer in the PR view.) |
|
Feels a bit uneasy to have a Nix version that not longer receives security updates running in |
Agreed. We could maybe rewrite the job in a way that uses latest nix on the outside, and then runs nix 2.3 in the nix sandbox itself. This would also be a tiny step towards a future, where I could just do something like |
|
Superseded by #404466, where I implemented the parse check inside the nix sandbox, thus allowing to run nix 2.3 (and lix) securely. |
90% of eval issues affecting Nix < 2.4 (which is supported as per lib/minver.nix) are actually already detected at parse time since they involve use of path interpolation / path antiquotations added in Nix 2.4 (https://nix.dev/manual/nix/2.28/release-notes/rl-2.4).
This means that we can cheaply (compared to a full eval) prevent a lot of eval issues with the minimum supported version of Nix from ever reaching channels.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.