db icon indicating copy to clipboard operation
db copied to clipboard

Use of internal package not allowed

Open manhluna opened this issue 4 years ago • 2 comments

....\go\pkg\mod\github.com\upper\[email protected]+incompatible\mongo\result.go:37:2: use of internal package upper.io/db.v3/internal/immutable not allowed Capture

manhluna avatar Nov 14 '20 06:11 manhluna

Hello @manhluna,

Could you provide more information on how to reproduce this message?

xiam avatar Nov 28 '20 18:11 xiam

I found this error by doing:

mkdir test
cd test
go mod init local/test
go get upper.io/db.v4

Which resulted in:

go: upper.io/db.v4 upgrade => v3.7.1+incompatible
go: finding module for package upper.io/db.v3/internal/immutable
go: found upper.io/db.v3/internal/immutable in upper.io/db.v3 v3.7.1+incompatible
package upper.io/db.v4
        /home/scott/go/pkg/mod/upper.io/[email protected]+incompatible/compound.go:25:2: use of internal package upper.io/db.v3/internal/immutable not allowed

With Go version 1.15.6 on linux, amd64.

Fetching this package the way in the tour, via go get github.com/upper/db/v4/adapter/cockroachdb does not produce this error. So there's probably some subtlety in Go modules between db.v4 and db.v3 involving that internal package causing trouble.

swdunlop avatar Jan 04 '21 22:01 swdunlop