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

[20.03] golang backports #90217

Merged
merged 12 commits into from Jun 20, 2020
Merged

[20.03] golang backports #90217

merged 12 commits into from Jun 20, 2020

Conversation

zowoq
Copy link
Contributor

@zowoq zowoq commented Jun 13, 2020

Can we backport the buildGoModule changes (without the warning) so that we can use vendorSha256 on 20.03?

Updated to include buildGoModule vendorSha256.

The last two go (1.14.4 and test fix) commits are in staging staging-next, are they okay to backport or do they need to land in master first?

mmlb and others added 12 commits June 18, 2020 19:55
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
```

(cherry picked from commit a1e13f6)
a1e13f6

(cherry picked from commit 469f14c)
(cherry picked from commit 416caeb)
(cherry picked from commit d1e7b00)
The builder does not technically need the modSha256 of the vendor dir, and even
though we pass it the entire vendor dir it makes sense not to risk having an
accidental dependency on that variable.

However, tools like [nixpkgs-update](https://github.com/ryantm/nixpkgs-update)
need to inspect the `modSha256` of a package in order to be able to update them,
and since this is a real part of the package (describes info about its
dependencies) let's add it to `passthru`.

Specifically, this allows us to run a cmd like `nix eval -f . tflint.modSha256`
to get the current value, which is how the bot finds it to replace with the new
version in the Rust ecosystem.

(cherry picked from commit 5f77ff6)
This is done in response to complaints that the module format is not
human readable. The vendor source blob is flat files and should be
extremely readable.

(cherry picked from commit 9761128)
(removed warning for 20.03)
(cherry picked from commit a0ddea1)
@zowoq zowoq marked this pull request as ready for review June 18, 2020 09:59
@zowoq
Copy link
Contributor Author

zowoq commented Jun 18, 2020

@ofborg build go_1_13

@zowoq zowoq merged commit fea8c13 into NixOS:release-20.03 Jun 20, 2020
@zowoq zowoq deleted the golang branch June 20, 2020 11:47
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

5 participants