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

[WIP] chi v4 + Go modules #379

Closed
wants to merge 6 commits into from
Closed

[WIP] chi v4 + Go modules #379

wants to merge 6 commits into from

Conversation

VojtechVitek
Copy link
Contributor

@VojtechVitek VojtechVitek commented Jan 8, 2019

Fixes #302

  • chi v4 requires Go 1.10.3+ (or Go 1.9.7+)
  • chi v4 is a Go module and thus breaks the import path; use github.com/go-chi/chi/v4 and github.com/go-chi/chi/v4/middleware

Upgrading your codebase from chi v3.x to chi v4

Example using GNU find (brew install find):

$ find . -type f -name '*.go' -not -path "./vendor/*" -exec sed -i 's+github.com/go-chi/chi+github.com/go-chi/chi/v4+g' {} \;

We recommend vendoring the dependencies via GO111MODULE=on go mod vendor && GO111MODULE=on go mod tidy.

If your repository still pulls in the old import path, you can figure out why by running GO111MODULE=on go mod why github.com/go-chi/chi.

@VojtechVitek VojtechVitek changed the title chi v4 + Go modules [WIP] chi v4 + Go modules Jan 8, 2019
@VojtechVitek VojtechVitek force-pushed the v4-dev-go-mod branch 3 times, most recently from 2dd9927 to e59c4a1 Compare January 8, 2019 22:33
@VojtechVitek
Copy link
Contributor Author

This PR was rejected by the main chi author. He doesn't like the idea of changing the import paths because of Go modules support (ie. github.com/go-chi/chi/v4) and become a tech support for the confused chi users. So we're keeping it simple and chi stays on +incompatible flag for now.

@pkieltyka pkieltyka mentioned this pull request Jan 10, 2019
5 tasks
@pkieltyka pkieltyka deleted the v4-dev-go-mod branch November 25, 2020 03:10
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

Successfully merging this pull request may close these issues.

1 participant