refactor(ginrouter): extract to a separate module; drop gin from main go.mod#24
Merged
Conversation
… go.mod httpx/ginrouter is now its own Go module, so gin (and its sonic/golang-asm/ goccy/validator/json-iterator tree) leaves the main module's dependency graph entirely — go.mod/go.sum no longer reference gin, and `go list -m all` drops from 182 to 161 modules. The default build was already gin-free at link time since v1.19.0; this makes it gin-free at the module level too. The import path (.../httpx/ginrouter) is unchanged; it just versions independently and is fetched with its own `go get`. stdrouter (default) and chirouter stay inside the main module (chi has no transitive deps). Uses a local `replace` to the parent for in-repo development; at release this is pinned to a parent tag that no longer contains httpx/ginrouter. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes
httpx/ginrouterits own Go module so gin leaves the main module's dependency graph entirely.go.mod/go.sumno longer reference gin or its tree (sonic, golang-asm, goccy, validator, json-iterator);go list -m alldrops 182 → 161 modules.go get github.com/paulmanoni/nexuspulls none of gin's tree..../httpx/ginrouter); it versions independently and is fetched with its owngo get.stdrouter(default) +chirouterstay in the main module (chi has no transitive deps).Main module:
go build ./...green,go test ./...36 pkgs OK / 0 FAIL. The nested module uses a localreplacefor in-repo dev; at release it's pinned to a parent tag that no longer containshttpx/ginrouter.🤖 Generated with Claude Code