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 mod: simultaneous imports of different casings for a dependency fails #27157

Closed
voutasaurus opened this issue Aug 22, 2018 · 3 comments
Closed

Comments

@voutasaurus
Copy link

Please answer these questions before submitting your issue. Thanks!

What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

See readme: https:/voutasaurus/modtest

Using different cased characters in an import path for the same dependency.

What did you expect to see?

Resolution to the same dependency.

What did you see instead?

upper/upper.go:4:2: case-insensitive import collision: "github.com/Sirupsen/logrus" and "github.com/sirupsen/logrus"

(See https:/voutasaurus/modtest README for more info)

Does this issue reproduce with the latest release (go1.10.3)?

Applies to release candidate go1.11rc1, not go1.10.3.

System details

(from golang:rc docker image)

go version go1.11rc1 linux/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/go/src/github.com/voutasaurus/modtest/go.mod"
GOROOT/bin/go version: go version go1.11rc1 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.11rc1
uname -sr: Linux 4.9.93-linuxkit-aufs
/lib/x86_64-linux-gnu/libc.so.6: GNU C Library (Debian GLIBC 2.24-11+deb9u3) stable release version 2.24, by Roland McGrath et al.
@voutasaurus
Copy link
Author

voutasaurus commented Aug 22, 2018

Note that this particular package "github.com/sirupsen/logrus" was imported in the docker project as "github.com/Sirupsen/logrus" as recently as last July and earlier versions of docker are still vendored in various other projects, including "github.com/hyperledger/fabric".

Here's the commit to docker (now at github.com/moby/moby) that updated the import path:

commit 4f3616fb1c112e206b88cb7a9922bf49067a7756
Author: Derek McGowan <[email protected]>
Date:   Wed Jul 26 15:03:47 2017 -0700

    Update imports for logrus version
    
    Add forks for changes which only make logrus change without functional
    change.
    
    Signed-off-by: Derek McGowan <[email protected]>

@thepudds
Copy link
Contributor

@gopherbot, please add label modules

@voutasaurus
Copy link
Author

Looks like a duplicate of #26208 my bad

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants