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
cmd/go, x/mod: "invalid go version" message mentions old version format #61888
Comments
cc @bcmills |
What version of the |
just came across this, to update vscode go tooling:
or just to update golang language server: go install golang.org/x/tools/gopls@latest and you may Ctrl+Shift+P to |
Change https://go.dev/cl/527897 mentions this issue: |
For golang/go#61888 Change-Id: If4056623471edb6fd99d45dcd8a0751d6a54ce1c Reviewed-on: https://go-review.googlesource.com/c/mod/+/527897 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com> Reviewed-by: Bryan Mills <bcmills@google.com>
I just got this error message recently after I updated go. I updated gopls as well and that did not fix it. For now I've manually edited the version number to be |
I am also noticing this occurring in newly go version
go version go1.21.0 linux/amd64
gopls version
golang.org/x/tools/gopls v0.13.2
golang.org/x/tools/gopls@v0.13.2 h1:Pyvx6MKvatbX3zzZmdGiFRfQZl0ohPlt2sFxO/5j6Ro= |
I am also running into this. Similar setup to @optik-aper:
|
Possibly related to #63370? |
For me fixing version in go.mod and go.work to 1.21 didn't resolve the issue :( |
Hrm... should do this for all other modules in a workspace as well Is there currenlt no way to specify the version exactly, like 1.21.3? |
Works around golang/go#61888 Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
This is to workaround golang/go#61888 Signed-off-by: Stéphane Graber <stgraber@stgraber.org> Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
This is to workaround golang/go#61888 Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
This is to workaround golang/go#61888 Signed-off-by: Stéphane Graber <stgraber@stgraber.org> Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
This is to workaround golang/go#61888 Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
This is to workaround golang/go#61888 Signed-off-by: Stéphane Graber <stgraber@stgraber.org> Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
This is to workaround golang/go#61888 Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
This is to workaround golang/go#61888 Signed-off-by: Stéphane Graber <stgraber@stgraber.org> Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
Looks like this was partially fixed in 🤦♂️ |
Change https://go.dev/cl/560855 mentions this issue: |
Change https://go.dev/cl/560855 mentions this issue: |
Change https://go.dev/cl/560875 mentions this issue: |
For golang/go#61888 Tested: Ran go test ./modfile Change-Id: I254fe559f25ac643e842a935954d18744ae87b0b Reviewed-on: https://go-review.googlesource.com/c/mod/+/560875 Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Sam Thanawalla <samthanawalla@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
For #61888 Change-Id: I254fe559f25ac643e842a935954d18744ae87b0b Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest Reviewed-on: https://go-review.googlesource.com/c/go/+/560855 Reviewed-by: Bryan Mills <bcmills@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@golang.org>
I think this is fixed as of https://go.dev/cl/560855. |
For golang#61888 Change-Id: I254fe559f25ac643e842a935954d18744ae87b0b Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest Reviewed-on: https://go-review.googlesource.com/c/go/+/560855 Reviewed-by: Bryan Mills <bcmills@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@golang.org>
@bcmills can we backport this CL to 1.21 and 1.22? https://github.com/hashicorp/terraform using |
@maxmeng-hw, the only change for this issue was to an error message. That does not seem worth backporting, especially given that the changes are in the vendored |
When parsing an invalid
go
line in a go.mod, the error message saysbut that's not strictly true, it doesn't have to match the
1.23
format anymore.The text was updated successfully, but these errors were encountered: