-
Notifications
You must be signed in to change notification settings - Fork 48
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
Rename of repository not handled well #34
Comments
As a workaround, adding this to my go.mod helps:
However, that only works for this particular version. On any subsequent update, the line must be updated again... |
Sorry for the trouble with this rename. @dmitshur do you have any thoughts here? |
Relevant: golang/go#30831 @matthijskooijman Could you post a |
@jadekler does this help?
|
FWIW, There is a similar issue with the |
That's useful but unfortunately is not showing me who is pulling in the old version of golang.org/x/build (which itself is pulling in the old |
before running the upgrade, it seems I have not dependencies on sourcegraph/go-diff at all (only sergi/go-diff):
after running the upgrade (with the workaround from #34 (comment)), it seems that for me, it is also
However, there is a more recent version available that no longer depends on x/build since version 0.37.3 (Which makes some other changes to (fix issues around lint](golang/go#30833 (comment)) as well). I'm not quite sure why my mod graph still includes 0.36.0 rather than the latest version (since I did run I can trace this a bit further:
I'm not sure how to quickly see the golang.org/x/tools source, but the next step in the list is github.com/gobuffalo/gogen which does not seem to have a go.mod file. AFAIU, this means that an implicit one using the latest versions is used and made explicit in my project's go.mod file (AFAIK these are the
I'm still confused. I put up the full For completeness:
(Also, AFAIU the underlying problem in go is that it looks at older versions of dependencies too closely, which is the subject of golang/go#30831. Until that is fixed, the workaround is to remove problematic versions out of your mod graph completely, which is what we're trying to do there I suppose...) |
@matthijskooijman Looks like the latest version of
That go get output is from Go tip (1.13 in development). |
Agree. However, this may not be easy to achieve.
The |
Ah, just noticed that the latest version of gogen has no go.mod file, but an earlier versions has one (and references an older version of x/tools).
Thanks. It indeed seems that the rest of the chain is already updated (or has its go.mod file removed, which should also work I guess). However, I would expect that adding this to my go.mod would then fix things:
(which is the dependency update that would need to happen in side buffalo-plugins). However, this does not seem to help, I still get the same error on |
Yup, there were a few more paths. I opened gobuffalo/buffalo-plugins#18 and @markbates has responded like lightning and published a fixed version. With that, I can upgrade as expected again (though I did have to manually upgrade buffalo-plugins once before running |
This updates all (indirect) dependencies to their latest versions. There is a problem in go (hopefully will be fixed in 1.13). This problem causes problems when modules are renamed or moved and manifested with the go-diff and lint packages. The problem has been worked around in various packages, but this requires manually updating some packages before doing a full update. This commit was generated using: go get -u -m github.com/gobuffalo/buffalo-plugins go get -u -m go mod tidy See also: - golang/go#30831 - sourcegraph/go-diff#34 - golang/lint#446
Sorry for the delayed reply. I've checked the dependency graph that referenced the old version of go-diff. In my case, it is related to the lileio/pubsub module, which depends on an old version of Google's GRPC, which (...) depends on an outdated version of go-diff. I'm re-evaluating some of the dependencies of my little project, to avoid such a graph. 😵 |
For anyone looking to solve this problem, @jadekler has written (somewhat extensively) about this issue and how to fix it at https://github.com/golang/go/wiki/Resolving-Problems-From-Modified-Module-Path. |
This might actually be a bug in go, but I'm reporting it here anyway, since this breaks things here for now.
Recently, this library movied from sourcegraph to github. However, using the old sourcegraph.com name is now broken:
The obvious fix is to just use the new github.com import path, but this is not always trivial. In particular, when go-diff is pulled in by a dependency that has the old url, running
go get -u
to update dependencies fails with the same error.I guess that the problem is that go does not gracefully support updating to a new version in this case and updating across a rename (so 0.5.0 -> 0.5.1) needs changing of the import path. I can't see an easy way to fix this on the go side of things, so perhaps the fix here is to have sourcegraph.com not publish the 0.5.1 release (only 0.5.0), though that would also mean that people might never realize they're using an outdated version...
(also, I couldn't actually find the code on sourcegraph.com anymore, http://sourcegraph.com/sourcegraph/go-diff gives a 404, but apparently go get still manages to access the files)
The text was updated successfully, but these errors were encountered: