Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Sirupsen/logrus uppercase->lowercase rename breaks golang/dep #806

Closed
VojtechVitek opened this issue Jul 11, 2017 · 2 comments · Fixed by #1079
Closed

Sirupsen/logrus uppercase->lowercase rename breaks golang/dep #806

VojtechVitek opened this issue Jul 11, 2017 · 2 comments · Fixed by #1079

Comments

@VojtechVitek
Copy link

VojtechVitek commented Jul 11, 2017

github.com/Sirupsen/logrus (uppercase) recently renamed to github.com/sirupsen/logrus (lowercase)

Since one of our transitive dependencies switched to the new name, I was forced to switch as well.

So, I've renamed all the imports in our project to the new lowercase logrus and I've also updated the Gopkg.toml file manually.

But running dep ensure -v failed with this error:

Solver wall times by segment:
     b-source-exists: 1m26.904688163s
              b-gmal:   28.462179459s
         b-list-pkgs:   10.529860179s
  b-deduce-proj-root:    332.755275ms
         select-root:     67.282398ms
             satisfy:     50.599636ms
         select-atom:     43.949387ms
            new-atom:      9.711577ms
               other:       454.893µs
     b-list-versions:       140.458µs
            add-atom:        61.222µs

  TOTAL: 2m6.401682647s

grouped write of manifest, lock and vendor: error while writing out vendor tree: error while exporting github.com/sirupsen/logrus: /var/folders/hr/5zb8r0yx4sv4_1dc0rlccflm0000gn/T/dep672844279/vendor/github.com/sirupsen/logrus/.gitignore already exists, no checkout

Yes, I'm on MacOS (which has case-insensitive file system), so checking out the two conflicting repos is not possible.

Note: Actually, even git itself has troubles renaming a single directory name to lowercase. What a bummer.

So I'm thinking there is probably yet another transitive dependency that is still importing the old uppercase repository and golang/dep is cloning it while resolving the dependencies. But which one? The error message coming from golang/dep is not useful at all.

I'm gonna dig deeper into my vendor/ directory and try to debug the problem and report back.
Any guidance / feedback appreciated, though.

What did you expect to see?

Useful error message on conflicting (lowercase/uppercase) repositories. I would like to know which transitive dependency introduced the conflict, if possible.

What version of Go and dep are you using?

go version go1.9beta1 darwin/amd64

dep v0.1.0-206-ge99676b

What dep command did you run?

dep ensure -v

@VojtechVitek
Copy link
Author

VojtechVitek commented Jul 11, 2017

Ok, I resolved all of the issues locally. There was one more transitive dependency imporging the old uppercase logrus repository URL.

Also, I had to rm -rf $GOPATH/pkg/dep (on MacOS).


Can we please error out early if we see conflicting strings.ToLower(repositoryURL) for the sake of Windows and MacOS users?

@sdboyer
Copy link
Member

sdboyer commented Jul 12, 2017

hi! thanks for the detailed issue.

definitely a known problem here - see #433. (the rename happened quite a while ago). erroring out, as you suggest, is probably our simplest recourse while we weigh the more complex solutions.

(closing this as duplicate)

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

Successfully merging a pull request may close this issue.

2 participants