-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
Tracking issue: remove with lib from meta #371862
Comments
What about using |
For these trivial cases where you use with to define a list it's fine. The problem is when you add basically a with with an attrset inside, or with nested structures (that's how I am modeling the lint rule until I can think on something better. BTW the chungus PR is not meant to be merged at once but be dismembered into small PRs that anyone can use the chungus to have a starting point and tweak possible issues. The chungus approach was much simpler to flow through the process. I can in one hour edit like thousands of files and use substitution (I copypasted substituteInPlace to my bashrc-like scheme) for some simple replacement scenarios. |
In my honest opinion I don't find this something worth nit-picking over. The common complaint against using I think the usage of |
Also such treewide changes always have the potential to cause eval issues and create merge conflicts. |
If I'm refactoring a derivation anyways, I typically remove such cases but I don't think this needs a treewide because it just simply doesn't cause any concrete issues. There's much more pressing issues that we should spend our time on. |
One of the main issues I see right now, that has been emphasized by the creation of #373573 and #373548, is that there are still more occurences of As mentioned here by other comments, the alternative to a treewide would be to resist the temptation to request a removal of |
The ratchet check I am introducing into nixpkgs-vet would already let the user know if new occurences of a open ended with is introduced, so in a init scenario it would already fail CI. For existing packages it would be green, like how it's happening with pkgs/by-name. This, as discussed in nixpkgs architecture, is already the expected behaviour so it seems the check is ready. |
Tracking description
Remove with lib from meta sections is a common nitpick that comes into reviews.
with
is a useful feature but it's overuse can often some silent eval issues that otherwise would be mostly caught with static analysis.While experimenting with removing it treewide retroactively, I created #371665 which is too big to merged in one go so this issue was created to track the dismembering of that big PR into smaller human reviewable PRs.
The whole effort can be separated in the following stages:
Reference Issue(s)/PR(s)
Follow-up issues/notes
Additional context
Add any other context about the problem here.
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: