You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be good if there were an option to use toolchain directive instead.
Justification:
The go directive is the minimum version of Go supported by a module. If it uses a newer version of Go for building, for example to support new language features in an optional way, it can define a toolchain directive. In this way, the toolchain directive is actually the Go supposed to be used for commands and seems appropriate for setup-go. Note that if using the go directive as current, the older version of Go will be prepared by setup-go, and the go command will then automatically download the version in toolchain and switch to it anyways. This is wasteful and in some situations such as go run can cause some errors.
Are you willing to submit a PR?
If we can decide on the approach, such as config property, and whether the new version could be made the default (IMO it can on a major version bump of setup-go), I can.
The text was updated successfully, but these errors were encountered:
Description:
Currently, mod files are parsed only for
go
directive.https://github.com/actions/setup-go/blob/main/src/installer.ts#L467
It would be good if there were an option to use
toolchain
directive instead.Justification:
The
go
directive is the minimum version of Go supported by a module. If it uses a newer version of Go for building, for example to support new language features in an optional way, it can define atoolchain
directive. In this way, thetoolchain
directive is actually the Go supposed to be used for commands and seems appropriate for setup-go. Note that if using thego
directive as current, the older version of Go will be prepared by setup-go, and the go command will then automatically download the version intoolchain
and switch to it anyways. This is wasteful and in some situations such asgo run
can cause some errors.Are you willing to submit a PR?
If we can decide on the approach, such as config property, and whether the new version could be made the default (IMO it can on a major version bump of setup-go), I can.
The text was updated successfully, but these errors were encountered: