Repository navigation
buildBazelPackage: add "fetchConfigured" for fetching only things required for the build - #92302
Conversation
|
@ofborg build gvisor python35Packages.dm-sonnet bazel-watcher python35Packages.tensorflow-probability python35Packages.tensorflow python35Packages.tensorflow-build_2 |
|
@ofborg build gvisor python37Packages.dm-sonnet bazel-watcher python37Packages.tensorflow-probability python37Packages.tensorflow python37Packages.tensorflow-build_2 |
…uired for the build "bazel fetch" will, by default, fetch everything that _might_ be used, including things that will later be discarded due to the way the build is configured. Concretely, this means that for some builds of Java packages, this will avoid failures where the builder tries to retrieve the JDK from /usr/share/java (or equivalent). This also means that for most packages we can fetch _fewer_ dependencies, since the standard tree pruning for artifacts to fetch will take effect. fetchConfigured is disabled by default since it changes the fetch hashes of tensorflow/tensorflow2 (since it ends up fetching less).
|
This sounds really useful. I wonder if it should become the default? Currently, there's a lot of packages in nixpkgs removing stuff in their |
|
I wanted to make it the default, but I decided I didn't want to update the fetch hashes of everything in one go (e.g. Tensorflow's hash changes, and possibly some other things too) |
|
I meant, while flipping the default, also getting rid of the now obsolete "cleanup commands" in Happy to leave this as a follow-up, too, but I assume it'd clean up many footguns and do a great deal w.r.t. changing hashes. |
uri-canva
left a comment
There was a problem hiding this comment.
Sounds very good to me, also agree that the fetch should be removed once all the derivations are switched to use build --nobuild instead.
Motivation for this change
"bazel fetch" will, by default, fetch everything that might be used,
including things that will later be discarded due to the way the build
is configured.
Concretely, this means that for some builds of Java packages, this will
avoid failures where the builder tries to retrieve the JDK from /usr/share/java
(or equivalent).
Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)