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 get -u github.com/tonistiigi/fsutil fails #133

Open
SilverSoldier opened this issue May 26, 2022 · 5 comments
Open

go get -u github.com/tonistiigi/fsutil fails #133

SilverSoldier opened this issue May 26, 2022 · 5 comments

Comments

@SilverSoldier
Copy link

SilverSoldier commented May 26, 2022

When I run go get -u github.com/tonistiigi/fsutil, I get the following error:

# github.com/tonistiigi/fsutil
.../pkg/mod/github.com/tonistiigi/[email protected]/walker.go:120:20: undefined: fileutils.MatchInfo
.../pkg/mod/github.com/tonistiigi/[email protected]/walker.go:121:20: undefined: fileutils.MatchInfo
.../pkg/mod/github.com/tonistiigi/[email protected]/walker.go:176:31: undefined: fileutils.MatchInfo
.../pkg/mod/github.com/tonistiigi/[email protected]/walker.go:180:39: includeMatcher.MatchesUsingParentResults undefined (type *fileutils.PatternMatcher has no field or method MatchesUsingParentResults)
.../pkg/mod/github.com/tonistiigi/[email protected]/walker.go:211:31: undefined: fileutils.MatchInfo
.../pkg/mod/github.com/tonistiigi/[email protected]/walker.go:215:39: excludeMatcher.`MatchesUsingParentResults` undefined (type *fileutils.PatternMatcher has no field or method MatchesUsingParentResults)

It seems to be due to the dependency docker/docker. Even though the commit (87521affb077) of docker/docker in the current go.mod seems to include the code changes related to MatchInfo and MatchesUsingParentResults, it is somehow failing.

However, when I tried using the latest version of docker/docker (v20.10.3-0.20220524152814-18529568d3fb), it seems to work without issues.

This is causing problems when I am trying to build something else which has this as a dependency.

mohaijiang added a commit to mohaijiang/fsutil that referenced this issue May 30, 2022
@tonistiigi
Copy link
Owner

Some other dependency probably switches docker to the wrong version for you.

@eli-darkly
Copy link

I'm having a similar problem, and I'm confused by the state of the dependencies— or rather, I'm confused by the versioning of docker/docker, which is now really moby/moby. The dependency here is referencing a specific commit on the master branch. But as far as I can tell, of the latest release tags which are v20.10.x, none of them are related to that branch, and none of them include the fileutils.MatchInfo type. And since I am getting the github.com/tonistiigi/fsutil dependency transitively via the docker/moby client packages, it seems to me like the tagged versions of those packages are incompatible with themselves. I realize this isn't your problem, but... do you know if there is a known issue of the tagged versions being unusable for this reason? There are 4K+ open issues in the moby/moby project and I've had no luck finding out anything about this.

@eli-darkly
Copy link

And I've been trying to work around this by forcing the docker dependency to use the specific commit v20.10.3-0.20220524152814-18529568d3fb ...but that causes other problems with the other Docker tools I'm trying to use, like BuildKit, which (as far as I've found so far) don't have any version that is compatible with that version.

@tonistiigi
Copy link
Owner

Maybe @thaJeztah can help with some workarounds, but yes, the tagging releases of docker/cli and docker/docker is quite fundamentally incompatible with go.mod and tbh Go specifically made changes to gomod between some versions to break these repos even further.

I think your best approach is to pick a buildkit version you want to use (as buildkit uses gomod) then look up the go.mod from buildkit repo and copy the replace rules inside that project into your own. Buildx repo also uses go.mod and carries similar replace rules.

@thaJeztah
Copy link
Collaborator

Probably this is resolved now that we have merged #136, but worth checking if there's still issues remaining

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

No branches or pull requests

4 participants