Comments (19)
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.
Same problem here!
go version go1.12.7 darwin/amd64
from nancy.
go version go1.12.6 linux/amd64
from nancy.
Interesting! I imagine this is because of the version of Badger it fetches. I'll take a look today!
from nancy.
Fails locally for me too, I'll see if I can resolve it today! Thanks for pointing this out.
from nancy.
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.
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.
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.
from nancy.
@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.
from nancy.
I am having the same problem on my Ubuntu Xenial (16.04) box. Perhaps I can help debug a bit.
from nancy.
FYI:
kduck@Gir:~/go/src/github.com/sonatype-nexus-community$ go version
go version go1.13 linux/amd64
from nancy.
@DarthHater I believe this issue can be closed now that #41 was merged.
from nancy.
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.
Caused by this breaking change in the latest release of Badger https://github.com/dgraph-io/badger/pull/874/files
from nancy.
Hmmmm, it was my understanding that go get <PKG>
did not update the dependencies, does it do that? @zendern do you know?
from nancy.
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.
Yep perfect, that solves it
from nancy.
Related Issues (20)
- Add SARIF support HOT 1
- fix dpkg warning: missing 'Maintainer' field
- TLS Handsake Timeout error HOT 2
- Nancy produces invalid JSON again and again [bug] HOT 1
- False positive due to circular dependency HOT 4
- Homebrew: Calling bottle :unneeded is deprecated HOT 3
- Running nancy in Azure DevOps requires bash to be present in the image HOT 4
- Nancy does not respect replace directive HOT 1
- Replace directive is based on the to be replaced module path not the one which replacing it HOT 4
- Q. has any thought been given to scanning for core library vulnerabilities? HOT 2
- go install does not work - complains about replace directive HOT 3
- Install failed with go 1.18 on darwin HOT 3
- Wrong brew tap on gonancy.dev HOT 1
- Is returning 500 error when accessing OSS Index HOT 20
- Update version string to have "v" prefix expected by OSSIndex
- Task execution failure HOT 1
- Subpackages with different versions are incorrectly flagged HOT 8
- Readme: Relation to govulncheck HOT 3
- Wrongly reports runc 1.1.5 as vulnerable
- Fails to install because of github.com/golang/dep HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nancy.