Skip to content

go.mod: do not make a viral minimum go version#2237

Merged
Subserial merged 2 commits intogoogle:mainfrom
howardjohn:mod/drop-required-go-version
Mar 24, 2026
Merged

go.mod: do not make a viral minimum go version#2237
Subserial merged 2 commits intogoogle:mainfrom
howardjohn:mod/drop-required-go-version

Conversation

@howardjohn
Copy link
Copy Markdown
Contributor

@howardjohn howardjohn commented Mar 20, 2026

go version is the minimum possible go version that you can compile the package with. This is viral; all importers inherint the version.

This package does NOT need 1.25.7 to build, and should not require such a version.

also noted here #2211 (comment)

`go` version is the minimum possible go version that you can compile the
package with. This is viral; all importers inherint the version.

This package does NOT need 1.25.7 to build, and should not require such
a version.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.74%. Comparing base (8b3c303) to head (646eac4).
⚠️ Report is 75 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (8b3c303) and HEAD (646eac4). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (8b3c303) HEAD (646eac4)
2 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2237       +/-   ##
===========================================
- Coverage   71.67%   52.74%   -18.94%     
===========================================
  Files         123      164       +41     
  Lines        9935    11113     +1178     
===========================================
- Hits         7121     5861     -1260     
- Misses       2115     4546     +2431     
- Partials      699      706        +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Subserial
Copy link
Copy Markdown
Contributor

Hey, thanks for this. I missed the comment on the other commit, too. I wasn't aware of how golang did dependency resolution. Is there a reason specifying "1.25.0" is better than "1.25" in this case?

The presubmit is hitched on the other go.mod files having a later version. Changing those to match the root go.mod should fix this.

@yhlee-tw
Copy link
Copy Markdown

Is there a reason specifying "1.25.0" is better than "1.25" in this case?

  1. 1.25 accepts pre-release (1.25rcX), where 1.25.0 more explicitly calls out official releases.
  2. golang/x/* use 1.(N-1).0 in their latest release

ref: https://go.googlesource.com/proposal/+/HEAD/design/69095-x-repo-continuous-go.md#why-1_n_1_0

@Subserial Subserial merged commit bf0f710 into google:main Mar 24, 2026
17 checks passed
@thaJeztah
Copy link
Copy Markdown
Contributor

Ah, thanks! I went hunting "which module was responsible this this time?" but found it was already fixed (but not yet released).

@thaJeztah
Copy link
Copy Markdown
Contributor

I just noticed that GitHub actions was configured to use go.mod as version-file, and Go Setup Action (sigh!) treats that as a literal 1.25.0, so downgraded CI to 1.25.0 😞

Opened a pull-request to fix that;

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.

5 participants