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

go: -lang=VER is passed to Go compiler even if VER is not supported by current version of compiler #14446

Closed
tdyas opened this issue Feb 11, 2022 · 1 comment · Fixed by #14457
Labels
backend: Go Go backend-related issues

Comments

@tdyas
Copy link
Contributor

tdyas commented Feb 11, 2022

One user of the Go backend encountered the following error from the Go compiler when using Go 1.16 and trying to compile a transitive dependency that called for Go 1.17 in its go.mod.

golang.org/x/net/internal/timeseries failed (exit code 1).
compile: invalid value "go1.17" for -lang: max known version is "go1.16"

This is a bug in how we implemented support for the -lang=VER option. Pants should not have passed -lang=go1.17 in this case. See https://github.com/golang/go/blob/30501bbef9fcfc9d53e611aaec4d20bb3cdb8ada/src/cmd/go/internal/work/gc.go#L97-L99.

@tdyas tdyas added the backend: Go Go backend-related issues label Feb 11, 2022
@tdyas
Copy link
Contributor Author

tdyas commented Feb 11, 2022

Eric-Arellano added a commit that referenced this issue Feb 11, 2022
We weren't following the spec properly. Closes #14446.

[ci skip-rust]
[ci skip-build-wheels]
Eric-Arellano added a commit to Eric-Arellano/pants that referenced this issue Feb 12, 2022
We weren't following the spec properly. Closes pantsbuild#14446.

[ci skip-rust]
[ci skip-build-wheels]
Eric-Arellano added a commit that referenced this issue Feb 12, 2022
…14457) (#14459)

We weren't following the spec properly. Closes #14446.

[ci skip-rust]
[ci skip-build-wheels]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: Go Go backend-related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant