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
go: Remove pkg/obj directory from the build outputs. #47260
Conversation
This appears to be causing the go package to be roughly 900MB in size.
@@ -178,6 +178,7 @@ stdenv.mkDerivation rec { | |||
|
|||
preFixup = '' | |||
rm -r $out/share/go/pkg/bootstrap | |||
rm -r $out/share/go/pkg/obj |
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.
But does not then everybody has to recompile the standardlibary on their own?
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.
So I'm pretty sure this is the object cache directory - the actual libraries end up in folders called $GOOS_$GOARCH and a tool and include folder. It's also not shipped by go in their download (https://golang.org/dl/). Oddly enough it also doesn't seem to be working since the folder is still present.
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.
Nevermind - I was confused. The obj folder is correctly deleted and running go install with the modified package doesn't appear to cause any standard library recompilation.
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.
For reference - the go release tool also deletes this directory.
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 mixed up the prefix, because the static archives where right below this.
@GrahamcOfBorg build docker |
Failure on x86_64-darwin (full log) Attempted: docker Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: docker Partial log (click to expand)
|
backport: 86406e2 |
Success on x86_64-linux (full log) Attempted: docker Partial log (click to expand)
|
Thanks for merging this :D |
Motivation for this change
This appears to be causing the go package to be roughly 900MB in size.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)