-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
treewide: remove empty go vendor hashes #211962
Conversation
Guess we should actually fix this, I'll open a PR for it. Something like this should work? diff --git a/pkgs/build-support/go/module.nix b/pkgs/build-support/go/module.nix
index 647f2a2f7ad..e4ca029a891 100644
--- a/pkgs/build-support/go/module.nix
+++ b/pkgs/build-support/go/module.nix
@@ -129,6 +129,11 @@ let
mkdir -p vendor
+ if ! [ "$(ls -A vendor)" ]; then
+ echo "vendor folder is not needed, please set 'vendorHash = null;' or 'vendorSha256 = null;' in your expression"
+ exit 10
+ fi
+
runHook postBuild
'';
|
I think we should warn at the eval level instead of throwing a hard error |
Don't think that should be go specific, treewide check maybe?
We already do for other vendor cases so it would be consistent. |
that sounds like a cool idea, but I'm just not sure how this can be implemented without breaking things like
This could be our end goal we should definitely start with a warning before committing to a hard error |
As it's a FOD it's only going to error when the hash changes which seems fine? Don't see that we should let people re-add empty hashes? |
This is the case for nixpkgs, but there might be out of tree setups that don't actively cache that might be broken by this |
I wouldn't say uncached empty vendor hashes is a common enough problem that it matters, we can add a rel note and move on. Also it already has a warning from |
Logs barely show up for successful nix builds with the new cli without There was a brief conversation in the original pull request (#126682) and a nixpkgs-hammering lint was suggested (jtojnar/nixpkgs-hammering#116), though it has been a while since then and things could have changed, and the conversation was quite brief That said, feel free to open a new pr and receive more comments since I doubt many people would see this conversation in a merged pull request. I don't have a strong opinion on this, I just personally prefer to have eval warnings first instead |
Description of changes
see #126682
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes