-
Notifications
You must be signed in to change notification settings - Fork 58
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
Support Go Modules not properly integrated #66
Comments
If you don't do this for modules with a major version >1, module support will be broken.
You can still do this; the /v5 is a virtual component of the path, the package name is still httptreemux, so that import you're using ( All versions of Go from 1.9.7+, 1.10.3+, and higher major versions understand the /v5 in the import path, so if you're using a version of Go that's supported and receiving security updates (1.10 or 1.11) you should be fine.
Only on major version releases that break backwards compatibility, in which case having them have two different import lines means you can include both temporarily while you upgrade (eg. you can import /v5 in one place and /v6 in another).
That is still below version 2; you don't include the major version in the path for v1 modules. If you're having some specific problem with this package, please post the error message and I'll be happy to assist you if it's a modules problem. Thanks! |
Thanks, Sam, for the detailed explanation. Unfortunately I can't reset to version 1 since that would break things for everyone else using an older version of the package with some other dependency manager. And even if I did, if I had to make a breaking change in the future, then the version suffix would come back again. This is just how Go modules works, so I'll close this issue. On the bright side, this package is pretty much in maintenance mode, so breaking changes are pretty rare. |
I think you misunderstood, you don't have to reset to version 1, things will just keep working. Unless I'm misunderstanding something? EDIT: nevermind, given that it's already on v5 I must have misunderstood and that was a reply to the OP. |
Yeah, I wrote it in a confusing way, but it was directed toward OP :) |
I think integration of go modules is good but i think it should not include version/release in path
module github.com/dimfeld/httptreemux/v5
Issues I have with that is all my code import path was based on github.com/dimfeld/httptreemux and i can used to just call httptreemux.NAME OF FUNC now i have to change all my import path for httptreemux by adding alias like
import httptreemux "github.com/dimfeld/httptreemux/v5"
also in case of creating new version/release you have to change path ?
please take a looks this example: https://github.com/lib/pq
The text was updated successfully, but these errors were encountered: