-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
case-insensitive import collision #543
Comments
Why are you importing the example hook? |
It happens if you're trying to build the example:
I have opened a pull request to fix logrus-airbrake-hook, which fixes building for me locally: |
I am also getting this. We are not using the example in our project. :( |
I have the same problem without using an example. |
What errors are you getting? |
Sorry, I should post it in my comment! This is the error I am getting. It also occurs, if I fetch the needed libraries (go get) |
Same here |
Do you have a dependency that depends on upper-case, or lower-case, and then you're importing the opposite case? |
As far as i can tell they all use upper-case, except for your examples :) |
This fixes my problem: stweiz@0ae413d I see, that you wrote in your README, that all import paths should be written in lower-case letters, but I recognized, that in the logrus project the first letter is either upper-case, or lower-case. This problem should be fixed, if the import paths in our projects are all the same. So the first letter should be lower-case, right? |
So this should be the correct one: master...stweiz:issue_543_lower-case-imports So everyone who uses the library, needs to set their imports lower-case. |
I don't use example... continues here yet |
I have created a pull request: #546 |
With this PR everything would work for us if we change it to lowercase everywhere (which is fine). |
@sirupsen can we expect to see it merged to the master soon? |
Are people getting this due to using the test package, and syslog? I created a null logger package that importa lower-case. We cannot just change the casing, as people depend on the upper-case import as well. This is a sticky situation, so we have to tread very carefully. It's possible we should instead take syslog out of core with a lower-case import, and deprecate the package in core. |
@sirupsen we get this from syslog, yeah |
@ypatent we'll have to copy that directory and provide symlinks, then reference logrus with lowercase. I don't want to reference lowercase in core just yet. |
I'm getting the same today, trying to use the elasticsearch hook case-insensitive import collision: "github.com/Sirupsen/logrus" and "github.com/sirupsen/logrus" |
the uppercase variant is still present in the syslog hook, causing build errors. I have manually edited the two files (syslog and test) and I can build correctly |
(Issue #553 is directly related to this). I am stating the obvious here, and firstly thank you for a great logging package, but when your project is widespread use (Congratulations!), or you hope it will be, global changes like these are a big no, no. The community values stability so we can run our production systems without worry. One reason for Go's widespread adoption is the 1.0 guarantee. In everything we do as open source developers, we should make stability a very high priority. Thanks again. So which way are we going, lower or upper 'Sirupsen'? |
Lower-case. This has been a mess since my handle was re-named, and the best long-term strategy is that everyone converts to lowercase. There's no turning back, as regretful as that is. As mentioned in other issues, I failed to realize the implications this would have given Go's package management. |
I am terribly sorry for how messy this is. But I truly believe the best option at this point is biting the bullet and going full on lower-case at this point. |
For |
I think in the future we should have a legal age for creating account in Github or other remote repository. |
I am using Although the strange fact is, when I do a |
@piyush-nimbalkar, I'm actually having the same issue and it is very peculiar indeed. |
Solves case-sensitive imports according to the recommended solution in sirupsen/logrus#543.
I'm having the same case-insensitive collision with the latest moby/moby (docker/docker) release since they vendored Sirupsen and we are using sirupsen. Due to vendor flattening we now get the collision. That rename caused sooo much issues -.- |
This PR will fix the import collision issue with logrus Please refer to sirupsen/logrus#543
same here |
This PR will fix the import collision issue with logrus Please refer to sirupsen/logrus#543
Hi,
My last build today I have this problem.
can't load package: package github.com/sirupsen/logrus/examples/hook: case-insensitive import collision: "github.com/Sirupsen/logrus" and "github.com/sirupsen/logrus"
can i help me ?
The text was updated successfully, but these errors were encountered: