Skip to content
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

Policy on how recent the go version in the go.mod file can be #638

Closed
josieang opened this issue Nov 3, 2023 · 4 comments · Fixed by #1156
Closed

Policy on how recent the go version in the go.mod file can be #638

josieang opened this issue Nov 3, 2023 · 4 comments · Fixed by #1156

Comments

@josieang
Copy link
Collaborator

josieang commented Nov 3, 2023

This point was brought up in In #637.

We might like to make a policy that osv-scanner will only use versions of Go, say at least two release behind. This will help consumers know how up-to-date their version of Go should be to be able to use this as a library and as a CLI tool.

@spencerschrock
Copy link
Contributor

Based on my understanding of this blog, this problem may get less severe in the future for those with default settings:
https://go.dev/doc/toolchain

The default GOTOOLCHAIN setting is auto

When GOTOOLCHAIN is set to +auto or +path (or the shorthands auto or path), the go command selects and runs a newer Go version as needed. Specifically, it consults the toolchain and go lines in the current workspace’s go.work file or, when there is no workspace, the main module’s go.mod file. If the go.work or go.mod file has a toolchain line and is newer than the default Go toolchain, then the go command runs instead. If the file has a toolchain default line, then the go command runs the default Go toolchain, disabling any attempt at updating beyond . Otherwise, if the file has a go line and is newer than the default Go toolchain, then the go command runs go instead.

Copy link

This issue has not had any activity for 60 days and will be automatically closed in two weeks

@github-actions github-actions bot added the stale The issue or PR is stale and pending automated closure label Jul 20, 2024
Copy link

github-actions bot commented Aug 3, 2024

Automatically closing stale issue

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2024
@another-rex
Copy link
Collaborator

This will be completed in #1156

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants