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

go 1.20 #1740

Merged
merged 4 commits into from
May 12, 2023
Merged

go 1.20 #1740

merged 4 commits into from
May 12, 2023

Conversation

joe-kimmel-vmw
Copy link
Contributor

Summary

upgrades golang version

Documentation

  • Should this change be documented?
    • Yes, see #___
    • [ x] No

Related

Resolves #___

Signed-off-by: Joe Kimmel <jkimmel@vmware.com>
@joe-kimmel-vmw joe-kimmel-vmw requested review from a team as code owners April 26, 2023 23:11
@github-actions github-actions bot added this to the 0.30.0 milestone Apr 26, 2023
@github-actions github-actions bot added the type/chore Issue that requests non-user facing changes. label Apr 26, 2023
@jkutner
Copy link
Member

jkutner commented Apr 27, 2023

I feel like there was some concern with updating golang version too often. Is that right @natalieparellano or @AidanDelaney ?

@natalieparellano
Copy link
Member

cc also @dfreilich

I'd be okay with moving to 1.20 at this point as the minor already has 3 patches.

@dfreilich
Copy link
Member

Go v1.19 was released in pack https://github.com/buildpacks/pack/releases/tag/v0.29.0, so I'm fine with it in this release :)

@jkutner
Copy link
Member

jkutner commented May 5, 2023

We also need to update the Makefile and github actions. I'll get to those unless someone else does.
https://github.com/search?q=repo%3Abuildpacks%2Fpack%201.19&type=code

@jkutner
Copy link
Member

jkutner commented May 10, 2023

also need to fix some uses of rand.Seed(time.Now().UTC().UnixNano()) for linter

Signed-off-by: Joe Kimmel <jkimmel@vmware.com>
All of our calls to Seed were with current time, so they
were intended to produce different pseudo-random sequences on each run.
We were never calling Seed with a fixed value to create reproducible
sequences of pseudo-random numbers.  Therefore it should be safe to just
delete the calls.

per the docs (https://pkg.go.dev/math/rand@master#Seed):

> If Seed is not called, the generator is seeded randomly at program startup.

> Prior to Go 1.20, the generator was seeded like Seed(1) at program startup. To force the old behavior, call Seed(1) at program startup. Alternately, set GODEBUG=randautoseed=0 in the environment before making any calls to functions in this package.

> Deprecated: As of Go 1.20 there is no reason to call Seed with a random value. Programs that call Seed with a known value to get a specific sequence of results should use New(NewSource(seed)) to obtain a local random generator.

Signed-off-by: Joe Kimmel <jkimmel@vmware.com>
@github-actions github-actions bot added the type/enhancement Issue that requests a new feature or improvement. label May 10, 2023
@jkutner
Copy link
Member

jkutner commented May 11, 2023

thanks @joe-kimmel-vmw. i'm merging this into #1758

@jkutner jkutner merged commit 312b265 into buildpacks:main May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/chore Issue that requests non-user facing changes. type/enhancement Issue that requests a new feature or improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants