-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Update the go.mod file to include a /v3 at the end of the module path in the module directive #1244
Comments
pinging @vishr since this is affecting a few of my projects as well ^^ |
Can you guys send a PR? |
@vishr yeah) |
For the record, there's quite a bit of chatter about this in PR #1253 I did a tiny POC here: https://github.com/alexaandru/modules that replicated this precise issue: 1. have some V2+ branch; 2. add go.mod to it without suffix 3. add suffix later. The result when you try to import it (with /v2 suffix as it should be) is:
so, half broken. It does resolve to the proper tag (v2.2.0, the last in the V2 line) however it also throws a cannot find module. The only resolution is to push the next vN, and release the vN at the same time with the vN.x.y tag (also tested on the POC repo and that worked as expected). To wrap it up, we're working on it and hope to get it back working ASAP. |
can we remove go.mod file on v3? start use go.mod from v4. |
@Delphier The problem is not in go.mod |
@im-kulikov actually the problem is in go.mod - the fact that it was introduced from the start on a v2+ repo without the /vN suffix. I'm just not sure if removing it would fix the problem... need to try it out on my POC. Just tested on my POC (https://github.com/alexaandru/modules), deleting go.mod will still not fix it. An app using Go modules will still fetch the version before go.mod was introduced (even if later, go.mod was removed, it still remains in history). So V4 is the only way to go at this point. |
@alexaandru I guess I didn't put it right. I meant that deleting the file doesn't solve the problem. |
i fork echo and tested it:
run |
Don't quite understand how removing go.mod solved the problem? |
You can repeat the experiment without deleting the file.. I suppose the result will be the same.. |
Actually in go module mode:
just v1 is omitted. becase tagged v1.x release with go.mod not found, v3.3.5 is last release without go.mod, so it is selected.
|
hm.. it make sense.. @alexaandru what you think? |
Sounds good to me, it can't make things worse :-) Worst case scenario: it still pulls v3.3.5, at least that's how it did in my POC, but seems that @Delphier got a different outcome. I'll give it a try... |
Yes, this fixed it! Thanks @Delphier @im-kulikov ! :-) Please confirm it works on your end as well, so we can close this ticket. Thanks again! |
@alexaandru works fine for now, I get github.com/labstack/echo v3.3.10+incompatible |
Awesome, thank you very much @cubic3d ! Closing this. |
works fine 😋 |
Thank you @Delphier :-) |
yay... it's work!
|
Thanks @im-kulikov ! :) |
Hi, just trying to understand. When I go get labstack/echo. I get the following on go.mod
I was hoping to get the latest version of 4.x. When I tried...
I don't get it. |
@louiemiranda Change github.com/labstack/echo to github.com/labstack/echo/v4 in go.mod and *.go file. |
thanks ! will try |
go version: 1.11.4
go.mod enabled.
go get github.com/labstack/echo
can't get the correct latest version. to get the version 3.3.5, but latest version is 3.3.8.in the latest golang modules wiki, need to Update the go.mod file to include a /v3 at the end of the module path in the module directive.
please review:
https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher
The text was updated successfully, but these errors were encountered: