Google-cloud-go: Use of internal package not allowed

Created on 1 Apr 2018  Â·  5Comments  Â·  Source: googleapis/google-cloud-go

Client

Storage

Describe Your Environment

Mac OS X

Expected Behavior

$ GOCACHE=off go test ./...
PASS

I should be able to vendor the library.

Actual Behavior

$ GOCACHE=off go test ./...
vendor/cloud.google.com/go/storage/acl.go:21:2: use of internal package not allowed

https://github.com/GoogleCloudPlatform/google-cloud-go/commit/ff2b4e26e6465e78ac37248cf3e6355f4a935b37

Refs to internal package errors

Repro

storage question

Most helpful comment

You need to vendor the internal/trace package too.

On Sun, Apr 1, 2018, 9:52 AM Seth Vargo notifications@github.com wrote:

Client

Storage
Describe Your Environment

Mac OS X
Expected Behavior

$ GOCACHE=off go test ./...
PASS

I should be able to vendor the library.
Actual Behavior

$ GOCACHE=off go test ./...
vendor/cloud.google.com/go/storage/acl.go:21:2: use of internal package not allowed

ff2b4e2
https://github.com/GoogleCloudPlatform/google-cloud-go/commit/ff2b4e26e6465e78ac37248cf3e6355f4a935b37

Refs to internal package errors
Repro

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/GoogleCloudPlatform/google-cloud-go/issues/954, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AABhlrj7TmZ1VpYVjkZtidzjxz3C9oE6ks5tkQXagaJpZM4TC5ON
.

All 5 comments

You need to vendor the internal/trace package too.

On Sun, Apr 1, 2018, 9:52 AM Seth Vargo notifications@github.com wrote:

Client

Storage
Describe Your Environment

Mac OS X
Expected Behavior

$ GOCACHE=off go test ./...
PASS

I should be able to vendor the library.
Actual Behavior

$ GOCACHE=off go test ./...
vendor/cloud.google.com/go/storage/acl.go:21:2: use of internal package not allowed

ff2b4e2
https://github.com/GoogleCloudPlatform/google-cloud-go/commit/ff2b4e26e6465e78ac37248cf3e6355f4a935b37

Refs to internal package errors
Repro

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/GoogleCloudPlatform/google-cloud-go/issues/954, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AABhlrj7TmZ1VpYVjkZtidzjxz3C9oE6ks5tkQXagaJpZM4TC5ON
.

So would you say this is a bug in govendor then? It's not pulling in internal/* packages when I pull in cloud.google.com/go/storage...

Seems like it. Any vendoring system should vendor every transitive
dependency.

On Mon, Apr 2, 2018, 7:34 AM Seth Vargo notifications@github.com wrote:

So would you say this is a bug in govendor then? It's not pulling in
internal/* packages when I pull in cloud.google.com/go/storage...

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/GoogleCloudPlatform/google-cloud-go/issues/954#issuecomment-377942736,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABhlp5MQhmZZ3L5W8ItNluHugiH9YE7ks5tkjcGgaJpZM4TC5ON
.

@sethvargo Try pulling in cloud.google.com/go/... instead of cloud.google.com/go/storage/.... It probably didn't pull in that package because internal is at cloud.google.com/go/internal/..., if I had to guess (although it would be nice if it were smarter).

Yeah, that's pretty strange. It did bring in other dependencies (like google.golang.org/api/transport) and even other packages under cloud.google.com/go/internal.

Marking as closed, but please do file a bug with govendor maintainers.

Was this page helpful?
0 / 5 - 0 ratings