evalphobia / logrus_sentry

sentry hook for logrus
MIT License
194 stars 78 forks source link

Capital letter in imports confuses Glide package manager. #40

Closed dandee closed 7 years ago

dandee commented 7 years ago

This package imports "github.com/Sirupsen/logrus" instead of "github.com/sirupsen/logrus". This confuses auto dependency discovery process in the Glide package manager making it fail to update the project packages.

evalphobia commented 7 years ago

@dandee

see

cheshir commented 7 years ago

Same problem here. @evalphobia so what? sirupsen renamed back to lowercase? :) What's the solution?

cheshir commented 7 years ago

Solution for glide:

- package: github.com/Sirupsen/logrus
  repo: git@github.com:sirupsen/logrus.git
  vcs: git
  version: v0.11.x

But problems can occurs if another hook will import logrus package as github.com/sirupsen/logrus.

evalphobia commented 7 years ago

@cheshir

Workaround

As comment here https://github.com/sirupsen/logrus/pull/384#issuecomment-264120464 , Changing import package name in /vendor/ dir might work.

IMO

I checked hooks on the list in https://github.com/sirupsen/logrus

Only these two hooks are using github.com/sirupsen/logrus

Rest of hooks are using github.com/Sirupsen/logrus (some hooks are not maintained though), including official Syslog hook.

So it is reasonable to change back from github.com/sirupsen/logrus to github.com/Sirupsen/logrus for the two hooks above.

I'll create PR for these two hooks.

cheshir commented 7 years ago

@evalphobia problem is not critical, but vendor package name (github.com/sirupsen/logrus) and import paths in hook (github.com/Sirupsen/logrus) are inconsistent. Why do you can't update import paths in library? You can set v0.3.0 tag and all clients should work fine if they set correct version in their dependency manager. Or solving problem like this is more complicated as I think?

evalphobia commented 7 years ago

@cheshir Sorry for my late. Does my comment on https://github.com/polds/logrus-papertrail-hook/issues/8#issuecomment-293786037 make sense?

cheshir commented 7 years ago

@evalphobia yes, it make sense. But it's not so simple when you build and deploy your code with CI/CD. I think that moving project to github.com/go-logrus/logrus is a great idea.

evalphobia commented 7 years ago

Merged by https://github.com/evalphobia/logrus_sentry/pull/48