Skip to content

sourcegraph.com/sourcegraph/go-diff@v0.5.1: parsing go.mod: unexpected module path "github.com/sourcegraph/go-diff" #35

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

Closed
johnwyles opened this issue Apr 19, 2019 · 4 comments

Comments

@johnwyles
Copy link

When running "go get -u" for github.com/johnwyles/vrddt-reboot:

sourcegraph.com/sourcegraph/go-diff@v0.5.1: parsing go.mod: unexpected module path "github.com/sourcegraph/go-diff"

@dmitshur
Copy link
Contributor

Thanks for reporting. This is an issue that needs to be fixed in the github.com/johnwyles/vrddt-reboot project. It needs to start importing go-diff via its new import path github.com/sourcegraph/go-diff/diff. It has recently changed, see PR #30.

The old import path can only be used at v0.5.0 or older. go get -u tries to upgrade to the latest version, which is only valid at the new import path.

@johnwyles
Copy link
Author

You are correct; I am new to go modules but basically I was able to clear this out by rm-ing the go.mod and starting fresh with a new go mod init. I am unsure which package was updated that this came from and how it became an issue but thank you for clearing that up. I will close this issue now :)

@ian-howell
Copy link

I'm still running into this issue when running go get -u on https://github.com/ian-howell/airshipctl. Refreshing the go.mod file doesn't seem to have helped. Further, github.com/sourcegraph/go-diff isn't even listed in my go.mod file. Any ideas?

@dmitshur
Copy link
Contributor

dmitshur commented May 19, 2019

@ian-howell It's not showing up in your go.mod file because you're requiring it indirectly, not directly.

Specifically, you're requiring the module github.com/golangci/golangci-lint at version v1.16.0, see here. That module version requires go-diff at its previous path, see here. This has been fixed on master branch of golangci-lint via PR golangci/golangci-lint#487, but a new release tag hasn't been made yet. You should ask them to make one, and update to it (or use a newer pseudo-version from master branch).

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

3 participants