Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: "only supported as of -lang=go1.13" error is misleading #33753
$ go version go version devel +8b058cfbce Sun Aug 11 15:44:08 2019 +0000 linux/amd64
When I compile some Go code that uses binary literals and has an old (go1.12) Go version declaration in its
This makes it sound like I need to enable go1.13 support by passing a
I should have been clearer in my comment. I assume that this is the compiler giving the error (hence the
For example, this could be done by detecting the error. I realise that's hacky, but I assume that the Go tool already does that elsewhere.
Not mentioning either
I'm in favor of @cherrymui's suggestion with respect to the compiler error. But perhaps it could say:
This is short, makes it clear what minimum version is needed, and provides clear information as to what caused this (the current setting of -lang) without speculating what needs to be done.
…e version errors Fixes #33761. Updates #33753. Updates #31747. Change-Id: Icc42b23405ead4f7f17b0ffa3611405454b6b271 Reviewed-on: https://go-review.googlesource.com/c/go/+/198491 Run-TryBot: Robert Griesemer <firstname.lastname@example.org> TryBot-Result: Gobot Gobot <email@example.com> Reviewed-by: Ian Lance Taylor <firstname.lastname@example.org> (cherry picked from commit 27fc32f) Reviewed-on: https://go-review.googlesource.com/c/go/+/201480 Reviewed-by: Emmanuel Odeke <email@example.com>