Skip to content

Update minimum Go version to 1.19 - #4586

Merged
thaJeztah merged 1 commit into
docker:masterfrom
tianon:go1.19min
Sep 29, 2023
Merged

Update minimum Go version to 1.19#4586
thaJeztah merged 1 commit into
docker:masterfrom
tianon:go1.19min

Conversation

@tianon

Copy link
Copy Markdown
Contributor

On Go 1.18 since a5ebe22 (#4226), we get:

# github.com/docker/docker-credential-helpers/client
vendor/github.com/docker/docker-credential-helpers/client/command.go:34:39: programCmd.Environ undefined (type *exec.Cmd has no field or method Environ)
note: module requires Go 1.19
# github.com/docker/cli/cli/connhelper/commandconn
cli/connhelper/commandconn/commandconn.go:71:22: undefined: atomic.Bool
cli/connhelper/commandconn/commandconn.go:76:22: undefined: atomic.Bool
cli/connhelper/commandconn/commandconn.go:77:22: undefined: atomic.Bool
cli/connhelper/commandconn/commandconn.go:78:22: undefined: atomic.Bool

These go away when building against 1.19+.

(See also https://github.com/docker/cli/pull/4226/files#r1340556063)

@codecov-commenter

codecov-commenter commented Sep 29, 2023

Copy link
Copy Markdown

Codecov Report

Merging #4586 (0f59f04) into master (162e490) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@ Coverage Diff @@## master #4586 +/- ##
=======================================
Coverage 59.70% 59.70% =======================================
Files 288 288 Lines 24816 24816 =======================================
Hits 14817 14817 Misses 9113 9113 Partials 886 886 

@thaJeztah

Copy link
Copy Markdown
Member

❤️ can you also update the vendor script?

go 1.18

@tianon

Copy link
Copy Markdown
ContributorAuthor

Oh, given #4395, should this technically be backported too?
(I personally only actually care about it on the master branch, not 24 😅)

@thaJeztah

Copy link
Copy Markdown
Member

Yup; or at least; we accepted the backport, so I think this should also be backported (I added a cherry-pick label)

On Go 1.18 since a5ebe22, we get:
# github.com/docker/docker-credential-helpers/client
vendor/github.com/docker/docker-credential-helpers/client/command.go:34:39: programCmd.Environ undefined (type *exec.Cmd has no field or method Environ)
note: module requires Go 1.19
# github.com/docker/cli/cli/connhelper/commandconn
cli/connhelper/commandconn/commandconn.go:71:22: undefined: atomic.Bool
cli/connhelper/commandconn/commandconn.go:76:22: undefined: atomic.Bool
cli/connhelper/commandconn/commandconn.go:77:22: undefined: atomic.Bool
cli/connhelper/commandconn/commandconn.go:78:22: undefined: atomic.Bool
These go away when building against 1.19+.
Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
@tianon

tianon commented Sep 29, 2023

Copy link
Copy Markdown
ContributorAuthor

❤️ can you also update the vendor script?

go 1.18

Updated (including the other reference there to 1.18, and re-ran it with ./scripts/vendor update to verify that nothing actually changes).

@thaJeztah

Copy link
Copy Markdown
Member

Thanks! I already had some cherry-picks for go1.21 in #4583, and I'll move those to a separate PR (everything except for the go1.21 update itself); I'll include a cherry-pick of this one in that.

@thaJeztahthaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment threadscripts/vendor

update() {
(set -x ; go mod tidy -compat=1.18 -modfile=vendor.mod; go mod vendor -modfile=vendor.mod)
(set -x ; go mod tidy -compat=1.19 -modfile=vendor.mod; go mod vendor -modfile=vendor.mod)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

honestly wondering if we still need this one (I recall it was more important between some older versions that didn't include the // indirect block), but I guess it does not harm

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem to change anything if I remove it - want me to commit that?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, I think it's fine to keep it for now, and be on the safe side in case they decide to change the format in an incompatible way.

@thaJeztah

Copy link
Copy Markdown
Member

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@tianon@codecov-commenter@thaJeztah