You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've created a project that couples Starlark with Buildah (inducing a transitive dependency on github.com/containers/image) to simplify building packages for my toy Linux distribution. This may simply be user error but when I go get my project I get the following error. However when I use go build it works fine. Searching around the only issue I could find that might be related to this is golang/go#30354 I wanted to confirm whether or not go get is expected to work? I'm relatively new to go so it's very possible "I'm doing it wrong". :)
emolitor@DESKTOP-VJPGU2V:~$ go get github.com/esplinux/espbuild
# github.com/containers/image/storage
go/src/github.com/containers/image/storage/storage_image.go:150:73: cannot use info.Digest (type "github.com/opencontainers/go-digest".Digest) as type "github.com/containers/storage/vendor/github.com/opencontainers/go-digest".Digest in argument to s.imageRef.transport.store.LayersByUncompressedDigest
go/src/github.com/containers/image/storage/storage_image.go:267:4: cannot use layer.UncompressedDigest (type "github.com/containers/storage/vendor/github.com/opencontainers/go-digest".Digest) as type "github.com/opencontainers/go-digest".Digest in field value
go/src/github.com/containers/image/storage/storage_image.go:490:79: cannot use blobinfo.Digest (type "github.com/opencontainers/go-digest".Digest) as type "github.com/containers/storage/vendor/github.com/opencontainers/go-digest".Digest in argument to s.imageRef.transport.store.LayersByUncompressedDigest
go/src/github.com/containers/image/storage/storage_image.go:496:34: cannot use layers[0].UncompressedDigest (type "github.com/containers/storage/vendor/github.com/opencontainers/go-digest".Digest) as type "github.com/opencontainers/go-digest".Digest in assignment
go/src/github.com/containers/image/storage/storage_image.go:505:76: cannot use blobinfo.Digest (type "github.com/opencontainers/go-digest".Digest) as type "github.com/containers/storage/vendor/github.com/opencontainers/go-digest".Digest in argument to s.imageRef.transport.store.LayersByCompressedDigest
go/src/github.com/containers/image/storage/storage_image.go:511:34: cannot use layers[0].UncompressedDigest (type "github.com/containers/storage/vendor/github.com/opencontainers/go-digest".Digest) as type "github.com/opencontainers/go-digest".Digest in assignment
go/src/github.com/containers/image/storage/storage_image.go:524:72: cannot use uncompressedDigest (type "github.com/opencontainers/go-digest".Digest) as type "github.com/containers/storage/vendor/github.com/opencontainers/go-digest".Digest in argument to s.imageRef.transport.store.LayersByUncompressedDigest
go/src/github.com/containers/image/storage/storage_image.go:530:37: cannot use layers[0].UncompressedDigest (type "github.com/containers/storage/vendor/github.com/opencontainers/go-digest".Digest) as type "github.com/opencontainers/go-digest".Digest in assignment
go/src/github.com/containers/image/storage/storage_image.go:536:39: cannot use layers[0].UncompressedDigest (type "github.com/containers/storage/vendor/github.com/opencontainers/go-digest".Digest) as type "github.com/opencontainers/go-digest".Digest in assignment
go/src/github.com/containers/image/storage/storage_image.go:691:73: cannot use diffID (type "github.com/opencontainers/go-digest".Digest) as type "github.com/containers/storage/vendor/github.com/opencontainers/go-digest".Digest in argument to s.imageRef.transport.store.LayersByUncompressedDigest
go/src/github.com/containers/image/storage/storage_image.go:691:73: too many errors
The text was updated successfully, but these errors were encountered:
This happens because containers/storage contains a vendor subdirectory in the repository, and thus it refers to types defined in that directory (you can verify this by manually removing $GOPATH/src/github.com/containers/storage/vendor.) Compare distribution/distribution#2130 .
One way to get things to work is to force the go get to be module-aware (which cause the vendor directory to be ignored): GO111MODULE=on go get ….
Moving to c/storage to consider no longer committing the vendor subdirectory
I've created a project that couples Starlark with Buildah (inducing a transitive dependency on github.com/containers/image) to simplify building packages for my toy Linux distribution. This may simply be user error but when I
go get
my project I get the following error. However when I use go build it works fine. Searching around the only issue I could find that might be related to this is golang/go#30354 I wanted to confirm whether or not go get is expected to work? I'm relatively new to go so it's very possible "I'm doing it wrong". :)The text was updated successfully, but these errors were encountered: