-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/go: convert replacements in Gopkg.lock file #24087
Comments
That's true. The vgo importer is only trying to do a good job with the basic cases, not capture all the complexity possible in a Gopkg.lock. @sdboyer is planning to write a more advanced standalone converter for this kind of case. |
Change https://golang.org/cl/120075 mentions this issue: |
…lude statement Now modconv is only work with the basic cases, we need support "replace" and "exclude" from legacy config. In followup CLs, It will preserve replacements from glide and vendor.json. Updates golang/go#25556 Updates golang/go#24087 Change-Id: Ie5ca8df7f685177afea9cc7affcc6240b38223b5 Reviewed-on: https://go-review.googlesource.com/120075 Reviewed-by: Russ Cox <rsc@golang.org>
We've dropped the plans for the standalone converter - the go command does a good enough job that we should just fix whatever is left that it can handle but doesn't. (Many things in Gopkg.toml it can't handle, and that's OK too.) We should look into making cmd/go/internal/modconv handle the example in this report directly, though. Repurposing this issue. |
Maybe I can work on this, @rsc. |
@oiooj That'd be great, thanks. |
Change https://golang.org/cl/126915 mentions this issue: |
@oiooj - thanks for picking this up! A question - would your versions of
corresponding part from Gopkg.toml is:
Currently running |
@dmitris Thanks for your reminding, the change updated and this change not yet merged in the master. |
I see that @bcmills made last comments on Sep. 11 on https://go-review.googlesource.com/c/go/+/126915 - @oiooj do you plan to address them / update the patch? If you could use some help with getting the change to the merge, let me know, I may be able to spend some time on this. (I'm interested in this since we would like to convert a large number of |
@bcmills This still has the 1.12 milestone. Is it still being considered for 1.12? Seems to be a reasonably popular request that would help smooth out migration for some people. This has a CL from @oiooj that came in before the freeze, but of course we are deep into beta at this point, so I'm guessing it is 'no', but wanted to at least bounce the issue. (Separately, @dmitris also attempted an alternative fix in #25556). |
This isn't going to land for 1.12, sorry — the review slipped off my radar. We should try to have consistent replacement support (this and #25556) for 1.13. |
Hi, Another test case maybe. Looking here, that override is about a case where the original package (github.com/opencontainers/image-tools) has a bug that upstream can't / won't fix and there's a forked version with the fix at https://github.com/sylabs/image-tools.
The resulting
|
run a test with Gopkg.toml:
Gopkg.lock:
The output was a go.mod:
Based on this test, the patch seems to work as advertised and it would be great to get it in the go1.13 release. |
What version of Go are you using (
go version
)?go version go1.10 darwin/amd64 vgo:2018-02-20.1
What did you do?
Use vgo on an existing project which dependencies are pinned with
dep
tool. One dependency inGopkg.toml
hassource
attribute overriding source code location:This corresponds to the following section in
Gopkg.lock
file with revision being the one from the fork (with fork being ahead of original):Example program along with Gopkg.* files and
go.mod
derived from them by vgo can be found here: https://gist.github.com/artyom/3f73ca859f7476902ba4e1c78da0429dvgo tool imported metadata from Gopkg.* files, but ignored that
source
attribute.What did you expect to see?
Dependency location replacement being imported:
What did you see instead?
Dependency location replacement ignored:
The text was updated successfully, but these errors were encountered: