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
treewide: remove stdenv where not needed #110687
Conversation
How do we verify that we did not remove it accidentally from plugins that are not evaluated by ofborg like we did with the lib migration around 5 times or so? |
f3a47dd
to
ce2873c
Compare
I use the following sanity checks locally:
Any other suggestions welcome! |
Those files are not checked by that. It would require some changes to eval them. Those are the files that where affected by the stdenv.lib -> lib change and got a fix: f4d0aad I have no idea how to prevent that. |
ce2873c
to
72ce9b7
Compare
Could you elaborate how you performed the transformation? What scripts did you run? |
I used ripgrep to see how many times the word "stdenv" is mentioned in each nix file and filtered out the files which have
This found around 3000 files. Some of them were false positives, because they had something like the following:
These were easy to filter out via grep for Then I used sed to remove occurrences of |
8ea9bd8
to
d06e3ba
Compare
@prusnak please resolve the merge conflicts. |
d06e3ba
to
2d1ee21
Compare
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.
I appreciate the effort but I am affraid that we break plugins again
It seems unlikely to break plugins this time because the change is being performed on files with only one occurrence of |
This sounds like a simple enough change; I wonder if we could use hnix to do a full “unused variable” pass in the future. |
2d1ee21
to
62a8a1a
Compare
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.
LGTM
assuming ofborg passes
The CI is green again (modulo EditorConfig check) - I need to rebase the PR couple of times a day to catch up with other changes, that's why ofborg is sometimes processing |
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.
Diff looks legit
Scrolled trough output from git diff --word-diff HEAD^.. | sort -u | grep -E '(\[-|{\+)'
62a8a1a
to
a6ce00c
Compare
Fix fallout of NixOS#110687 (generic.nix requires stdenv).
This is incorrect. If you have something like { foo, bar, baz, stdenv, ...}@args:
import ./quux.nix args {
# stdenv is not used
} and This PR broke |
Motivation for this change
stdenv.lib
withlib
we ended up with almost 3000 files wherestdenv
is mentioned, but actually not used/needed.Error: Argument list too long
- it's OK to ignore I guessThings done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)