Fails to install because of github.com/golang/dep
arvenil opened this issue · 4 comments
Why do you still require github.com/golang/dep
? This project is dead.
% go install github.com/sonatype-nexus-community/nancy
# github.com/golang/dep/gps
../go/pkg/mod/github.com/golang/dep@v0.5.4/gps/constraint.go:103:25: cannot use sv (variable of type *semver.Version) as semver.Version value in struct literal
../go/pkg/mod/github.com/golang/dep@v0.5.4/gps/constraint.go:122:15: invalid operation: c (variable of type *semver.Constraints) is not an interface
../go/pkg/mod/github.com/golang/dep@v0.5.4/gps/constraint.go:136:19: undefined: semver.NewConstraintIC
../go/pkg/mod/github.com/golang/dep@v0.5.4/gps/constraint.go:149:11: undefined: semver.Constraint
../go/pkg/mod/github.com/golang/dep@v0.5.4/gps/constraint.go:193:14: undefined: semver.IsNone
../go/pkg/mod/github.com/golang/dep@v0.5.4/gps/constraint.go:198:14: undefined: semver.IsNone
../go/pkg/mod/github.com/golang/dep@v0.5.4/gps/constraint.go:206:15: undefined: semver.IsNone
../go/pkg/mod/github.com/golang/dep@v0.5.4/gps/vcs_source.go:388:24: invalid operation: tv.sv.Major() == s.major (mismatched types int64 and uint64)
../go/pkg/mod/github.com/golang/dep@v0.5.4/gps/vcs_source.go:406:21: invalid operation: sv.Major() != s.major (mismatched types int64 and uint64)
../go/pkg/mod/github.com/golang/dep@v0.5.4/gps/vcs_source.go:422:11: cannot use sv (variable of type *semver.Version) as semver.Version value in assignment
../go/pkg/mod/github.com/golang/dep@v0.5.4/gps/vcs_source.go:422:11: too many errors
@arvenil I didn't really understand what the go install URL
command does, and I finally got a chance to try it out today. My go version is:
% go version
go version go1.21.4 darwin/amd64
And this version suggests added the @latest
suffix to the command:
% go install github.com/sonatype-nexus-community/nancy
go: 'go install' requires a version when current directory is not in a module
Try 'go install github.com/sonatype-nexus-community/nancy@latest' to install the latest version
which succeeds without error, but doesn't really appear to "do" much:
% go install github.com/sonatype-nexus-community/nancy@latest
% echo $?
0
Perhaps you could say more about what you were trying to do? The project may be slow, be not quite dead. :)
I meant github.com/golang/dep
is dead :d
I have this issue in the context of module, and my go.mod requires indirectly github.com/Masterminds/semver v1.5.0
where this package requires github.com/Masterminds/semver v0.0.0-20190925130524-317e8cce5480
. Somehow this leads to reported issue. If you are not ready to drop support for archived and obsolete github.com/golang/dep
(no clue why), maybe an update of github.com/Masterminds/semver
to 1.5.0
would fix the issue as well - but still, I don't see a reason to keep supporting github.com/golang/dep
since the project is dead for ~5 years.
I meant
github.com/golang/dep
is dead :d
Oh, I see. Nancy does use github.com/golang/dep
to get a list of purls for the project: root.go -> getPurlsFromPath()
Open to better suggestions. Not sure how to do the same with modules.