Git Product home page Git Product logo

Comments (19)

zendern avatar zendern commented on August 28, 2024 2

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.

from nancy.

logansam avatar logansam commented on August 28, 2024

Same problem here!

go version go1.12.7 darwin/amd64

from nancy.

marct83 avatar marct83 commented on August 28, 2024

go version go1.12.6 linux/amd64

from nancy.

DarthHater avatar DarthHater commented on August 28, 2024

Interesting! I imagine this is because of the version of Badger it fetches. I'll take a look today!

from nancy.

DarthHater avatar DarthHater commented on August 28, 2024

Fails locally for me too, I'll see if I can resolve it today! Thanks for pointing this out.

from nancy.

DarthHater avatar DarthHater commented on August 28, 2024

Ok, I know what is causing this. The go get -u is updating dependencies as it you know, downloads them, so we are ending up with a few dependencies that are too new! If you run go get without the u, it should work fine. I'll update the README.md to reflect that, too! Thanks for pointing out the mistake! Close this issue if it works fine for you!

from nancy.

marct83 avatar marct83 commented on August 28, 2024

Same error..

go get github.com/sonatype-nexus-community/nancy
# 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)

from nancy.

DarthHater avatar DarthHater commented on August 28, 2024

Interesting. When I do it locally I get: (base) 504 :~ $ go get github.com/sonatype-nexus-community/nancy go: finding github.com/sonatype-nexus-community/nancy v0.0.20 go: downloading github.com/sonatype-nexus-community/nancy v0.0.20 go: extracting github.com/sonatype-nexus-community/nancy v0.0.20

from nancy.

marct83 avatar marct83 commented on August 28, 2024

from nancy.

DarthHater avatar DarthHater commented on August 28, 2024

@marct83 are you trying to just get nancy to use it or to develop? I might rework the README a bit to better reflect some options for either. Interested in y'alls use case!

from nancy.

marct83 avatar marct83 commented on August 28, 2024

from nancy.

OSSIndex-Admin avatar OSSIndex-Admin commented on August 28, 2024

I am having the same problem on my Ubuntu Xenial (16.04) box. Perhaps I can help debug a bit.

from nancy.

OSSIndex-Admin avatar OSSIndex-Admin commented on August 28, 2024

FYI:

kduck@Gir:~/go/src/github.com/sonatype-nexus-community$ go version
go version go1.13 linux/amd64

from nancy.

zendern avatar zendern commented on August 28, 2024

@DarthHater I believe this issue can be closed now that #41 was merged.

from nancy.

jroberts07 avatar jroberts07 commented on August 28, 2024

I am still facing this:

➜  go version
go version go1.13 darwin/amd64
➜  go get github.com/sonatype-nexus-community/nancy
# github.com/sonatype-nexus-community/nancy/ossindex
../../../../go/src/github.com/sonatype-nexus-community/nancy/ossindex/ossindex.go:62:6: opts.Dir undefined (type func(string) badger.Options has no field or method Dir)
../../../../go/src/github.com/sonatype-nexus-community/nancy/ossindex/ossindex.go:63:6: opts.ValueDir undefined (type func(string) badger.Options has no field or method ValueDir)
../../../../go/src/github.com/sonatype-nexus-community/nancy/ossindex/ossindex.go:64:23: cannot use opts (type func(string) badger.Options) as type badger.Options in argument to badger.Open
../../../../go/src/github.com/sonatype-nexus-community/nancy/ossindex/ossindex.go:161:16: txn.SetWithTTL undefined (type *badger.Txn has no field or method SetWithTTL)
➜  

from nancy.

jroberts07 avatar jroberts07 commented on August 28, 2024

Caused by this breaking change in the latest release of Badger https://github.com/dgraph-io/badger/pull/874/files

from nancy.

DarthHater avatar DarthHater commented on August 28, 2024

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

from nancy.

marct83 avatar marct83 commented on August 28, 2024

I'm getting this:

# github.com/golang/dep/gps
../../../go/pkg/mod/github.com/golang/[email protected]/gps/constraint.go:149:4: undefined: semver.Constraint
# github.com/sonatype-nexus-community/nancy/ossindex
../../../go/pkg/mod/github.com/sonatype-nexus-community/[email protected]/ossindex/ossindex.go:62:6: opts.Dir undefined (type func(string) badger.Options has no field or method Dir)
../../../go/pkg/mod/github.com/sonatype-nexus-community/[email protected]/ossindex/ossindex.go:63:6: opts.ValueDir undefined (type func(string) badger.Options has no field or method ValueDir)
../../../go/pkg/mod/github.com/sonatype-nexus-community/[email protected]/ossindex/ossindex.go:64:23: cannot use opts (type func(string) badger.Options) as type badger.Options in argument to badger.Open
../../../go/pkg/mod/github.com/sonatype-nexus-community/[email protected]/ossindex/ossindex.go:161:16: txn.SetWithTTL undefined (type *badger.Txn has no field or method SetWithTTL)

from nancy.

jroberts07 avatar jroberts07 commented on August 28, 2024

Yep perfect, that solves it

from nancy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.