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

Changes to the git package trigger to many rebuilds #205804

Closed
Atemu opened this issue Dec 12, 2022 · 3 comments
Closed

Changes to the git package trigger to many rebuilds #205804

Atemu opened this issue Dec 12, 2022 · 3 comments

Comments

@Atemu
Copy link
Member

Atemu commented Dec 12, 2022

Issue description

See i.e. #205682; 5000+ on Linux and Darwin.

Why?

@SuperSandro2000 pointed out one reason which is that nearly all rust packages depend on git via buildRustPackage:

nativeBuildInputs = nativeBuildInputs ++ [
cacert
git
cargoBuildHook
(if useNextest then cargoNextestHook else cargoCheckHook)
cargoInstallHook
cargoSetupHook
rustc
];

@Atemu
Copy link
Member Author

Atemu commented Dec 12, 2022

It was initially added by @madjar in 7d67efa but AFAICT it's not actually used? The fetcher obviously uses it but I don't see why the derivation needs it.

I was able to build fd, ripgrep and rav1e without git in nativeBuildInputs.

Atemu added a commit to Atemu/nixpkgs that referenced this issue Dec 12, 2022
Having git in nativeBuildInputs causes thousands of rebuilds when git is touched
because every derivation that somehow transiently depends on a rust package will
change. See NixOS#205682 for instance.

AFAICT git is unused. Only the fetcher needs git which it has already.

Fixes NixOS#205804
Atemu added a commit to Atemu/nixpkgs that referenced this issue Dec 13, 2022
Having git in nativeBuildInputs causes thousands of rebuilds when git is touched
because every derivation that somehow transiently depends on a rust package will
change. See NixOS#205682 for instance.

AFAICT git is unused. Only the fetcher needs git which it has already.

Fixes NixOS#205804
Atemu added a commit to Atemu/nixpkgs that referenced this issue Dec 14, 2022
Having git in nativeBuildInputs causes thousands of rebuilds when git is touched
because every derivation that somehow transiently depends on a rust package will
change. See NixOS#205682 for instance.

AFAICT git is unused. Only the fetcher needs git which it has already.

Fixes NixOS#205804
Atemu added a commit to Atemu/nixpkgs that referenced this issue Dec 15, 2022
Having git in nativeBuildInputs causes thousands of rebuilds when git is touched
because every derivation that somehow transiently depends on a rust package will
change. See NixOS#205682 for instance.

AFAICT git is unused. Only the fetcher needs git which it has already.

Fixes NixOS#205804
@SuperSandro2000
Copy link
Member

Should become a lot better with #207804

@Atemu
Copy link
Member Author

Atemu commented Jan 6, 2023

Great to have that in. We'll see the effect on the next git bump I hope.

@SuperSandro2000 SuperSandro2000 changed the title git causes a ton of rebuilds Changes to the git package trigger to many rebuilds Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants