Skip to content
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

Incompatible tag in go.mod #11

Closed
alexedwards opened this issue May 6, 2019 · 4 comments
Closed

Incompatible tag in go.mod #11

alexedwards opened this issue May 6, 2019 · 4 comments

Comments

@alexedwards
Copy link

alexedwards commented May 6, 2019

When pulling through github.com/vardius/gorouter as a dependency, my go.mod file has the +incompatible tag:

module example.com

go 1.12

require github.com/vardius/gorouter v3.0.7-0.20190205101248-eab65e0a6301+incompatible

I think this is because the gorouter repository isn't following the module path conventions for v2+ repositories.

@vardius
Copy link
Owner

vardius commented May 6, 2019

Isn't it the fact that there is no go.mod file in this repository ?

I simply did not create it because this router has no dependencies, and I did not want to include in go.mod file packages I used for benchmarks. (not an issue anymore)

I think releasing major version v4.0.0 with a go.mod file should fix issue. Do you agree @alexedwards ?

@alexedwards
Copy link
Author

Kind of!

I beleive that the +incompatible tag isn't just because there's no go.mod file. Lot's of repositories don't have them, but will still pull through without the incompatible tag... so long as they are in v0 or v1. For example: https://github.com/bmizerany/pat.

My understanding is that the incompatible tag is appearing because Go knows that the gorouter repository is at v3.0.6, but the import path doesn't follow the convention of being github.com/vardius/gorouter/v3.

So if you're making a v4 release, then I think that initializing the go.mod file with go mod init github.com/vardius/gorouter/v4 should fix it.

I should have said in my first message, you've done really nice work on this package. I really like the design decisions you've made for the router and the documentation is excellent! : )

@vardius
Copy link
Owner

vardius commented May 7, 2019

I created new release https://github.com/vardius/gorouter/releases/tag/v4.0.0,

which seems to work correctly now https://github.com/vardius/go-api-boilerplate/blob/05ee7ccd28718b542ec67665e768e2a2a35666ef/go.mod#L15

Since now import router as import "github.com/vardius/gorouter/v4". Please update your imports.

@alexedwards
Copy link
Author

That works great now. Thanks for the fast fix 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants