chore(dev): prepare to release individual packages#302
Conversation
This allows us to release each package in this workspace (monorepo) individually. ## Tags The tags will now be prefixed with the package name as it appears in the respective Cargo.toml: - cpp-linter/v2.0.0-rc.1 - cpp-linter-js/v2.0.0-rc.1 - cpp-linter-js/v2.0.0-rc.1 - clang-installer/v0.1.1 > [!IMPORTANT] > Publishing a release will still happen from the bump-n-release CI workflow's manual trigger (`workflow_dispatch`). > There's an added input to select which package to publish. ## Change Logs Each package will now have its own CHANGELOG.md file (alongside the Cargo.toml) `git-cliff` is now configured to only put relevant changes in each CHANGELOG.md. The relevant changes are determined by changed file's path. ## Binary builds I updated the binary-builds CI workflow to build both rust binary executables. Upon release, the binary executables matching the released package will be uploaded as release assets (for all supported build targets).
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 33 minutes and 28 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughIntroduces Nushell-based release tooling and a shared Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
.github/common.nu (1)
15-30: Theuv runparsing logic has a latent bug for valueless flags and--separator.Lines 15–30 assume every flag is followed by a value. For calls like
uv run --isolated cargo testoruv run -- cargo test, the parser incorrectly treatscargoas the flag's argument, advancing$indexpast it. This causes the wrapped command label to display asuv runinstead ofuv run cargo.This code path is currently unused (no
run-cmd uv runinvocations exist in the codebase), but the logic should be corrected if the pattern is adopted. Consider parsing flags more robustly—e.g., by checking for known valueless flags or explicitly handling--as a terminator.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/common.nu around lines 15 - 30, The loop in the uv run parsing (symbols: $sub_cmd, mut index, mut skip_val, for arg in ($cmd | skip 2)) incorrectly assumes every dash-prefixed flag has a value; change it to explicitly handle the '--' terminator and distinguish valueless flags: if arg == "--" break the loop; if arg starts-with "-" then check against a small set/lookup of known valueless flags (or treat common valueless forms) and only set skip_val = true when the flag requires a value; otherwise if skip_val is true then clear it and continue; update the iteration logic so $index only advances to consume an actual flag value, ensuring the later check ($cmd | get $index) correctly sees "cargo" when appropriate..github/workflows/binary-builds.yml (1)
6-15: Consider self-testing this workflow.Edits to
.github/workflows/binary-builds.ymlalone still won't trigger this workflow because the file itself is not in eitherpathsfilter. That makes future packaging changes easy to merge unvalidated.Also applies to: 18-24
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/binary-builds.yml around lines 6 - 15, The workflow's paths filter excludes the workflow file itself so edits to .github/workflows/binary-builds.yml won't trigger validation; update the paths: section to include the workflow file (e.g. add ".github/workflows/binary-builds.yml" or ".github/workflows/**" as an entry) so changes self-test, and mirror the same change for the other paths block referenced around lines 18-24; modify the paths: entries in the existing binary-builds.yml to include the workflow file pattern while keeping the existing cpp-linter/ and clang-installer/ entries intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/binary-builds.yml:
- Around line 160-168: The tar commands are archiving ${tgt} but the executables
were renamed to ${tgt}.exe by the mv commands; update the two tar invocations
that reference ${tgt} to instead reference ${tgt}.exe so they match the actual
filenames on disk (the relevant symbols are the $tgt variable, the mv
"target/.../${tgt}.exe" -> "${tgt}.exe" lines, and the tar -a -c -v -f
"${arc_name}" ${tgt} calls).
In @.github/workflows/bump-n-release.yml:
- Around line 89-92: The workflow step is calling a filename instead of the
exported Nushell function, so replace the invalid call to get-changed-pkgs.nu
with a call to the exported function get-changed-pkgs (i.e., assign pkgs =
get-changed-pkgs after sourcing bump-n-release.nu), ensure the resulting pkgs
value is written to $GITHUB_OUTPUT as before (pkgs=($pkgs)\n | save --append
$env.GITHUB_OUTPUT) so downstream jobs like update-changelog receive the output.
---
Nitpick comments:
In @.github/common.nu:
- Around line 15-30: The loop in the uv run parsing (symbols: $sub_cmd, mut
index, mut skip_val, for arg in ($cmd | skip 2)) incorrectly assumes every
dash-prefixed flag has a value; change it to explicitly handle the '--'
terminator and distinguish valueless flags: if arg == "--" break the loop; if
arg starts-with "-" then check against a small set/lookup of known valueless
flags (or treat common valueless forms) and only set skip_val = true when the
flag requires a value; otherwise if skip_val is true then clear it and continue;
update the iteration logic so $index only advances to consume an actual flag
value, ensuring the later check ($cmd | get $index) correctly sees "cargo" when
appropriate.
In @.github/workflows/binary-builds.yml:
- Around line 6-15: The workflow's paths filter excludes the workflow file
itself so edits to .github/workflows/binary-builds.yml won't trigger validation;
update the paths: section to include the workflow file (e.g. add
".github/workflows/binary-builds.yml" or ".github/workflows/**" as an entry) so
changes self-test, and mirror the same change for the other paths block
referenced around lines 18-24; modify the paths: entries in the existing
binary-builds.yml to include the workflow file pattern while keeping the
existing cpp-linter/ and clang-installer/ entries intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0987a8a6-755d-4834-b6ba-6c6594db824c
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (40)
.github/common.nu.github/workflows/binary-builds.yml.github/workflows/bump-n-release.nu.github/workflows/bump-n-release.yml.github/workflows/bump_version.py.github/workflows/node-js-packaging.yml.github/workflows/pre-commit-hooks.yml.github/workflows/python-packaging.yml.gitignoreCONTRIBUTING.mdCargo.tomlbindings/node/CHANGELOG.mdbindings/node/Cargo.tomlbindings/python/CHANGELOG.mdbindings/python/Cargo.tomlclang-installer/CHANGELOG.mdclang-installer/Cargo.tomlclang-installer/README.mdclang-installer/src/downloader/mod.rsclang-installer/src/downloader/pypi.rsclang-installer/src/tool.rscpp-linter/CHANGELOG.mdcpp-linter/CHANGELOG.old.mdcpp-linter/Cargo.tomlcpp-linter/clippy.tomlcpp-linter/src/clang_tools/clang_format.rscpp-linter/src/clang_tools/clang_tidy.rscpp-linter/src/cli/mod.rscpp-linter/src/cli/structs.rscpp-linter/src/run.rscspell.config.ymldocs/Cargo.tomldocs/docs/changelog.mddocs/docs/changelog/clang-installer.mddocs/docs/changelog/cpp-linter-js.mddocs/docs/changelog/cpp-linter-py.mddocs/docs/changelog/cpp-linter.mddocs/license_gen.pydocs/mkdocs.ymlnurfile
💤 Files with no reviewable changes (4)
- cpp-linter/clippy.toml
- Cargo.toml
- docs/docs/changelog.md
- .github/workflows/bump_version.py
fb386b1 to
197138f
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #302 +/- ##
=======================================
Coverage 92.60% 92.60%
=======================================
Files 26 26
Lines 4339 4339
=======================================
Hits 4018 4018
Misses 321 321 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4bc0449 to
ecce6b2
Compare
This allows us to release each package in this workspace (monorepo) individually.
Tags
The tags will now be prefixed with the package name as it appears in the respective Cargo.toml:
Important
Publishing a release will still happen from the bump-n-release CI workflow's manual trigger (
workflow_dispatch).There's an added input to select which package to publish.
Change Logs
Each package will now have its own CHANGELOG.md file (alongside the Cargo.toml)
git-cliffis now configured to only put relevant changes in each CHANGELOG.md. The relevant changes are determined by changed file's path.Binary builds
I updated the binary-builds CI workflow to build both rust binary executables. Upon release, the binary executables matching the released package will be uploaded as release assets (for all supported build targets).
Summary by CodeRabbit
New Features
Documentation
Chores