Skip to content

Replace docker/pkg/fileutils with github.com/moby/patternmatcher#136

Merged
tonistiigi merged 4 commits intotonistiigi:masterfrom
thaJeztah:replace_docker
Sep 30, 2022
Merged

Replace docker/pkg/fileutils with github.com/moby/patternmatcher#136
tonistiigi merged 4 commits intotonistiigi:masterfrom
thaJeztah:replace_docker

Conversation

@thaJeztah
Copy link
Collaborator

@thaJeztah
Copy link
Collaborator Author

@tonistiigi @aaronlehmann @cpuguy83 PTAL (I haven't tagged a release yet, but can do if we're all happy with the current state)

@thaJeztah
Copy link
Collaborator Author

hm.. something is failing; let me check

@thaJeztah
Copy link
Collaborator Author

Ah; linter is still running go 1.17; need to update github actions to go 1.18/1.19; let me open a PR

 go mod tidy: go.mod file indicates go 1.18, but maximum supported version is 1.17

@thaJeztah
Copy link
Collaborator Author

opened #137

@aaronlehmann
Copy link
Collaborator

Thanks for doing this!

@thaJeztah
Copy link
Collaborator Author

It kept dropping off my list to do. Not entirely out of the woods yet; see moby/moby#44227, but we can temporarily depend on the aliases I created in docker/docker for that (until the buildkit version we use there is compatible with the latest tonistiigi/fsutil.

@thaJeztah
Copy link
Collaborator Author

Ah, dang... and more to do; looks like we're still using io/ioutil in this repo;

#26 9.826 fs.go:6:2: SA1019: "io/ioutil" has been deprecated since Go 1.16: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
#26 9.826 	"io/ioutil"
#26 9.826 	^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Comment on lines -160 to +146
t3, err := ioutil.TempDir("", "test")
require.NoError(t, err)
defer os.RemoveAll(t2)
t3 := t.TempDir()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I saw a couple of these, and I guess those were copy/paste errors; we create t3, but add a defer to remove t2 (I guess CI will show if it was not intentional 😂)

@thaJeztah
Copy link
Collaborator Author

Nice; all green now; I'll tag v0.5.0, and update this PR 👍

The pkg/fileutils package was moved to a separate module / repository.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Collaborator Author

done; should all be good now

@tonistiigi tonistiigi merged commit 4638ad6 into tonistiigi:master Sep 30, 2022
@thaJeztah thaJeztah deleted the replace_docker branch September 30, 2022 23:01
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.

4 participants