-
-
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
Readme seems to be confusing regarding versions #1292
Comments
Maybe this is the expected (v4 can not be used without gomodules) If so, I suggest updating the README.md in order to be clearer 👍 |
The README simply copied those notes about the versions from the official documentation, we did not come up with them on our own: https://github.com/golang/go/wiki/Modules#non-module-code-consuming-modules As you can see here: https://golang.org/doc/devel/release.html#go1.9.minor and here: https://go.googlesource.com/go/+/d4e21288e444d3ffd30d1a0737f15ea3fc3b8ad9 they clearly did backport some functionality to that version (and I assume the same for 1.10.3 though I did not check) in order to have it work with Go modules. That being said, while those versions do work with latest Echo just fine, there is indeed a mistake in the README in the sense that you cannot import it as v4, but have to use the regular import (without v4) suffix, which WILL in fact bring you the latest version of the library.
As you can see, latest Echo of version, including middleware, worked just fine with Go 1.9.7 in spite of the fact that internally (the middleware package) uses echo/v4 imports. I will make the clarification about the import path for older Go versions, vs new ones though, to make it clearer. Now whether you can lock the vN version of a Go module package from another dependency manager, that is entirely a question for the respective dependency manager, a question that was in fact asked already here: golang/dep#1962 Hope this helps! |
Thank you for that answer 👍 As you said, after the README update, the problem will be, indeed, in the dependency manager side. So regarding
I don't know if it is a good idea but, as a lot of go devs use dep, maybe it will be nice to add this behavior as a warning or something like this in the README ? |
to me a simple change from this :
to this:
it might be nothing but, imho, it is way clearer like this 👍 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Honestly, this change screw many people, like me, suffix are not supported by other tools, don't get me wrong, |
pin to |
Issue Description
That can be undestood as
Expected behaviour
import
github.com/labstack/echo/v4
using dep actually imports v4 versionActual behaviour
Steps to reproduce
Gopkg.toml
main.go
Version/commit
The text was updated successfully, but these errors were encountered: