-
Notifications
You must be signed in to change notification settings - Fork 1k
Error while writing out vendor tree because of sirupsen/logrus #797
Comments
You have We had an approach to this as described in sirupsen/logrus#553 (comment) but no one got to implement it yet. 😩 |
Well my dependencies have that. Damn that's not nice. :-( is there any kind of workaround for that? |
I'm afraid that you can't solve this without updating dependencies at the moment (until we handle this case in |
But it's a transient dependency. I can't fix it. :( I don't depend on it. Some of my dependencies depend on it. How can I fix THAT? :) |
@Skarlso yeah, until we fix it and fold cases together correctly, the only recourse you have is asking one of the projects you depend on to make the fix. Or, forking one and fixing it yourself, then pointing the import path to your fork with a I'd recommend preferring lower case to upper, here. |
Oh I see. Thanks @sdboyer. :-) |
Would case folding require changes to the (Assuming import paths remained mixed case). |
@sdboyer's proposed solution doesn't require any changes to |
So, Glide solves this with a
|
Even glide has a similar issue. You won't be able to install the dependencies for the code below if you are on a case-insensitive file system. And the real issue for me is that version selection was done twice, and therefore you could have 2 versions of the same dependency. package glidetest
import (
l1 "github.com/Sirupsen/logrus"
l2 "github.com/sirupsen/logrus"
)
func main() {
_ = l1.New()
_ = l2.New()
} |
Ahhh totally forgot that that doesn't work. Right you are @ibrasho. |
After #813 I made a naive attempt to resolve this by changing references from Sirupsen to sirupsen, but that turned out to be way too naive, since there are dependencies in the vendor directory that import Sirupsen/logrus, and that haven't been updated to sirupsen. So IMO this definitely requires a workaround of some type in dep. Who ever thought it would be OK to have a case-insensitive filesystem anyway! |
This is also breaking our usage of dep in a Windows environment. Should dep be aware that it is running in a case-insensitive filesystem and in that case use the existing (the first one created wins) git repo? |
@davidovich we may have to resort to something like that in order to stop the bleeding, but it's a pretty fundamental violation of dep's rules to do that. so, yeah...temporary. god, i hope 😨 |
- github.com/Sirupsen/logrus -> github.com/sirupsen/logrus - related issue: golang/dep#797
- related issue: golang/dep#797 - updates: github.com/Sirupsen/logrus -> github.com/sirupsen/logrus
Is there an quick way to tell what transitive dep is importing |
@tejasmanohar not currently, but #1079 will make it trivial. |
The logrus package import changed letter case: sirupsen/logrus#384 In c31b012 I opted to use the same case as Prometheus packages I depend on to avoid case conflicts. I'm about to start using Go's dep tool for dependency management, and the old logrus import prevents dep from completing its initialisation because newer Prometheus packages use the lowercase import path: golang/dep#797 Use the lowercase import path for consistency with the Prometheus packages.
The logrus package import changed letter case: sirupsen/logrus#384 In c31b012 I opted to use the same case as Prometheus packages I depend on to avoid case conflicts. I'm about to start using Go's dep tool for dependency management, and the old logrus import prevents dep from completing its initialisation because newer Prometheus packages use the lowercase import path: golang/dep#797 Use the lowercase import path for consistency with the Prometheus packages.
Is there anyway to overcome this? dep init -v
|
@kumarsiva07 right now, it takes a lot of manual work. once #1079 is in, dep should find a solution for you, if one exists. given that you're just trying to get over the initial hump that is |
I'm still encountering this on OSX with recent dep (1dc2d8b) |
@therealplato yeah I saw your note in slack - I'm honestly confused about how you arrived there 😢 |
One option could be to allow |
Actually, it's already possible, it seems! ignored = ["github.com/Sirupsen/logrus"]
[[override]]
name = "github.com/sirupsen/logrus"
version = "^1.0.5" |
@therealplato that also does not make sense. dep prepares its vendor folder in a separate dir, then moves it into place. im honestly not sure if an ignore like that would have the desired effect. it...might, but it also might have some weird side effects, as I can't recall how we deal with case normalization in ignores. |
Well, at least the
|
What version of Go (
go version
) anddep
(git describe --tags
) are you using?What
dep
command did you run?Full Log:
What did you expect to see?
For it to work.
What did you see instead?
Did not work and failed with error message.
The text was updated successfully, but these errors were encountered: