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

buildGoPackage: Dont copy sources to $out #43328

Merged
merged 2 commits into from Jul 11, 2018

Conversation

adisbladis
Copy link
Member

@adisbladis adisbladis commented Jul 11, 2018

Motivation for this change

I don't see the reason to copy sources that are potentially quite large, especially with the go community practices of vendoring dependencies.
Do these sources serve any purpose?

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

CCing maintainers & others who have touched this recently @pbogdan @Mic92 @yegortimoshenko @kamilchm @lethalman @cstrahan @orivej @velovix

@orivej
Copy link
Contributor

orivej commented Jul 11, 2018

I believe it was meant for Go packages to depend on each other, but this was never realized. I think it is good to remove sources from $out.

This should be checked with nox-review.

@adisbladis
Copy link
Member Author

@orivej As I suspected then. I'm running nox-review on this now.

@adisbladis adisbladis changed the title WIP: buildGoPackage: Dont copy sources to $out buildGoPackage: Dont copy sources to $out Jul 11, 2018
@adisbladis
Copy link
Member Author

adisbladis commented Jul 11, 2018

nox-review passes except for a few packages (gopherclient and goa) which were already broken since before.

Some sources are quite large and they don't seem to offer much value
buildGoPackage no longer copy sources to $out
@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: go-ethereum

Partial log (click to expand)

github.com/ethereum/go-ethereum/eth/downloader
github.com/ethereum/go-ethereum/internal/ethapi
github.com/ethereum/go-ethereum/miner
github.com/ethereum/go-ethereum/eth/tracers
github.com/ethereum/go-ethereum/eth
github.com/ethereum/go-ethereum/les
github.com/ethereum/go-ethereum/ethstats
github.com/ethereum/go-ethereum/cmd/faucet
builder for '/nix/store/kcvg0gjwzfj32ihbxqyw7bkix31s4j1k-go-ethereum-1.8.11.drv' failed with exit code 45
error: build of '/nix/store/kcvg0gjwzfj32ihbxqyw7bkix31s4j1k-go-ethereum-1.8.11.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: go-ethereum

Partial log (click to expand)

shrinking /nix/store/lzrir76gyihkax7hgncd86h9nk0baxid-go-ethereum-1.8.11-bin/bin/wnode
shrinking /nix/store/lzrir76gyihkax7hgncd86h9nk0baxid-go-ethereum-1.8.11-bin/bin/p2psim
shrinking /nix/store/lzrir76gyihkax7hgncd86h9nk0baxid-go-ethereum-1.8.11-bin/bin/bootnode
strip is /nix/store/4qvrxzxa535y8304mk195x50b6p9607d-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/lzrir76gyihkax7hgncd86h9nk0baxid-go-ethereum-1.8.11-bin/bin
patching script interpreter paths in /nix/store/lzrir76gyihkax7hgncd86h9nk0baxid-go-ethereum-1.8.11-bin
checking for references to /build in /nix/store/lzrir76gyihkax7hgncd86h9nk0baxid-go-ethereum-1.8.11-bin...
cannot find section .dynamic
strip is /nix/store/4qvrxzxa535y8304mk195x50b6p9607d-binutils-2.30/bin/strip
/nix/store/lzrir76gyihkax7hgncd86h9nk0baxid-go-ethereum-1.8.11-bin

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: go-ethereum

Partial log (click to expand)

find: '/nix/store/1k89f7k4g8grk2qrlyfh756c3485hqxf-go-ethereum-1.8.11': No such file or directory
find: '/nix/store/1k89f7k4g8grk2qrlyfh756c3485hqxf-go-ethereum-1.8.11': No such file or directory
find: '/nix/store/1k89f7k4g8grk2qrlyfh756c3485hqxf-go-ethereum-1.8.11': No such file or directory
find: '/nix/store/1k89f7k4g8grk2qrlyfh756c3485hqxf-go-ethereum-1.8.11': No such file or directory
find: '/nix/store/1k89f7k4g8grk2qrlyfh756c3485hqxf-go-ethereum-1.8.11': No such file or directory
find: '/nix/store/1k89f7k4g8grk2qrlyfh756c3485hqxf-go-ethereum-1.8.11': No such file or directory
find: '/nix/store/1k89f7k4g8grk2qrlyfh756c3485hqxf-go-ethereum-1.8.11': No such file or directory
find: '/nix/store/1k89f7k4g8grk2qrlyfh756c3485hqxf-go-ethereum-1.8.11': No such file or directory
find: '/nix/store/1k89f7k4g8grk2qrlyfh756c3485hqxf-go-ethereum-1.8.11': No such file or directory
/nix/store/jyl5f3j8q7cckq4d1xnf4jdg9196dyk3-go-ethereum-1.8.11-bin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants