-
Notifications
You must be signed in to change notification settings - Fork 18k
x/vgo: decide how much to support gopkg.in #24099
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
Comments
OK, I see what's happening now. It's not grokking the major-version-in-path of gopkg.in.
I get this go.mod file:
So I titled this issue wrong; it is possible to use gopkg.in with a major version > 1, although the behaviour is still not correct. Interestingly, the go.mod file does not contain all the dependencies that I'd expect. For example, it contains |
require "gopkg.in/yaml.v2/v2" works, sort of - it still includes the "gopkg.in/yaml.v2 v1.1.0-gopkg-v2.1.0" - see #24094 |
"Properly" is a loaded word, but it should work at least a little better than it does right now. In the original case the v2.1.0 should probably just be rewritten transparently to v1.1.0-gopkgin-v2.1.0, because we know this is gopkg.in. I'm going to leave this bug open to track deciding what level of gopkg.in support we want. Maybe we should actually just allow v2.1.0 instead of the funny pseudo-version.
It contains a simplified list of dependencies, omitting those implied by the ones already listed. Because charm.v6's dependencies.tsv lists the exact version of gopkg.in/yaml.v2 that the build chose, it lists charm.v6 in the go.mod and stops there. |
Change https://golang.org/cl/107658 mentions this issue: |
After initial vgo build and go.mod (from empty state) generation, I get
in go.mod file (which is expected now), on the second
|
this is still happening to me
|
Agreed still doesn't work for me either
|
Can we reopen this issue? I'm seeing the same issue as @kron4eg above. |
I get the same with |
same problem with elastic
And if I remove line with elastic from go.mod it builds. |
I also see this issue. |
This addresses an issue where Parsing of `go.mod` with modules from `gopkg.in` fails. The `go.mod` file is produced automatically, so the first time something like `vgo build` is run (before `go.mod` is created), it succeeds, but the second time it is run, it fails. This fixes the latest issues described in golang/go#24099 The funcs `parseGopkgIn` and `dotV` were pulled in (and slightly modified/simplified) from `vendor/cmd/go/internal/modfetch/gopkgin.go`. I'm sure that this is not the best way to handle the special case of `gopkg.in` (especially compared to the effort put into creating the `VersionFixer`), but it's a starting point that has test cases that prove the autogenerated `go.mod` file can't be parsed. Fixes #24099 Signed-off-by: Joshua Rubin <joshua@rubixconsulting.com>
This addresses an issue where Parsing of `go.mod` with modules from `gopkg.in` fails. The `go.mod` file is produced automatically, so the first time something like `vgo build` is run (before `go.mod` is created), it succeeds, but the second time it is run, it fails. This fixes the latest issues described in golang/go#24099 The funcs `parseGopkgIn` and `dotV` were pulled in (and slightly modified/simplified) from `vendor/cmd/go/internal/modfetch/gopkgin.go`. I'm sure that this is not the best way to handle the special case of `gopkg.in` (especially compared to the effort put into creating the `VersionFixer`), but it's a starting point that has test cases that prove the autogenerated `go.mod` file can't be parsed. Fixes #24099 Signed-off-by: Joshua Rubin <joshua@rubixconsulting.com>
This addresses an issue where Parsing of `go.mod` with modules from `gopkg.in` fails. The `go.mod` file is produced automatically, so the first time something like `vgo build` is run (before `go.mod` is created), it succeeds, but the second time it is run, it fails. This fixes the latest issues described in golang/go#24099 The funcs `parseGopkgIn` and `dotV` were pulled in (and slightly modified/simplified) from `vendor/cmd/go/internal/modfetch/gopkgin.go`. I'm sure that this is not the best way to handle the special case of `gopkg.in` (especially compared to the effort put into creating the `VersionFixer`), but it's a starting point that has test cases that prove the autogenerated `go.mod` file can't be parsed. Fixes #24099 Change-Id: Ie0bee2a50b330a9f85c1459ff6eb0bfa43058bf1 GitHub-Last-Rev: f608544 GitHub-Pull-Request: #4 Reviewed-on: https://go-review.googlesource.com/112277 Reviewed-by: Russ Cox <rsc@golang.org>
Fixed by recent CL. |
What version of Go are you using (
go version
)?go version devel +104445e Wed Feb 7 19:22:09 2018 +0000 linux/amd64 vgo:2018-02-20.1
What did you do?
If I change the module name in the requirements to "gopkg.in/yaml/v2", I see this output:
The text was updated successfully, but these errors were encountered: