Separate dependency management for submodules #190
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.
This PR aims to split out framework-specific submodules into submodules with their own
go.mod
/go.sum
files.The readme currently mentions that the current setup is by design, but a more modular setup does have an advantage. Any project using this library will only include dependencies for the specific frameworks in use, and not for all frameworks covered. This reduces the size of the dependency graph, but does not reduce compiled binary sizes in practice. Still, this is a great improvement since you won't have to pull in all dependencies when you e.g. build. This is especially important if you're dealing with resource / bandwidth limits, or dealing with dependency scanning / SBOMs as part of your security chain.
After this PR is merged, submodules have to be individually tagged, e.g.
middleware/gin/v0.1.0
,metrics/prometheus/v0.1.0
. The version can differ from the core module.