-
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
Should I use lowercase or uppercase for the package name? #553
Comments
Having similar trouble with Glide, I'm using logrus with the Postgres hook, and glide can't load the repo. Here's my vote for leaving it uppercase, so all dependencies don't break. |
Also hitting this, we've switched to lowercase, filed issues in upstream packages but it's a bit of a mess if they have dependencies that use logrus as well... |
We have to converge to lower-case because reverting would break things for people too. Unfortunately, this is messy either way, caused by the author renaming to lower-case. We have to convert everything to lowercase, as regretful as it is. |
So I ended up working around this by levering
the |
As a convenience, posting this here for Glide: |
I understand that renaming the account was incredibly important (clearly, the difference matters), but since you realized the consequences, can you please tag a new release so that we can stop using the latest master (as you advised us not to do it)? |
Be sure to clear your glide cache as @rohanthewiz is telling us. Renaming is a b!@#$, but yah ..... Also we had issues with renaming on osx in the previous renaming, if so follow this:
|
@sdboyer FYI.... when thinking of dep. |
@iheitlager clearing the cache does not help this: https://github.com/sirupsen/logrus/blob/v0.11.5/hooks/test/test.go#L6 |
well you need to remove the version pinning, i can see master is updated to lower case https://github.com/sirupsen/logrus/blob/master/hooks/test/test.go |
Well, that's a terrible idea. There are reasons why we version software. |
don't use version 0.11.5 I would say, that one is not compatible |
So which (preferably newer) version should I use than? |
I've been fine on this one:
Hopefully we'll get a semantic release soon. |
We hit this and were then forced to vendor dependency packages and manually modify them to work with our own packages using logrus. It was easy to make a PR changing glide for one of our deps but maybe that actually would be worse for people already using it. Once dependencies dependencies start mixing things may grow out of hand. Maybe Golang itself needs an option to ignore capitalization with it's toolchain since this seems like it will affect a lot of people and could easily be remedied. |
@sagikazarmark please consider your tone. I understand the frustration, but it doesn't help anything. I am completely aware this was a mistake, but it's not as simple as "the author renamed because he wanted to cause havoc in the Go community and refuses to revert". Originally, this was attempting to address problems on systems where the upper-case of Logrus was causing issues, the maintainers made the incorrect assumption that most users of Logrus would be vendored and it wouldn't cause major issues—but it did. It then turned out that people had been importing in lower-case in various places anyway because it worked with both after the rename. This was realized late in the process, and reverting, either way, would be painful. |
@sirupsen sorry for the harsh words, indeed I was quite frustrated about the situation. Thanks for the release. As others pointed out, a postmortem blog post might be a good idea, partly to communicate to the world why half of go applications broke down, also to provide a clear picture to Golang maintainers. |
- logrus changed its name from upper case to lower case - fix it. sirupsen/logrus#553 - NewWithAWSConfig was not passing on the name parameter. - Minor fix in readme to use the Config value.
With: $ git mv vendor/github.com/{S,s}irupsen $ sed -i 's/Sirupsen/sirupsen/g' $(git grep -l Sirupsen) catching up with the upstream lowercasing [1,2,3,4]. Note the compatibility issues discussed in [3], some consumers may prefer to use the old uppercase version until they have time to update their other Logrus consumers to the new lowercase form. [1]: https://github.com/sirupsen/logrus/blame/v1.0.3/README.md#L6 [2]: sirupsen/logrus#384 [3]: sirupsen/logrus#570 (comment) [4]: sirupsen/logrus#553
With: $ git mv vendor/github.com/{S,s}irupsen $ sed -i 's/Sirupsen/sirupsen/g' $(git grep -l Sirupsen) catching up with the upstream lowercasing [1,2,3,4]. Because of the compatibility issues discussed in [3], some consumers may prefer to use the old uppercase version until they have time to update their other Logrus consumers to the new lowercase form. [1]: https://github.com/sirupsen/logrus/blame/v1.0.3/README.md#L6 [2]: sirupsen/logrus#384 [3]: sirupsen/logrus#570 (comment) [4]: sirupsen/logrus#553
I have added the glide solution earlier on the thread but I get the following:
Anyone know the solution? |
@rws-github I don't have the whole history. But today the package should be named all lowercase and if an importing package use some uppercase it should be fixed. |
This thread helped me fix my problem Masterminds/glide#210 |
This required bump of some external dependencies, in order to get rid of old versions of logrus as derived depedency. see issues: - sirupsen/logrus#553 - golang/go#28489
This required bump of some external dependencies, in order to get rid of old versions of logrus as derived dependency. see issues: - sirupsen/logrus#553 - golang/go#28489
This required bump of some external dependencies, in order to get rid of old versions of logrus as derived dependency. see issues: - sirupsen/logrus#553 - golang/go#28489
For anyone who've tried this solution in MacOS: I believe this fix only works for running glide in Linux with case sensitive filesystem. On Mac OS this will only create either sirupsen or Sirupsen in vendor. So if you've built a docker image that can run on Mac OS but the same image will fail running in Linux. Reference: Masterminds/glide#868 |
Hi,
I am using two hooks, https://github.com/rogierlommers/logrus-redis-hook and https://github.com/bshuster-repo/logrus-logstash-hook, one is using upper case while the other one is using lowercase. Therefore I got this annoying error
can't load package: package github.com/sirupsen/logrus/examples/hook: case-insensitive import collision: "github.com/Sirupsen/logrus" and "github.com/sirupsen/logrus"
How can I solve this issue?
As there is a thread mentioned that the change has been reverted, so should I use uppercase or lowercase package name?
I am very confused!
Thanks
The text was updated successfully, but these errors were encountered: