Skip to content
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 all src = ./. entries that unintentionally include their own .nix files #301014

Open
14 of 39 tasks
philiptaron opened this issue Apr 2, 2024 · 4 comments
Open
14 of 39 tasks
Labels
3.skill: good-first-bug 3.skill: sprintable 5. scope: tracking Long-lived issue tracking long-term fixes or multiple sub-problems architecture Relating to code and API architecture of Nixpkgs

Comments

@philiptaron
Copy link
Contributor

philiptaron commented Apr 2, 2024

Issue description

Derivations that use src = ./. will be rebuilt on any change to the .nix file that includes them, including formatting changes caused by nixfmt-rfc-style for RFC 166.

List of files where this may be the case

Generated with rg -F 'src = ./.' --sort=path -l -tnix and not very thoroughly audited. Unchecked entries need work or attention.

@philiptaron philiptaron added architecture Relating to code and API architecture of Nixpkgs 3.skill: sprintable labels Apr 2, 2024
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/call-for-testing-nix-formatter/39179/21

@oliviacrain
Copy link
Contributor

oliviacrain commented Apr 3, 2024

Did a quick check for false positives, found four:

Uses lib.cleanSourceWith to filter out default.nix

pkgs/build-support/node/fetch-npm-deps/default.nix
maintainers/scripts/convert-to-import-cargo-lock/default.nix
pkgs/misc/documentation-highlighter/default.nix

Found src = ./. in a comment

pkgs/build-support/release/default.nix

@philiptaron
Copy link
Contributor Author

Thanks! I updated the listing to check those off.

@infinisil
Copy link
Member

Note that we can use the new lib.fileset library (tutorial) to fix this now!

@philiptaron philiptaron changed the title Remove all src = ./. entries that unintentionally include their own .nix files [Tracking issue] remove all src = ./. entries that unintentionally include their own .nix files Apr 22, 2024
@samueldr samueldr added the 5. scope: tracking Long-lived issue tracking long-term fixes or multiple sub-problems label Apr 23, 2024
@pluiedev pluiedev mentioned this issue May 21, 2024
13 tasks
pyrox0 added a commit to pyrox0/nixpkgs that referenced this issue May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.skill: good-first-bug 3.skill: sprintable 5. scope: tracking Long-lived issue tracking long-term fixes or multiple sub-problems architecture Relating to code and API architecture of Nixpkgs
Projects
Status: Todo
Development

No branches or pull requests

5 participants