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

getting error in go mod #14980

Closed
pritamlipu1 opened this issue Apr 8, 2022 · 8 comments
Closed

getting error in go mod #14980

pritamlipu1 opened this issue Apr 8, 2022 · 8 comments
Labels
devex Developer Experience question

Comments

@pritamlipu1
Copy link

pritamlipu1 commented Apr 8, 2022

I have added 2 dependencies in my go.mod file.
ie: github.com/hashicorp/vault/api v1.5.0
github.com/hashicorp/vault/api/auth/kubernetes v0.1.0

In a new docker container when I am starting my service its downloading all dependency for above.
But getting following error. Not sure how to fix it.

error: go: downloading github.com/hashicorp/go-immutable-radix v1.3.1
../../../go/pkg/mod/github.com/hashicorp/vault/sdk@v0.4.1/helper/pluginutil/run_config.go:13:2: //go:build comment without // +build comment

Please help

@hsimon-hashicorp
Copy link
Contributor

Hi @pritamlipu1 - can you show your go.mod file? Thanks!

@hsimon-hashicorp hsimon-hashicorp added question devex Developer Experience labels Apr 8, 2022
@pritamlipu1
Copy link
Author

@hsimon-hashicorp

module myapp

go 1.15

require (
github.com/Shopify/sarama v1.32.0
github.com/arangodb/go-driver v1.2.1
github.com/benbjohnson/clock v1.1.0
github.com/google/go-cmp v0.5.7
github.com/google/uuid v1.2.0
github.com/gorilla/mux v1.8.0
github.com/hashicorp/vault/api v1.5.0
github.com/hashicorp/vault/api/auth/kubernetes v0.1.0
github.com/prometheus/client_golang v1.11.0
github.com/spaolacci/murmur3 v1.1.0
google.golang.org/protobuf v1.27.1
gopkg.in/yaml.v2 v2.4.0
)

@pritamlipu1
Copy link
Author

pritamlipu1 commented Apr 9, 2022

Log:

go test ./... -race -v -coverprofile=test-output/coverage.profiler.out

go: downloading github.com/Shopify/sarama v1.32.0
go: downloading google.golang.org/protobuf v1.27.1
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading github.com/prometheus/client_golang v1.11.0
go: downloading github.com/gorilla/mux v1.8.0
go: downloading github.com/arangodb/go-driver v1.2.1
go: downloading github.com/hashicorp/vault/api v1.5.0
go: downloading github.com/hashicorp/vault/api/auth/kubernetes v0.1.0
go: downloading github.com/spaolacci/murmur3 v1.1.0
go: downloading github.com/google/go-cmp v0.5.7
go: downloading github.com/google/uuid v1.2.0
go: downloading github.com/benbjohnson/clock v1.1.0
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.1.1
go: downloading github.com/golang/protobuf v1.5.2
go: downloading github.com/prometheus/client_model v0.2.0
go: downloading github.com/prometheus/common v0.26.0
go: downloading github.com/prometheus/procfs v0.6.0
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/eapache/go-resiliency v1.2.0
go: downloading github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21
go: downloading github.com/eapache/queue v1.1.0
go: downloading github.com/jcmturner/gofork v1.0.0
go: downloading github.com/jcmturner/gokrb5/v8 v8.4.2
go: downloading github.com/klauspost/compress v1.14.4
go: downloading github.com/pierrec/lz4 v2.6.1+incompatible
go: downloading github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
go: downloading golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd
go: downloading github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e
go: downloading github.com/cenkalti/backoff/v3 v3.0.0
go: downloading github.com/hashicorp/errwrap v1.1.0
go: downloading github.com/hashicorp/go-cleanhttp v0.5.2
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading github.com/hashicorp/go-retryablehttp v0.6.6
go: downloading github.com/hashicorp/go-rootcerts v1.0.2
go: downloading github.com/hashicorp/go-secure-stdlib/parseutil v0.1.1
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading github.com/hashicorp/vault/sdk v0.4.1
go: downloading github.com/mitchellh/mapstructure v1.4.2
go: downloading golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1
go: downloading gopkg.in/square/go-jose.v2 v2.5.1
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
go: downloading github.com/golang/snappy v0.0.4
go: downloading golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e
go: downloading github.com/jcmturner/dnsutils/v2 v2.0.0
go: downloading github.com/hashicorp/go-uuid v1.0.2
go: downloading github.com/hashicorp/go-secure-stdlib/strutil v0.1.1
go: downloading github.com/hashicorp/go-sockaddr v1.0.2
go: downloading github.com/hashicorp/go-hclog v0.16.2
go: downloading github.com/mitchellh/copystructure v1.0.0
go: downloading github.com/mitchellh/go-testing-interface v1.0.0
go: downloading golang.org/x/crypto v0.0.0-20220214200702-86341886e292
go: downloading github.com/jcmturner/rpc/v2 v2.0.3
go: downloading github.com/ryanuber/go-glob v1.0.0
go: downloading github.com/fatih/color v1.7.0
go: downloading github.com/mattn/go-isatty v0.0.12
go: downloading github.com/hashicorp/go-plugin v1.4.3
go: downloading github.com/hashicorp/go-secure-stdlib/mlock v0.1.1
go: downloading github.com/hashicorp/go-version v1.2.0
go: downloading google.golang.org/grpc v1.41.0
go: downloading github.com/armon/go-metrics v0.3.9
go: downloading github.com/hashicorp/golang-lru v0.5.4
go: downloading go.uber.org/atomic v1.9.0
go: downloading github.com/armon/go-radix v1.0.0
go: downloading github.com/mitchellh/reflectwalk v1.0.0
go: downloading golang.org/x/text v0.3.7
go: downloading github.com/jcmturner/aescts/v2 v2.0.0
go: downloading github.com/mattn/go-colorable v0.1.6
go: downloading github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb
go: downloading github.com/oklog/run v1.0.0
go: downloading google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013
go: downloading github.com/hashicorp/go-immutable-radix v1.3.1
../../../go/pkg/mod/github.com/hashicorp/vault/sdk@v0.4.1/helper/pluginutil/run_config.go:13:2: //go:build comment without // +build comment

@pritamlipu1
Copy link
Author

pritamlipu1 commented Apr 9, 2022

@hsimon-hashicorp is it an issue with go version? or issue with go test? Should I use go 1.17? Please suggest.

Ref: #13579

@schultz-is
Copy link
Contributor

Howdy @pritamlipu1! Yes, upgrading to go 1.17 should fix the issue. There was a change in go 1.17 to prefer //go:build over // +build lines.

@hsimon-hashicorp
Copy link
Contributor

Hi @pritamlipu1 - please let us know if using Go 1.17 resolved this for you. Thanks! :)

@pritamlipu1
Copy link
Author

@schultz-is @hsimon-hashicorp Thank You for your inputs. Yes after upgrading to 1.17, its resolved. Hence closing this ticket.

@schultz-is
Copy link
Contributor

@pritamlipu1 Glad to hear that worked out for you. Thanks for the issue report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devex Developer Experience question
Projects
None yet
Development

No branches or pull requests

3 participants