nancy: go get failing

Thanks for creating an issue! Please fill out this form so we can be sure to have all the information we need, and to minimize back and forth.

  • What are you trying to do?

go get -u github.com/sonatype-nexus-community/nancy

  • What feature or behavior is this required for?

  • How could we solve this issue? (Not knowing is okay!)

  • Anything else?

go: finding github.com/dgryski/go-farm latest
go: finding github.com/coreos/pkg latest
go: finding github.com/coreos/go-systemd latest
go: finding github.com/google/pprof latest
go: finding github.com/jstemmer/go-junit-report latest
go: finding github.com/tmc/grpc-websocket-proxy latest
go: finding golang.org/x/lint latest
go: finding google.golang.org/genproto latest
go: finding github.com/prometheus/client_model latest
go: finding golang.org/x/net latest
go: finding github.com/modern-go/concurrent latest
go: finding golang.org/x/sync latest
go: finding golang.org/x/oauth2 latest
go: finding golang.org/x/sys latest
go: finding github.com/logrusorgru/aurora latest
go: finding golang.org/x/mobile latest
go: finding golang.org/x/time latest
go: finding golang.org/x/exp latest
go: finding github.com/shopspring/decimal latest
go: finding golang.org/x/tools latest
go: finding github.com/armon/consul-api latest
go: finding golang.org/x/crypto latest
go: finding github.com/golang/glog latest
go: finding github.com/mwitkow/go-conntrack latest
go: finding github.com/kr/logfmt latest
go: finding github.com/xiang90/probing latest
go: finding github.com/BurntSushi/xgb latest
go: finding github.com/AndreasBriese/bbloom latest
go: finding gopkg.in/check.v1 latest
go: finding github.com/golang/groupcache latest
go: finding golang.org/x/image latest
go: finding github.com/alecthomas/units latest
go: finding github.com/alecthomas/template latest
go: finding github.com/dgryski/go-sip13 latest
# github.com/sonatype-nexus-community/nancy/audit
audit/auditlog.go:32:15: not enough arguments in call to aurora.Gray
	have (string)
	want (uint8, interface {})
# github.com/sonatype-nexus-community/nancy/ossindex
ossindex/ossindex.go:62:6: opts.Dir undefined (type func(string) badger.Options has no field or method Dir)
ossindex/ossindex.go:63:6: opts.ValueDir undefined (type func(string) badger.Options has no field or method ValueDir)
ossindex/ossindex.go:64:23: cannot use opts (type func(string) badger.Options) as type badger.Options in argument to badger.Open
ossindex/ossindex.go:161:16: txn.SetWithTTL undefined (type *badger.Txn has no field or method SetWithTTL)```

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 19 (8 by maintainers)

Most upvoted comments

Hmmmm, it was my understanding that go get <PKG> did not update the dependencies, does it do that? @zendern do you know?

So it doesn’t update the dependencies but if you haven’t had them before in your GOPATH its going to just grab the latest. I’m going to guess that is what happened.

I tested the following.

#wipes out any existing instances of badger depenencies
rm -rf $GOPATH/src/github.com/dgraph-io
#sets GO111MODULE to the default value which is auto
unset GO111MODULE
# see go get fail
go get -v github.com/sonatype-nexus-community/nancy

This blows up with the above error being reported.

#switch to instead having GO111MODULE to on
export GO111MODULE=on
# this should now succeed
go get -v github.com/sonatype-nexus-community/nancy

Now this will respect our go.mod file and make it actually work since its using the correct version of badger. I validated this while using golang 1.13.1 FWIW.

This is probably an instance of us needing to update the README to call out if you want go get to work to with nancy you are going to have to use GO111MODULE=on.