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

Fails to install because of github.com/golang/dep #275

Open
arvenil opened this issue Oct 5, 2023 · 4 comments
Open

Fails to install because of github.com/golang/dep #275

arvenil opened this issue Oct 5, 2023 · 4 comments

Comments

@arvenil
Copy link

arvenil commented Oct 5, 2023

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/[email protected]/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/[email protected]/gps/constraint.go:122:15: invalid operation: c (variable of type *semver.Constraints) is not an interface
../go/pkg/mod/github.com/golang/[email protected]/gps/constraint.go:136:19: undefined: semver.NewConstraintIC
../go/pkg/mod/github.com/golang/[email protected]/gps/constraint.go:149:11: undefined: semver.Constraint
../go/pkg/mod/github.com/golang/[email protected]/gps/constraint.go:193:14: undefined: semver.IsNone
../go/pkg/mod/github.com/golang/[email protected]/gps/constraint.go:198:14: undefined: semver.IsNone
../go/pkg/mod/github.com/golang/[email protected]/gps/constraint.go:206:15: undefined: semver.IsNone
../go/pkg/mod/github.com/golang/[email protected]/gps/vcs_source.go:388:24: invalid operation: tv.sv.Major() == s.major (mismatched types int64 and uint64)
../go/pkg/mod/github.com/golang/[email protected]/gps/vcs_source.go:406:21: invalid operation: sv.Major() != s.major (mismatched types int64 and uint64)
../go/pkg/mod/github.com/golang/[email protected]/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/[email protected]/gps/vcs_source.go:422:11: too many errors
@bhamail
Copy link
Contributor

bhamail commented Aug 7, 2024

@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. :)

@arvenil
Copy link
Author

arvenil commented Aug 7, 2024

I meant github.com/golang/dep is dead :d

@arvenil
Copy link
Author

arvenil commented Aug 7, 2024

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.

@bhamail
Copy link
Contributor

bhamail commented Aug 7, 2024

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.

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

No branches or pull requests

2 participants