-
Notifications
You must be signed in to change notification settings - Fork 48
split packages as modules #119
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #119 +/- ##
=======================================
Coverage 90.40% 90.40%
=======================================
Files 36 36
Lines 1835 1835
=======================================
Hits 1659 1659
Misses 142 142
Partials 34 34
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ee44012
to
c4b0c82
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR converts the existing "swag" package into a multi-module mono repo, allowing consumers to depend only on the modules they need while maintaining backward compatibility through the legacy API.
- Updated documentation and README files to refer to “modules” instead of “packages” and describe the new testing instructions.
- Adjusted CI configuration and linters to accommodate the multi-module structure.
- Modified Dependabot settings to scan across multiple directories.
Reviewed Changes
Copilot reviewed 16 out of 28 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
doc.go | Updated docs to list modules (e.g. cmdutils, conv, fileutils, etc.) |
README.md | Revised module bullet list, dependency notes, and instructions for testing |
.golangci.yml | Added gomoddirectives linter to support modern module directive checks |
.github/workflows/go-test.yml | Modified test workflow to run tests in each module using find and pushd |
.github/dependabot.yaml | Updated dependency scan configuration to cover multiple directories |
Files not reviewed (12)
- cmdutils/go.mod: Language not supported
- conv/go.mod: Language not supported
- fileutils/go.mod: Language not supported
- go.mod: Language not supported
- jsonname/go.mod: Language not supported
- jsonutils/go.mod: Language not supported
- loading/go.mod: Language not supported
- mangling/go.mod: Language not supported
- netutils/go.mod: Language not supported
- stringutils/go.mod: Language not supported
- typeutils/go.mod: Language not supported
- yamlutils/go.mod: Language not supported
Comments suppressed due to low confidence (1)
README.md:23
- [nitpick] Consider reviewing the ordering of the module names in the README to ensure a consistent grouping (alphabetical or logical) for improved readability.
* Module `cmdutils`
README.md
Outdated
|
||
#### Note to contributors | ||
|
||
The usual `go test ./...` command, run from the root of this repo won't work any longer to test all submodules. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI go test work
will solve this in Go 1.25
But I know swag still supports Go 1.20... so...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know. I've see you're following that issue. Notice that "go test work" will partially solve this issue, since the go team seems still rather opposed to support the concept of mono-repos.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left this comment specifically for you... :)
This PR transforms the "swag" package into a mono repo, which exposes a collection of independant go modules. The objective is to reduce the footprint of required dependencies. To remain fully backward-compatible, the swag module imports all the newly created (sub) modules, for programs that consume its deprecated API. ci: ci automation, test coverage reporting and dependabot configuration have been adapted to support this new mono-repo structure. Signed-off-by: Frederic BIDON <[email protected]>
121e17c
to
525116a
Compare
This PR transforms the "swag" package into a mono repo, which exposes a collection of independant go modules.
The objective is to reduce the footprint of required dependencies.
To remain fully backward-compatible, the swag module imports all the newly created (sub) modules, for programs that consume its deprecated API.
ci: ci automation and bots configuration have been adapted to support this new mono-repo structure.