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: stop setting GOPATH #87758
Closed
Closed
go: stop setting GOPATH #87758
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The compiler does not need it anymore, has not needed it for many years iirc. This just goes in and pollutes the environment overriding the users GOPATH and causing grief. Go even warns about it itself, without vs with this commit: ```sh ~> go env GOPATH /home/manny/go ~> nix-shell -p go ~> go env GOPATH warning: GOPATH set to GOROOT (/nix/store/gvw1mfpdrk7i82884yhxf9lf5j3c12zm-go-1.14.1/share/go) has no effect /nix/store/gvw1mfpdrk7i82884yhxf9lf5j3c12zm-go-1.14.1/share/go ~> exit ~> nix-shell -I nixpkgs=cloned/NixOS/nixpkgs -p go ~> go env GOPATH /home/manny/go ~> exit ```
rvolosatovs
approved these changes
May 13, 2020
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/what-do-you-do-with-gopath/7113/4 |
Yeah that was only useful in the early days of go. |
Frostman
approved these changes
May 13, 2020
ofborg
bot
removed
6.topic: python
6.topic: qt/kde
8.has: changelog
8.has: documentation
labels
May 13, 2020
cherry-picked in 399572ed5aeeba21a0df8719c63d6fc5b6e884c3 |
Now it is: a1e13f6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
The compiler does not need it anymore, has not needed it for many years
iirc. This just goes in and pollutes the environment overriding the users
GOPATH and causing grief.
Go even warns about it itself, without vs with this commit:
https://discourse.nixos.org/t/what-do-you-do-with-gopath/7113
Things done
Removed setup-hook.sh which was only being used to add GOPATH to the env.
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)cc @cstrahan @orivej @Mic92 @rvolosatovs @kalbasit @Frostman