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

fail if the current Go version is newer than what built garble #508

Merged
merged 1 commit into from
Mar 22, 2022

Conversation

mvdan
Copy link
Member

@mvdan mvdan commented Mar 21, 2022

(see commit message)

Fixes #269.

@mvdan mvdan requested review from capnspacehook, lu4p and pagran March 21, 2022 18:40
@mvdan mvdan force-pushed the goversion-built-check branch from afc1581 to 931454d Compare March 21, 2022 18:50
For instance, Go 1.18 added support for generics, so its compiler output
files changed format to accomodate for the new language feature.
If garble is built with Go 1.17 and then used to perform builds on Go
1.18, it will fail in a very confusing way, because garble's go/types
and go/importer packages will not know how to deal with that.

As already discussed in burrowers#269, require the version that built the garble
binary to be equal or newer. In that thread we discussed only comparing
the major version, so for example garble built on go1.18 could be used
on the toolchain go1.18.5. However, that could still fail in confusing
ways if a fix to go/types or go/importer happened in a point release.

While here, I noticed that we were still using Go 1.17 for some CI
checks. Fix that, except for staticcheck.

Fixes burrowers#269.
@mvdan mvdan force-pushed the goversion-built-check branch from 931454d to de2e14f Compare March 21, 2022 19:04
@lu4p lu4p merged commit ab39ee8 into burrowers:master Mar 22, 2022
@mvdan mvdan deleted the goversion-built-check branch March 22, 2022 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

require a compatible Go version to have built the garble binary
2 participants