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

🌱 bump project minimum Go version to go1.21 #3661

Merged
merged 7 commits into from
Nov 13, 2023

Conversation

spencerschrock
Copy link
Contributor

@spencerschrock spencerschrock commented Nov 10, 2023

What kind of change does this PR introduce?

go version bump + minor cleanup

What is the current behavior?

go 1.19 is the minimum version required for anyone looking to compile/import Scorecard.
note: our tooling/docker already uses go1.21 for our toolchain

What is the new behavior (if this is a feature change)?**

go 1.21 is the minimum version to add Scorecard as a dependency. This lets us make some refactoring changes:

  • Tests for the changes have been added (for bug fixes/features)

Which issue(s) this PR fixes

Part of #3418, but doesn't entirely fix it. The sync. OnceValues stuff will be a larger change so I didn't include it here.

Special notes for your reviewer

Does this PR introduce a user-facing change?

For user-facing changes, please add a concise, human-readable release note to
the release-note

(In particular, describe what changes users might need to make in their
application as a result of this pull request.)

Compiling or importing Scorecard now requires Go 1.21 

Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
possibly spin this off into its own PR

Signed-off-by: Spencer Schrock <sschrock@google.com>
As of Go 1.20, the generator is seeded randomly at startup.
https://pkg.go.dev/math/rand#Seed

Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Merging #3661 (75fb800) into main (b3d1a5a) will decrease coverage by 5.63%.
The diff coverage is 32.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3661      +/-   ##
==========================================
- Coverage   76.06%   70.44%   -5.63%     
==========================================
  Files         206      206              
  Lines       14065    14060       -5     
==========================================
- Hits        10699     9905     -794     
- Misses       2733     3578     +845     
+ Partials      633      577      -56     

@spencerschrock spencerschrock merged commit a4ee314 into ossf:main Nov 13, 2023
36 checks passed
@spencerschrock spencerschrock deleted the chore/go1.21-features branch November 13, 2023 23:12
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.

2 participants