-
Notifications
You must be signed in to change notification settings - Fork 548
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
Do not export GOROOT for Go versions >= 1.9 #175
Conversation
Opened this up as a draft to get CI running as I'm a super n00b at ts/js. I wanted to test the current behavior (adding GOROOT) before removing it and updating the test. |
223510d
to
9735516
Compare
The actual fix commit I'll add afterwards is:
|
Gentle ping, @spark |
Pinging @bryanmacfarlane and @joshmgross because it seems the |
## Description Drop go from shell.nix (for now) and use the system's go binary. ## Why is this needed CI is currently breaking because of conflicting go versions. The better fix would be cutting over fully to nix in CI or reverting this commit once actions/setup-go#175 is merged and released. ## How Has This Been Tested? CI ## How are existing users impacted? What migration steps/scripts do we need? CI isn't broken and PRs can be merged.
607cfc7
to
3730c7e
Compare
Hi @joshmgross I've updated to address a merge conflict. It'd be really nice if someone could take a look here. |
👋 @mmlb could you take a look at the failing CI? It looks like we need to update |
Hey @joshmgross yep will fix. I remember now that I expected ci to fail for this reason, I couldn't figure out how to get tests running locally. |
Signed-off-by: Manuel Mendez <[email protected]>
3730c7e
to
24dcf77
Compare
@joshmgross updated! |
24dcf77
to
3f602c0
Compare
Thanks for the review to both of you. I'm not a ts/js dev so had no clue how to run/test this and was letting CI do, but using the |
It looks like CI is failing for validating It seems like we should still export GOROOT if go-version is < 1.9. |
This has not been necessary since [Go 1.9](https://go.dev/doc/go1.9#goroot) at least (although clunky to do so then) but definitely not since [Go 1.10](https://go.dev/doc/go1.10#goroot). This is cargo culting code that is more than 2 years out of date and runs into issues when multiple go versions are used in an action run. Signed-off-by: Manuel Mendez <[email protected]>
3f602c0
to
83124a1
Compare
I'd appreciate if you took over on that change. Side question: go1.8 is > 5years old, whats the policy for setup-go dropping versions? Is it "don't, unless really really necessary"? |
I don't know if we have an explicit policy at this point - we'd need more data to understand what versions users need in their workflows. |
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.
thanks for taking this up, just one small nit.
lgtm, for whatever thats worth :D |
Thanks @mmlb ! |
This is no longer exported as of [email protected]. See actions/setup-go#175.
This is no longer exported as of [email protected]. See actions/setup-go#175.
GOROOT was dropped by actions/setup-go#175. If it is not set then this test fails with: --- FAIL: TestGVMRunUse (5.45s) --- FAIL: TestGVMRunUse/1.7.4_bash (2.68s) use_test.go:54: export GOROOT="/home/runner/.gvm/versions/go1.7.4.linux.amd64" export PATH="/home/runner/.gvm/versions/go1.7.4.linux.amd64/bin:$PATH" use_test.go:79: failed to run go version: exit status 2 go: cannot find GOROOT directory: /usr/local/go
* Bump to Go 1.18 and update GH action versions * Prepend 'v' to golangci-lint version * Update to Go 1.18.5 on AppVeyor * Log stderr on test failure * Set GOROOT GOROOT was dropped by actions/setup-go#175. If it is not set then this test fails with: --- FAIL: TestGVMRunUse (5.45s) --- FAIL: TestGVMRunUse/1.7.4_bash (2.68s) use_test.go:54: export GOROOT="/home/runner/.gvm/versions/go1.7.4.linux.amd64" export PATH="/home/runner/.gvm/versions/go1.7.4.linux.amd64/bin:$PATH" use_test.go:79: failed to run go version: exit status 2 go: cannot find GOROOT directory: /usr/local/go
Description:
Do not export GOROOT. This has not been necessary since Go 1.9 at least (although clunky) but definitely not since Go 1.10. This is cargo culting code that is more than 2 years out of date and runs into issues when multiple go versions are used in an action run.
Related issue:
#107
Check list: