-
Notifications
You must be signed in to change notification settings - Fork 18k
x/vgo: vgo vendor doesn't complete with error: go.mod: go.mod:9: invalid module #24621
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
dupe of #24585 The issue is that vgo doesn't let you use packages >v1 that doesn't have a go.mod file. And so if a package doesn't have a go.mod file it's supposed to be using v0.0.0-yyyymmddhhmmss-commit instead. |
Closing as a dup of #24585. |
the difference here is that here I don't even have a go.mod file so not sure where should I change this?
|
You can try forking github.com/djherbis/nio and adding a go.mod file till it's fixed |
the strange thing is that I can't even find anything in prometheus importing this package prometheus already uses vendoring so it should be in the vendored directory. |
It's https://github.com/oklog/oklog/blob/5716cd64ee1c07e5b22113fb28d6121f80b8a24a/Gopkg.toml#L7 |
So although prometheus only uses Isn't this an incorrect behaviour? since the |
vgo matches modules. (a module is "a collection of packages versioned as a unit"). In this case, |
@AlexRouSg Hey, I'm the author of djherbis/nio. I've not used vgo, why would my package need to be 'fixed' with a go.mod file if I don't use vgo? |
@djherbis the answer won't fit on a single page :) I recommend watching https://www.youtube.com/watch?v=sbrZfPgNmfw |
@djherbis I think you've misunderstood my posts? I said there is a bug regarding packages using v2+ and if he didn't want to wait for the fix then he could either add a go.mod file to your package or manually create a go.mod file in his package with the correct version format since vgo is failing to create one. |
tl;dr; do I need to do something to my repo so people can use it, specifically vgo users? @AlexRouSg I'm sure I've misunderstood, when you said 'wait for the fix' it seemed to me like you might have been referring to my package, whereas now I'm guessing you mean a fix in vgo? @krasi-georgiev I think I understand the need for versioning/package management etc., though I haven't looked into vgos solution specifically (thanks for the links though). It seemed odd to me that my package/repo would need to be modified, just because a package which imports mine uses vgo. That would seem to pose a large burden to upgrade all existing Go repos to use vgo, if they are depended upon by a repo that uses vgo. Is this the case? |
in your particular case it is a bug in vgo which should be fixed soon. nothing needed from your side. |
@djherbis Yes I meant vgo. If you want to directly support vgo then all you have to do is Supporting vgo also means v1 and v2+ can/will and must live together. So if there are any changes you have to take to allow that then you should make those changes. Since the bug tracker is not for questions or discussions please post further questions in the proper places. https://github.com/golang/go/wiki/Questions Also read the blogs to get a better understanding of vgo https://research.swtch.com/vgo |
This has reappeared somehow. $ vgo build ./...
vgo: errors parsing go.mod:
/usr/local/google/home/cflewis/src/go/src/github.com/google/go-cloud/go.mod:46: invalid module: gopkg.in/yaml.v2 should be v1, not v2 (v2.2.1) gopkg.in/yaml.v2 does have a go.mod file. The |
This issue was fixed by CL 112277. |
The text was updated successfully, but these errors were encountered: