Skip to content

fix(release): use simple release-type + generic Cargo.toml updaters#130

Merged
kevincodex1 merged 1 commit into
mainfrom
fix/release-please-virtual-workspace
Jun 30, 2026
Merged

fix(release): use simple release-type + generic Cargo.toml updaters#130
kevincodex1 merged 1 commit into
mainfrom
fix/release-please-virtual-workspace

Conversation

@kevincodex1

@kevincodex1 kevincodex1 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix the failing release-please job: switch the workspace from release-type: rust to simple and bump per-crate versions via the generic updater, so releases can actually be cut.

Motivation & context

release-type: rust at path . is incompatible with our virtual workspace root. release-please's Rust strategy unconditionally appends a CargoToml update for the root Cargo.toml, and that updater throws is not a package manifest (might be a cargo workspace) whenever the manifest has no [package] section — so every Release run died on the final step.

Kind of change

  • Bug fix
  • Feature
  • Security fix
  • Docs
  • Tests / CI
  • Refactor (no behavior change)
  • Breaking or protocol change (issue required first)

What changed

  • release-please-config.json: release-type rustsimple; added extra-files listing all 5 crate Cargo.tomls with the generic updater.
  • Added inline # x-release-please-version annotation to the version line of each crate (gitlawb-core / gitlawb-node / gl / git-remote-gitlawb / gitlawb-attest).
  • Updated the explanatory comment in the root Cargo.toml.
  • Preserves the single vX.Y.Z tag, all action outputs (release_created/tag_name/version), and the entire downstream release.yml unchanged. Cargo.lock is intentionally unmanaged (CI doesn't build --locked; cargo regenerates it).

How a reviewer can verify

python3 -m json.tool release-please-config.json   # valid config
cargo metadata --no-deps --format-version 1 >/dev/null  # TOML still parses
grep -rn x-release-please-version crates/*/Cargo.toml   # 5 annotations
# On merge to main, the Release workflow's release-please step builds a release
# PR (bumping all 5 crates to the next version) instead of erroring.

Before you request review

- [x] Scope is one logical change; no unrelated churn
- [ ] cargo test --workspace passes locally
- [x] New behavior is covered by tests (required for fixes) — N/A, CI-config change validated above
- [x] cargo fmt --all and cargo clippy --workspace --all-targets -- -D warnings are clean — no source touched
- [x] Commit titles use Conventional Commits (feat(...), fix(...), docs(...))
- [x] Docs / .env.example updated if behavior or config changed (or N/A)
- [x] Checked existing PRs so this isn't a duplicate

Notes for reviewers

Cargo.lock deliberately stays at the old crate versions after a release — CI never builds with --locked (only the unrelated cargo-audit install does), so cargo regenerates it in place, and each binary's --version comes from CARGO_PKG_VERSION (the bumped Cargo.toml). Annotating Cargo.lock would be fragile since cargo rewrites it and strips comments.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **Chores**
  * Updated release configuration to better track version updates across workspace packages.
  * Added version markers to multiple package manifests so future release bumps are applied consistently.
  * Clarified release-management comments in the workspace manifest for easier maintenance.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

release-type: rust at path . is incompatible with this virtual
workspace root. release-please's Rust strategy unconditionally appends a
CargoToml update for the root Cargo.toml, and that updater throws
"is not a package manifest (might be a cargo workspace)" whenever the
manifest has no [package] section — so every run died on the final step.

Switch to release-type: simple (touches only a version file + CHANGELOG,
never a manifest) and bump each crate version through the generic updater
via extra-files plus an inline x-release-please-version annotation.

Preserves the single vX.Y.Z tag, all action outputs, and the entire
downstream release.yml unchanged.
@github-actions github-actions Bot added the needs-issue PR has no linked issue label Jun 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the contribution. A couple of things will help us review this faster:

  • Link the issue this addresses (Closes #123). For protocol changes, open an issue first.

See CONTRIBUTING.md. Update the PR and these notes will clear automatically.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8386f293-90d0-4d15-92dc-e5440dda2de4

📥 Commits

Reviewing files that changed from the base of the PR and between 788a868 and ff96be4.

📒 Files selected for processing (7)
  • Cargo.toml
  • crates/git-remote-gitlawb/Cargo.toml
  • crates/gitlawb-attest/Cargo.toml
  • crates/gitlawb-core/Cargo.toml
  • crates/gitlawb-node/Cargo.toml
  • crates/gl/Cargo.toml
  • release-please-config.json

📝 Walkthrough

Walkthrough

Switches the release-please configuration from the rust release type to simple, adds an extra-files list of all crate Cargo.toml paths, and annotates the version field in each crate manifest with # x-release-please-version. The workspace Cargo.toml comment is updated to describe this new strategy.

Changes

Release-please simple strategy migration

Layer / File(s) Summary
Config and workspace docs
release-please-config.json, Cargo.toml
release-type changed from rust to simple; extra-files array added with all crate Cargo.toml paths; workspace comment updated to document x-release-please-version annotation behavior.
Per-crate version annotations
crates/git-remote-gitlawb/Cargo.toml, crates/gitlawb-attest/Cargo.toml, crates/gitlawb-core/Cargo.toml, crates/gitlawb-node/Cargo.toml, crates/gl/Cargo.toml
Added inline # x-release-please-version comment to the version field in each crate manifest; version values unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 A comment here, a marker there,
Release-please finds the version with care.
From rust to simple the config now reads,
Each crate annotated for all future needs.
Hop, hop — the bumper knows just where to look! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: switching release-please to the simple release type for Cargo.toml updates.
Description check ✅ Passed The description follows the template and includes summary, motivation, change list, verification, and checklist items.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-please-virtual-workspace

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

@kevincodex1 kevincodex1 merged commit 12bfb1b into main Jun 30, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-issue PR has no linked issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant