Skip to content

Fall back to Go 1.26 with a warning when the version file is missing - #33

Merged
sverdlov93 merged 1 commit into
mainfrom
bugfix/go-cache-without-gomod
Sep 6, 2026
Merged

Fall back to Go 1.26 with a warning when the version file is missing#33
sverdlov93 merged 1 commit into
mainfrom
bugfix/go-cache-without-gomod

Conversation

@sverdlov93

@sverdlov93 sverdlov93 commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Problem

Since #28 this action defaults to go-version-file: go.mod instead of a concrete go-version. actions/setup-go treats a missing version file as fatal, so callers that do not pass go-version and do not have the file in the workspace die on the first step.

Change

When go-version is not set and go-version-file does not exist, install Go 1.26 and warn. Nothing else changes: an existing version file is still read, and an explicit go-version still wins.

1.26 is the previous supported major (current is 1.27). A census of the 19 public jfrog/* callers shows flagship CLIs already on 1.26.x; older modules (1.22–1.25) never hit this path because they have a go.mod.

Warning: The configured go-version-file does not exist in the workspace, so Go 1.26 is installed instead.
Run actions/checkout before this action, or pass go-version explicitly to silence this warning.

Resolution table

go-version version file setup-go receives Warning
1.24 any go-version=1.24 no
exists go-version-file=<path> no
missing go-version=1.26 yes

@sverdlov93 sverdlov93 changed the title Fall back to Go 1.25 when go.mod is missing Add resolution tests for install-go-with-cache Sep 6, 2026
@sverdlov93
sverdlov93 force-pushed the bugfix/go-cache-without-gomod branch from c63423d to 14c8d13 Compare September 6, 2026 14:08
@sverdlov93 sverdlov93 changed the title Add resolution tests for install-go-with-cache Warn when the Go version file is missing Sep 6, 2026
@sverdlov93
sverdlov93 force-pushed the bugfix/go-cache-without-gomod branch from 14c8d13 to 6a371d5 Compare September 6, 2026 14:24
@sverdlov93 sverdlov93 changed the title Warn when the Go version file is missing Fall back to Go 1.25 with a warning when the version file is missing Sep 6, 2026
@sverdlov93
sverdlov93 force-pushed the bugfix/go-cache-without-gomod branch from 6a371d5 to 6e1d7de Compare September 6, 2026 14:34
@sverdlov93 sverdlov93 changed the title Fall back to Go 1.25 with a warning when the version file is missing Fall back to Go 1.26 with a warning when the version file is missing Sep 6, 2026
@sverdlov93
sverdlov93 force-pushed the bugfix/go-cache-without-gomod branch from 6e1d7de to bfd7bd3 Compare September 6, 2026 14:39
@sverdlov93
sverdlov93 merged commit 4e59ec4 into main Sep 6, 2026
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 this pull request may close these issues.

1 participant