Skip to content

chore: align versioning and local cross checks#69

Merged
ekroon merged 4 commits intomainfrom
chore/workspace-version-source
Mar 10, 2026
Merged

chore: align versioning and local cross checks#69
ekroon merged 4 commits intomainfrom
chore/workspace-version-source

Conversation

@ekroon
Copy link
Copy Markdown
Owner

@ekroon ekroon commented Mar 9, 2026

What

  • move Rust crate versioning to Cargo workspace inheritance via rust/Cargo.toml
  • update version scripts and release validation to read the workspace version and keep package manifests aligned
  • make local cross-target cargo checks opt-in instead of blocking pre-push, while keeping native verify/build/integration checks in place

Why

  • eliminate per-crate Rust version drift and keep one Rust source of truth for releases
  • avoid ineffective local cross-target push failures caused by missing host C toolchains for rusqlite / libsqlite3-sys

How

  • add shared version utilities and switch member crates to version.workspace = true
  • update bump-version.js, gen-version.js, and release.yml to use the workspace version
  • make scripts/check-targets.sh a manual, host-aware helper with clearer toolchain guidance and wire it into make dev-check-targets

Testing

  • npm test
  • npm run test:integration
  • npm run check:targets (verified native pass + clear missing-toolchain guidance for unavailable cross targets)
  • spot-checked built output versions in dist/extension/manifest.json, ./rust/target/debug/tabctl --version, and cargo metadata --manifest-path rust/Cargo.toml --no-deps --format-version 1

Copilot AI review requested due to automatic review settings March 9, 2026 08:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Moves the repo’s version “source of truth” for Rust to the Cargo workspace and updates scripts + CI validation to read/propagate that version consistently across npm manifests and release checks.

Changes:

  • Add rust/Cargo.toml [workspace.package].version and switch member crates to version.workspace = true.
  • Introduce scripts/version-utils.js and update bump-version.js / gen-version.js / release.yml to read the workspace version.
  • Mirror the workspace version into package.json, package-lock.json, and the Windows launcher package (and document the new model).

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
skills/release/SKILL.md Updates release/versioning docs to reflect workspace version source.
scripts/version-utils.js Adds shared helpers for reading/writing workspace + package versions.
scripts/gen-version.js Generates extension versions from the workspace version.
scripts/bump-version.js Bumps workspace version and mirrors to npm manifests + lockfiles.
rust/crates/tabctl/Cargo.toml Inherits version from workspace.
rust/crates/shared/Cargo.toml Inherits version from workspace.
rust/crates/host/Cargo.toml Inherits version from workspace.
rust/crates/graphql/Cargo.toml Inherits version from workspace.
rust/Cargo.toml Adds [workspace.package] version source.
package.json Aligns optional Windows launcher dependency version with workspace version.
package-lock.json Updates lockfile entries to match new launcher/version alignment.
AGENTS.md Documents new version source-of-truth and bump behavior.
.github/workflows/release.yml Validates tag + manifest versions against workspace version; syncs versions before publish.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ekroon ekroon changed the title chore(version): use workspace version source chore: align versioning and local cross checks Mar 9, 2026
Copilot AI review requested due to automatic review settings March 9, 2026 12:20
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +24 to +33
required_tool_for_target() {
case "$1" in
x86_64-unknown-linux-gnu)
echo "x86_64-linux-gnu-gcc"
;;
x86_64-pc-windows-gnu)
echo "x86_64-w64-mingw32-gcc"
;;
esac
}
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

On Linux hosts, x86_64-unknown-linux-gnu is a native target and typically does not require a separate x86_64-linux-gnu-gcc binary. As written, required_tool_for_target will mark this target as missing on many Linux machines and cause npm run check:targets to fail even though cargo check --target x86_64-unknown-linux-gnu would succeed. Consider making the required tool conditional on the host (only require a Linux cross-compiler when the host is not Linux), or skipping the tool check for native targets.

Copilot uses AI. Check for mistakes.
Comment on lines +64 to +67
*)
echo "ERROR: unsupported host OS '$HOST_OS' for scripts/check-targets.sh" >&2
exit 1
;;
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

scripts/check-targets.sh exits with "unsupported host OS" for anything other than Darwin/Linux, which includes common Windows Git Bash/MSYS environments (MINGW*, MSYS*, CYGWIN*). Since this script is exposed via npm run check:targets / make dev-check-targets, consider adding a Windows host branch (even if it only checks the native x86_64-pc-windows-msvc target) instead of hard-failing.

Copilot uses AI. Check for mistakes.
ekroon and others added 4 commits March 10, 2026 09:08
Move Rust crates to workspace version inheritance, align release tooling and docs, and keep packaged versions synchronized.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep native verification in pre-push, move cross-target cargo checks to an explicit opt-in path, and document the toolchain limitations behind that choice.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update release preparation and tagging to read the workspace version source, and keep the bump script aligned with the extracted version helpers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve the remote branch's release workflow wording tweak while keeping the rebased workspace-version resolution intact.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ekroon ekroon force-pushed the chore/workspace-version-source branch from 12b0dc0 to e15948f Compare March 10, 2026 08:39
@ekroon ekroon merged commit 01d3385 into main Mar 10, 2026
10 checks passed
@ekroon ekroon deleted the chore/workspace-version-source branch March 10, 2026 11:57
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.

2 participants