-
Notifications
You must be signed in to change notification settings - Fork 1k
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
gomod: go1.21 toolchain not available #7895
Comments
I guess I could change my |
This is a result of the changes in #7884. It's reproducible by running this in your repo: $ GOTOOLCHAIN="go1.20+auto" go version
go: downloading go1.21 (darwin/arm64)
go: download go1.21 for darwin/arm64: toolchain not available Per the docs, it seems like the Go tooling is trying to use
but
It seems like the right thing to do here is have Dependabot run with |
Is there something I can do on my side to fix this error ? |
@pierrre Dependabot should work correctly with a toolchain directive or update the go directive as you said above. So if you want a fix right away go ahead and do that. |
I was mistaken and It looks like someone has filed an issue upstream, lets see how this pans out before I make any more changes: golang/go#62278 |
In my projects I've updated |
what should we do? having |
https://go.dev/doc/modules/gomod-ref#go-syntax
|
oh I understand it's a minimum version, I mean, "minimum 1.21" and "minimum 1.21.0" is still a bit different. |
now that 1.21.1 is available, it's easier to explain myself. I meant, iinw (please let me know otherwise), if let's say or the other way around, if |
see golang/go#62278 and dependabot/dependabot-core#7895 for details
see golang/go#62278 and dependabot/dependabot-core#7895 for details
see golang/go#62278 and dependabot/dependabot-core#7895 for details
see golang/go#62278 and dependabot/dependabot-core#7895 for details
see golang/go#62278 and dependabot/dependabot-core#7895 for details
see golang/go#62278 and dependabot/dependabot-core#7895 for details
Will |
We're now setting GOTOOLCHAIN="local" in Ruby code to sidestep this issue. |
## Motivation `dependabot` has troubles parsing a `go.mod` file with `go 1.21` if it doesn't specify a patch version. (see dependabot/dependabot-core#7895). This PR fixes the issue. Summary from https://go.dev/doc/toolchain: The version in `go.mod` now specifies the **minimum** version of go that is required to build the module and **must include** a patch version. Additionally if the module or any of its dependencies require a newer version of go than the compiler the compiler will auto download the required `toolchain`, i.e. the compiler will essentially download the minimum required version of itself if it's older than the newest versions specified by the module or its dependencies. `go 1.21.0` instructs the compiler to use at least version 1.21.0 or any newer version (if specified by e.g. a dependency) when building the module. We do not need to update the patch version with every new release of go unless go-spacemesh is affected by a bug that was fixed in that release. `actions/setup-go` doesn't use the newest patch version with `check-version` when it is already specified. With the new behavior this is also not needed, as the `go build` command will automatically download the required toolchain if needed. In case we still want to automatically use the newest patch version to build our binaries we have to set `1.21` and `check-version=true` explicitly for `actions/setup-go`. ## Changes - specify a minor version in `go.mod` until `dependabot` is able to parse `go 1.21` - Update `ci.yml` to explicitly use the newest patch version of 1.21 when building go-spacemesh. ## Test Plan n/a ## TODO <!-- This section should be removed when all items are complete --> - [x] Explain motivation or link existing issue(s) - [x] Test changes and document test plan - [x] Update documentation as needed - [x] Update [changelog](../CHANGELOG.md) as needed
## Motivation `dependabot` has troubles parsing a `go.mod` file with `go 1.21` if it doesn't specify a patch version. (see dependabot/dependabot-core#7895). This PR fixes the issue. Summary from https://go.dev/doc/toolchain: The version in `go.mod` now specifies the **minimum** version of go that is required to build the module and **must include** a patch version. Additionally if the module or any of its dependencies require a newer version of go than the compiler the compiler will auto download the required `toolchain`, i.e. the compiler will essentially download the minimum required version of itself if it's older than the newest versions specified by the module or its dependencies. `go 1.21.0` instructs the compiler to use at least version 1.21.0 or any newer version (if specified by e.g. a dependency) when building the module. We do not need to update the patch version with every new release of go unless go-spacemesh is affected by a bug that was fixed in that release. `actions/setup-go` doesn't use the newest patch version with `check-version` when it is already specified. With the new behavior this is also not needed, as the `go build` command will automatically download the required toolchain if needed. In case we still want to automatically use the newest patch version to build our binaries we have to set `1.21` and `check-version=true` explicitly for `actions/setup-go`. ## Changes - specify a minor version in `go.mod` until `dependabot` is able to parse `go 1.21` - Update `ci.yml` to explicitly use the newest patch version of 1.21 when building go-spacemesh. ## Test Plan n/a ## TODO <!-- This section should be removed when all items are complete --> - [x] Explain motivation or link existing issue(s) - [x] Test changes and document test plan - [x] Update documentation as needed - [x] Update [changelog](../CHANGELOG.md) as needed
## Motivation `dependabot` has troubles parsing a `go.mod` file with `go 1.21` if it doesn't specify a patch version. (see dependabot/dependabot-core#7895). This PR fixes the issue. Summary from https://go.dev/doc/toolchain: The version in `go.mod` now specifies the **minimum** version of go that is required to build the module and **must include** a patch version. Additionally if the module or any of its dependencies require a newer version of go than the compiler the compiler will auto download the required `toolchain`, i.e. the compiler will essentially download the minimum required version of itself if it's older than the newest versions specified by the module or its dependencies. `go 1.21.0` instructs the compiler to use at least version 1.21.0 or any newer version (if specified by e.g. a dependency) when building the module. We do not need to update the patch version with every new release of go unless go-spacemesh is affected by a bug that was fixed in that release. `actions/setup-go` doesn't use the newest patch version with `check-version` when it is already specified. With the new behavior this is also not needed, as the `go build` command will automatically download the required toolchain if needed. In case we still want to automatically use the newest patch version to build our binaries we have to set `1.21` and `check-version=true` explicitly for `actions/setup-go`. ## Changes - specify a minor version in `go.mod` until `dependabot` is able to parse `go 1.21` - Update `ci.yml` to explicitly use the newest patch version of 1.21 when building go-spacemesh. ## Test Plan n/a ## TODO <!-- This section should be removed when all items are complete --> - [x] Explain motivation or link existing issue(s) - [x] Test changes and document test plan - [x] Update documentation as needed - [x] Update [changelog](../CHANGELOG.md) as needed
## Motivation `dependabot` has troubles parsing a `go.mod` file with `go 1.21` if it doesn't specify a patch version. (see dependabot/dependabot-core#7895). This PR fixes the issue. Summary from https://go.dev/doc/toolchain: The version in `go.mod` now specifies the **minimum** version of go that is required to build the module and **must include** a patch version. Additionally if the module or any of its dependencies require a newer version of go than the compiler the compiler will auto download the required `toolchain`, i.e. the compiler will essentially download the minimum required version of itself if it's older than the newest versions specified by the module or its dependencies. `go 1.21.0` instructs the compiler to use at least version 1.21.0 or any newer version (if specified by e.g. a dependency) when building the module. We do not need to update the patch version with every new release of go unless go-spacemesh is affected by a bug that was fixed in that release. `actions/setup-go` doesn't use the newest patch version with `check-version` when it is already specified. With the new behavior this is also not needed, as the `go build` command will automatically download the required toolchain if needed. In case we still want to automatically use the newest patch version to build our binaries we have to set `1.21` and `check-version=true` explicitly for `actions/setup-go`. ## Changes - specify a minor version in `go.mod` until `dependabot` is able to parse `go 1.21` - Update `ci.yml` to explicitly use the newest patch version of 1.21 when building go-spacemesh. ## Test Plan n/a ## TODO <!-- This section should be removed when all items are complete --> - [x] Explain motivation or link existing issue(s) - [x] Test changes and document test plan - [x] Update documentation as needed - [x] Update [changelog](../CHANGELOG.md) as needed
Dependabot no longer requires the patch version dependabot/dependabot-core#7895
Is there an existing issue for this?
Package ecosystem
gomod
Package manager version
No response
Language version
1.21
Manifest location and content before the Dependabot update
No response
dependabot.yml content
Updated dependency
No response
What you expected to see, versus what you actually saw
My
go.mod
contains this + some dependencies:Yesterday, dependabot was updating my dependencies without any issue.
Today it's failing with this error message (I didn't change anything on my side):
and logs
Native package manager behavior
It's updating dependencies without any issues.
It doesn't attempt to download a toolchain.
Images of the diff or a link to the PR, issue, or logs
No response
Smallest manifest that reproduces the issue
The text was updated successfully, but these errors were encountered: