-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: go env GOMOD
tries to download newer toolchain
#61455
Comments
I suspect in the general case this is working as intended. The Go 1.22 language isn't finalized yet, and in theory Does it work well to do Edit: I see now that there's motivation to make a special exception for |
Yep, I suppose it's possible that we upgrade the toolchain via the |
Just got bitten by this thing - the installed Go version is go: downloading go1.22 (linux/amd64)
go: download go1.22 for linux/amd64: toolchain not available |
a workaround would be to |
@dmitris - I tried a fix for this with local installed go version correcting mod file. Screenshot was attached. There is one more scenario.. Do you consider is it worth to get rid of manual version update on go workspace with go developement project shared with other go modules when ever a bump happens say 1.22 to 1.23. For that , I am thinking of an approach is there a way to know - golang/go project do exist under workspace for respective go commands( advise user on that) and change to that version for workspace and correct other modules under that workspace if needed. |
* upgrade to go 1.22 * reference go.mod from root * attempt 2 * workaround for golang/go#61455
@matloob, @samthanawalla: this is a side-effect of the recent addition of toolchain-upgrade support. I think it will have a fairly straightforward fix. |
@bcmills - I already did a fix. Shall I CL that ? |
@dmitris I think the error you're getting will be fixed with #66175 @prattmic |
Yes, that was the original intention intended by this issue (Bryan suggested I file this issue). I don't personally feel strongly about the behavior, it is just a bit of an oddity given that cmd/go needs to find go.mod in order to upgrade in the first place. |
Change https://go.dev/cl/581275 mentions this issue: |
Since the go version is 1.22 instead 1.22.0 it affects the toolchain that is tried to be fetched. It cause IDEs, such as visual studio code to have broken indexing. golang/go#61455 (comment) Signed-off-by: Or Shoval <[email protected]>
If
go.mod
saysThen running
go env GOMOD
with 1.21 prints:This is a bit silly, as
go env
needs to determineGOMOD
in order to decide to upgrade in the first place.cc @bcmills
The text was updated successfully, but these errors were encountered: