-
Notifications
You must be signed in to change notification settings - Fork 121
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 flake-utils dependency #1226
base: master
Are you sure you want to change the base?
Conversation
Diff is slightly easier to follow without white space (indentation needed adjusting since ) https://github.com/ocaml/ocaml-lsp/pull/1226/files?diff=split&w=1 |
@@ -1,23 +1,5 @@ | |||
{ | |||
"nodes": { | |||
"flake-utils": { |
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.
This would need to be added to all downstream users’ flake.lock
which is a pretty heavy price for a basic loop.
dune-rpc = osuper.dune-rpc.overrideAttrs fixPreBuild; | ||
stdune = osuper.stdune.overrideAttrs fixPreBuild; | ||
|
||
supportedSystems = [ |
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.
Not Nix’s defaults (theirs includes 32-bit Linux last I checked), but matches the default systems of flake-utils
so the change should have no effect on anyone.
let | ||
pkgs = import nixpkgs { overlays = [ overlay ]; inherit system; }; | ||
inherit (pkgs.ocamlPackages) buildDunePackage; | ||
fast = rec { |
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 think these are stubs to speed up the build? I moved them all to packages
since it doesn’t hurt while using less rec
s & temporary attrsets which slow down evaluation.
Pull Request Test Coverage Report for Build 4083
💛 - Coveralls |
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.
By inlining the for loop from the utility library, downstream consumers do not need to pull in any additional dependencies & bloat their flake.lock files.
flake-utils
adds a comparable number of lines toflake.lock
than any other flake. I don't understand why this is considered "bloating"flake.lock
is a generated file that most people don't inspect, apart from when the git diff changes
- the utility library doesn't provide just "a basic for loop", and this reductionism feels a bit disingenuous; rather, it attempts to settle on a common set of systems that flake-utils users can support, apart from abstracting away the nitty-gritty of specifying the correct structure for systems in flake.nix.
Personally, and subjectively, this PR also affects readability. What was once a single function call to eachDefaultSystem
now becomes 3 calls to forAllSystems
.
Adding 1 dependency is more than 0 dependency. Dependencies need to be audited & unless you remember to With utilities, we are also talking about a Currently at a physical Nix sprint in Thailand… & for an anecdote I asked, without pretense, a Numtide employee “thoughts on adding Numtide’s |
By inlining the for loop from the utility library, downstream consumers do not need to pull in any additional dependencies & bloat their flake.lock files. Some additional reorganizing due to inlining as well —with the net effect of more lines deleted than added.
27227d0
to
0db7167
Compare
By inlining the for loop from the utility library, downstream consumers do not need to pull in any additional dependencies & bloat their flake.lock files. Some additional reorganizing due to inlining as well—with the net effect of more lines deleted than added.