golang 1.5.1 use of internal package not allowed

1,164 views
Skip to first unread message

Ivan Hristov

unread,
Dec 9, 2015, 7:31:49 AM12/9/15
to mgo-users
Hi guys,

I have the following error: imports gopkg.in/mgo.v2/internal/scram: use of internal package not allowed

I'm using glide with GO15VENDOREXPERIMENT=1 environment variable and I have mng in a vendor folder right next to my main.go. I also followed this thread: https://groups.google.com/forum/#!topic/golang-nuts/A3KA8SNjcp0 but still didn't get if I can fix it by myself or if a change in the library is needed. Any suggestions?

Thanks in advance.

Gustavo Niemeyer

unread,
Dec 15, 2015, 12:02:37 PM12/15/15
to mgo-...@googlegroups.com
Hi Ivan,

What is importing gopkg.in/mgo.v2/internal?

I can build mgo fine with the environment variable set here:

$ GO15VENDOREXPERIMENT=1 go build



--
You received this message because you are subscribed to the Google Groups "mgo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mgo-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Rob Farrow

unread,
Feb 27, 2016, 12:53:11 AM2/27/16
to mgo-users
I am getting the same error with the latest release?
Is the mgo package still being supported?

The error provides no clue as to where it is or how to fix it.
 
~ $ go get gopkg.in/mgo.v2
        imports gopkg.in/mgo.v2-unstable/internal/scram: use of internal package not allowed
~ $ go version
go version go1.6 windows/amd64
~ $

Gustavo Niemeyer

unread,
Feb 27, 2016, 1:24:47 AM2/27/16
to mgo-...@googlegroups.com
Hi Rob,

On Sat, Feb 27, 2016 at 2:53 AM, Rob Farrow <robbyri...@gmail.com> wrote:
I am getting the same error with the latest release?
Is the mgo package still being supported?

Yes, and there was a major release days ago which you might be interested on if you've been away for a while.
 
The error provides no clue as to where it is or how to fix it.

This behavior was introduced in Go 1.5. Please have a look at the documentation:

 
~ $ go get gopkg.in/mgo.v2
        imports gopkg.in/mgo.v2-unstable/internal/scram: use of internal package not allowed

Nothing imports from unstable in the stable package. Your is not reflecting the actual v2 branch:

$ grep unstable * -r | wc -l
0

Try removing the content in there and re-getting it.


Rob Farrow

unread,
Feb 28, 2016, 12:25:05 AM2/28/16
to mgo-users
Thank you, Gustavo!  

I had to clear out the old versions and download from scratch.
Everything worked after that.   I appreciate your support.

Rob
Reply all
Reply to author
Forward
0 new messages