Skip to content

chore(dev): prepare to release individual packages#302

Merged
2bndy5 merged 2 commits intomainfrom
seperate-tags
Apr 16, 2026
Merged

chore(dev): prepare to release individual packages#302
2bndy5 merged 2 commits intomainfrom
seperate-tags

Conversation

@2bndy5
Copy link
Copy Markdown
Collaborator

@2bndy5 2bndy5 commented Apr 16, 2026

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).

Summary by CodeRabbit

  • New Features

    • Automated, tag-driven release and version-bump tooling for all products; multi-binary packaging and separate product artifacts.
    • Shared command helper used across CI scripts for consistent command display and timing.
  • Documentation

    • Per-product changelogs and docs reorganized into dedicated pages; added initial CHANGELOGs for bindings and installer.
    • Contributing guide updated with nushell (nur/yarn) instructions.
  • Chores

    • CI workflows refined to target product-specific tag patterns and workspace-wide linting.

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).
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 16, 2026

Warning

Rate limit exceeded

@2bndy5 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 33 minutes and 28 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ce566cc7-5d50-427c-9588-30d8a85b91a1

📥 Commits

Reviewing files that changed from the base of the PR and between 50c2233 and 9499b69.

📒 Files selected for processing (3)
  • .github/workflows/binary-builds.yml
  • .github/workflows/bump-n-release.yml
  • benchmark/benchmark.nu

Walkthrough

Introduces Nushell-based release tooling and a shared run-cmd helper; splits per-package changelogs and docs; decouples crate versions from workspace inheritance; updates GitHub Actions to per-package tag gating and multi-binary artifact publishing; and scopes Clippy unwrap allowances to test modules.

Changes

Cohort / File(s) Summary
Release tooling & shared helpers
.github/common.nu, .github/workflows/bump-n-release.nu, .github/workflows/bump-n-release.yml, .github/workflows/bump_version.py
Added shared Nushell run-cmd and new .github/workflows/bump-n-release.nu (replacing Python bump script). Workflow updated to call Nushell script; removed .github/workflows/bump_version.py.
Workflows: builds & publishing
.github/workflows/binary-builds.yml, .github/workflows/node-js-packaging.yml, .github/workflows/python-packaging.yml
Builds now produce artifacts for two bins (cpp-linter, clang-tools); publish jobs gated by package-specific tag prefixes (cpp-linter/*, cpp-linter-js/*, cpp-linter-py/*) and select artifacts dynamically.
nur integration & run-cmd usage
nurfile, benchmark/benchmark.nu, benchmark/benchmark.nu (import change)
Removed local run-cmd from nurfile, now use .github/common.nu run-cmd; benchmark and other scripts import shared helper. Also adjusted clippy invocation in nur lint.
Package manifests & packaging metadata
Cargo.toml, bindings/node/Cargo.toml, bindings/python/Cargo.toml, cpp-linter/Cargo.toml, clang-installer/Cargo.toml, docs/Cargo.toml
Switched several crates from version.workspace = true to explicit version = "2.0.0-rc15"/"0.1.0"; added package.metadata.binstall.pkg-url for cpp-linter and clang-installer.
Changelogs & docs navigation
bindings/node/CHANGELOG.md, bindings/python/CHANGELOG.md, clang-installer/CHANGELOG.md, cpp-linter/CHANGELOG.md, docs/docs/changelog.md, docs/docs/changelog/*.md, docs/mkdocs.yml
Added per-package CHANGELOGs and new docs pages; removed consolidated docs changelog and updated MkDocs nav to group per-package changelogs.
Clippy/test linting adjustments
cpp-linter/clippy.toml, cpp-linter/src/clang_tools/..., cpp-linter/src/cli/..., cpp-linter/src/run.rs, .github/workflows/pre-commit-hooks.yml
Removed global allow-unwrap-in-tests in config; added #![allow(clippy::unwrap_used)] at test-module scope in multiple test modules; CI clippy now runs --all-features --all-targets.
Docs, license generation & misc
docs/license_gen.py, CONTRIBUTING.md, .gitignore, cspell.config.yml, clang-installer/README.md, bindings/*/CHANGELOG.md, clang-installer/src/downloader/*, clang-installer/src/tool.rs
Added ReleaseNotes.md to .gitignore, updated contributing docs (nur/yarn), extended license generator to include clang-installer deps, adjusted test-print calls, and small README/doc fixes.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

enhancement, documentation, dependencies

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main objective of the PR: preparing the workspace to support releasing individual packages from the monorepo, which is reflected across all the significant changes including new per-package CHANGELOGs, modified workflows for package-specific release tagging, and updated CI scripts.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch seperate-tags

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (2)
.github/common.nu (1)

15-30: The uv run parsing 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 test or uv run -- cargo test, the parser incorrectly treats cargo as the flag's argument, advancing $index past it. This causes the wrapped command label to display as uv run instead of uv run cargo.

This code path is currently unused (no run-cmd uv run invocations 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.yml alone still won't trigger this workflow because the file itself is not in either paths filter. 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

📥 Commits

Reviewing files that changed from the base of the PR and between 35ed52e and d8a6c74.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is 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
  • .gitignore
  • CONTRIBUTING.md
  • Cargo.toml
  • bindings/node/CHANGELOG.md
  • bindings/node/Cargo.toml
  • bindings/python/CHANGELOG.md
  • bindings/python/Cargo.toml
  • clang-installer/CHANGELOG.md
  • clang-installer/Cargo.toml
  • clang-installer/README.md
  • clang-installer/src/downloader/mod.rs
  • clang-installer/src/downloader/pypi.rs
  • clang-installer/src/tool.rs
  • cpp-linter/CHANGELOG.md
  • cpp-linter/CHANGELOG.old.md
  • cpp-linter/Cargo.toml
  • cpp-linter/clippy.toml
  • cpp-linter/src/clang_tools/clang_format.rs
  • cpp-linter/src/clang_tools/clang_tidy.rs
  • cpp-linter/src/cli/mod.rs
  • cpp-linter/src/cli/structs.rs
  • cpp-linter/src/run.rs
  • cspell.config.yml
  • docs/Cargo.toml
  • docs/docs/changelog.md
  • docs/docs/changelog/clang-installer.md
  • docs/docs/changelog/cpp-linter-js.md
  • docs/docs/changelog/cpp-linter-py.md
  • docs/docs/changelog/cpp-linter.md
  • docs/license_gen.py
  • docs/mkdocs.yml
  • nurfile
💤 Files with no reviewable changes (4)
  • cpp-linter/clippy.toml
  • Cargo.toml
  • docs/docs/changelog.md
  • .github/workflows/bump_version.py

Comment thread .github/workflows/binary-builds.yml Outdated
Comment thread .github/workflows/bump-n-release.yml Outdated
@2bndy5 2bndy5 force-pushed the seperate-tags branch 3 times, most recently from fb386b1 to 197138f Compare April 16, 2026 06:32
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.60%. Comparing base (35ed52e) to head (9499b69).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@2bndy5 2bndy5 force-pushed the seperate-tags branch 2 times, most recently from 4bc0449 to ecce6b2 Compare April 16, 2026 08:02
@2bndy5 2bndy5 merged commit a2c2ab7 into main Apr 16, 2026
78 checks passed
@2bndy5 2bndy5 deleted the seperate-tags branch April 16, 2026 08:59
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