Skip to content
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

use of internal package github.com/sirupsen/logrus/internal/terminal not allowed #933

Closed
pacmessica opened this issue Mar 28, 2019 · 12 comments

Comments

@pacmessica
Copy link

breaking change was introduced yesterday. I see the following error on all my builds:

../../../github.com/Sirupsen/logrus/terminal_check_notappengine.go:9:2: use of internal package github.com/sirupsen/logrus/internal/terminal not allowed
This was referenced Mar 28, 2019
@artagel
Copy link

artagel commented Mar 28, 2019

Same issue.

@dgsb
Copy link
Collaborator

dgsb commented Mar 28, 2019

It's kind of unexpected.
Can you provide more context, or even better a code sample using logrus which exhibits the build break ?
Which go version are you using ?
On a sidenote, I highly recommend that you use tagged version instead of the tip master.

@lavoiesl
Copy link
Collaborator

I merged #935 for the time being, just so users aren't blocked, but let's keep this one open to figure out why.

@artagel
Copy link

artagel commented Mar 28, 2019

I’ll be able to get full details when I get back home.
I’m using https://github.com/vouch/vouch-proxy
You can’t specify the tag version when using go get, so I ended up pulling the repo and checking out the tag in my gopath src. This obviously isn’t a long term solution.

@dgsb
Copy link
Collaborator

dgsb commented Mar 28, 2019

@artagel you may want to use dep https://golang.github.io/dep/ for managaing your project dependencies.
Or you use the next gen dependency manager through modules.
So that you don't rely on master anymore.

@artagel
Copy link

artagel commented Mar 29, 2019

Yeah, I think this is an issue golang needs to solve better. Dep is being abandoned as far as I've read, and they are trying to put out something new.

@dgsb
Copy link
Collaborator

dgsb commented Mar 29, 2019

@pacmessica or @artagel can you provide more feedback on how to reproduce the issue ? because our temporary forces us to expose an API we do not want to make public.

@artagel
Copy link

artagel commented Mar 29, 2019

Sure,
The push you guys did yesterday fixed the issue for now...
I still have a copy of the master from before that fix...this is what happens:
But using vouch-proxy as an example:
git clone https://github.com/vouch/vouch-proxy
cd vouch-proxy
go get -v
go run main.go
../../Sirupsen/logrus/terminal_check_notappengine.go:9:2: use of internal package not allowed

The problem seems to be the use of the word internal in your import.
Check out:
https://golang.org/cmd/go/#hdr-Internal_Directories
https://docs.google.com/document/d/1e8kOo3r51b2BWtTs_1uADIA5djfXhPT36s6eHVRIvaU/edit

@tandr
Copy link
Contributor

tandr commented Mar 29, 2019

Well... usage of internal was intentional. At this point we can as well put it under main directory and get rid of exported IsTerminal altogether.

@artagel
There are testutils under internal already, and you are not using it but still have in a codebase - because otherwise it would be broken as well.

Also... It became a lowercase sirupsen (as outlined in a second paragraph of a README file) quite a while ago. Makes me wonder if your codebase is pulling a correct references to it.

@artagel
Copy link

artagel commented Mar 30, 2019

@tandr
I've changed all imports from Sirupsen to sirupsen, and you are correct, with the original version that had the internal tag, it no longer throws this error.
vouch isn't my project, but I've submitted a pull request to fix this.
Pull request for reference: vouch/vouch-proxy#88

@dgsb
Copy link
Collaborator

dgsb commented Apr 1, 2019

thanks @artagel for your feedback.
@pacmessica can you also provide some context on how to reproduce the issue, we suspect something is wrong with your environment, but we would like to be sure.

@dgsb
Copy link
Collaborator

dgsb commented Apr 2, 2019

the package has been removed and associated functions moved as private one in #943

@dgsb dgsb closed this as completed Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants