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

flake: remove redundant transitive dependencies #1986

Merged
merged 4 commits into from
Jul 4, 2024
Merged

flake: remove redundant transitive dependencies #1986

merged 4 commits into from
Jul 4, 2024

Conversation

jeremyschlatter
Copy link
Contributor

@jeremyschlatter jeremyschlatter commented Jul 4, 2024

I added the github:tweag/nickel flake to a project today and noticed that it pulled in a bunch of redundant transitive dependencies. This commit cleans those up. The impact is visible in the lock file, which now has 13 fewer nodes:

nickel on master fsh ❯ python -c 'import json; print(len(json.load(open("flake.lock"))["nodes"]))'
29
nickel on flake-inputs fsh ❯ python -c 'import json; print(len(json.load(open("flake.lock"))["nodes"]))'
16

Things done:

  • added several more follows relationships for de-duplication

  • updated to latest rust-overlay flake which drops flake-utils dependency

  • set follows = "" for a few unused dependencies. See null flake input NixOS/nix#7807.

- add several more `follows` relationships for de-duplication

- update to latest rust-overlay flake which drops flake-utils dependency

- set `follows = ""` for a few unused dependencies.
    See NixOS/nix#7807
Copy link
Member

@yannham yannham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, it does trim the flake.lock quite a bit.

What do you think about NixOS/nix#7807 (comment), related to follows = ""? I'm a bit reluctant with those kind of hacks, because if somebody else has to handle a CI breakage (say, upon a flake.lock update) and don't know about it, it can turn out to be painful.

@jeremyschlatter
Copy link
Contributor Author

I was conflicted about it. I think it's quite reasonable to not use follows = "" for that reason. I pushed a commit that removes it. You can see the diff here: 43125b5

@yannham
Copy link
Member

yannham commented Jul 4, 2024

@jeremyschlatter Thanks. I believe there's still one empty follows for the flake-compat input of pre-commit-hooks.

@jeremyschlatter
Copy link
Contributor Author

@yannham Whoops, thanks for catching that. Fixed.

@yannham
Copy link
Member

yannham commented Jul 4, 2024

I'm taking over here. There are unrelated clippy failures (this change induced a flake.lock update, and the rustc version was bumped, which made clippy more restrictive), and some of them (e.g. the transmute) aren't trivial to fix.

@yannham yannham added this pull request to the merge queue Jul 4, 2024
Merged via the queue into tweag:master with commit 6b1fe61 Jul 4, 2024
4 checks passed
@jeremyschlatter jeremyschlatter deleted the flake-inputs branch July 12, 2024 20:03
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

Successfully merging this pull request may close these issues.

2 participants