-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
cmd/go: case-insensitive import collision with vgo build ./... #26208
Comments
That's probably giving you some transitive dependency that uses a bad import path for What happens if you explicitly |
Hi @bcmills, thanks for the suggestion, but I got the same error EDIT - to be clear, I first |
When we stop automatically picking old versions of things (#26238) it should pretty much go away. Let's revisit once that is fixed. |
Thanks @bcmills! I'll keep an eye on that issue and try again once closed. |
#26238 was merged. Is this issue still happening? |
@filewalkwithme trying to install from source to check, now. Having some issues but will update you with progress, soon. |
@filewalkwithme same problem, unfortunately. $ go version
go version devel +859a944ee2 Wed Aug 1 21:45:11 2018 +0000 linux/amd64
$ git clone [email protected]:adam-hanna/vgo-bug.git && cd vgo-bug
$ go build .
/home/adam/go/pkg/mod/github.com/docker/[email protected]/broadcast.go:7:2: case-insensitive import collision: "github.com/sirupsen/logrus" and "github.com/Sirupsen/logrus" |
The root cause here is using such an old version of docker that it pulls in the very old github.com/Sirupsen/logrus, alongside something else that pulls in the newer github.com/sirupsen/logrus. The collision detection is correct, the problem is the bad configuration that causes the collision. This is not going to change for Go 1.11. We did make the module support better at understanding when a v2.0.0 tag should be considered an incompatible part of the v1 sequence. But docker does not even use valid semver tags, so that didn't help. (v17.05.0-ce is not the "-ce" prerelease of v17.05.0, and more to the point v17.05.0 is not a valid semver version, since the positive numbers can't have leading zeros. It would have to be v17.5.0.) |
@rsc Thanks for the help!
require(
...
github.com/docker/docker v0.0.0-20170601211448-f5ec1e2936dc
...
)
EDIT - Scratch the first part of my comment... Would it be possible to consider adding support for:
?? Thanks! |
It may be worth looking at the corpus to see which major packages vendor an old docker version (pre July 2017). If the responsibility lies with the package maintainers themselves then starting the outreach sooner rather than later will give those package maintainers more time to anticipate the issue. Also maybe I'm reading this wrong but is there any temporary workaround for those project maintainers who themselves are depending on a package that in turn depends on an old version of docker except for "don't use go mod for dependency management"? |
FYI I did this in a repo which depends on github.com/hyperledger/fabric which depends on an old version of docker as a workaround and the error went away:
No manual editing of go.mod required. Tested in fresh golang:rc container. I'm not sure if github.com/hyperledger/fabric will actually work with [email protected] but at least the go tooling will work. |
This reverts commit ed7b45e.
More recent discussion (along with worked examples of good techniques to resolve properly): |
That will likely be allowed once #26904 is addressed. Closing this issue as subsumed by that one. |
In 2018 the GitHub "organization" github.com/Sirupsen changed to all lower case. While this was fine in a pre "Go Modules" world, this cases breaking changes when using modules within Go. A number of other Go projects have experienced this, for more detail reference the following: golang/go#28489 golang/go#26208
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Have not tried 1.11beta1
What operating system and processor architecture are you using (
go env
)?What did you do?
A simple, demo repo to reproduce can be found, here.
Stackoverflow, here.
I've also tried modifying my go.mod file with
AND
What did you expect to see?
Successful build
What did you see instead?
The text was updated successfully, but these errors were encountered: