Skip to content

fix: bundle both ruby and rust CLIs#1559

Merged
JP-Ellis merged 1 commit intomainfrom
fix/bundle-ruby-and-rust
Apr 16, 2026
Merged

fix: bundle both ruby and rust CLIs#1559
JP-Ellis merged 1 commit intomainfrom
fix/bundle-ruby-and-rust

Conversation

@JP-Ellis
Copy link
Copy Markdown
Contributor

@JP-Ellis JP-Ellis commented Apr 16, 2026

📝 Summary

  • Bundle both Ruby and Rust CLIs from pact-standalone and pact-cli respectively.
  • Add deprecation warning to Ruby CLIs in preparation for upcoming removal.

🚨 Breaking Changes

None yet, but deprecation warning is there for upcoming removal.

🔥 Motivation

Until recently, the pact-standalone upstream CLI bundled both Ruby and Rust CLIs together. The Ruby CLIs are being deprecated and will be removed, and the pact-cli repository will contain the Rust-based CLI which replaces all of the Ruby ones.

🔨 Test Plan

Add some tests

🔗 Related issues/PRs

@JP-Ellis JP-Ellis self-assigned this Apr 16, 2026
Copilot AI review requested due to automatic review settings April 16, 2026 09:06
@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 74%. Comparing base (67f3b85) to head (81a383f).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@         Coverage Diff          @@
##           main   #1559   +/-   ##
====================================
  Coverage    74%     74%           
====================================
  Files        36      36           
  Lines      3993    3996    +3     
====================================
+ Hits       2976    2979    +3     
  Misses     1017    1017           
Flag Coverage Δ
examples 37% <ø> (ø)
tests 73% <100%> (+<1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Contributor

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

Bundles both the legacy Ruby CLIs (from pact-standalone) and the newer Rust pact CLI (from pact-cli), and emits a deprecation warning when users invoke Ruby-based wrapper commands.

Changes:

  • Add stderr deprecation warnings for Ruby CLI entrypoints, with an optional “use <pact subcommand> instead” hint.
  • Update the Hatch build hook to download/extract Ruby standalone assets and additionally download/copy the Rust pact binary into bin/.
  • Add pytest coverage to validate which commands do/do not emit the deprecation warning.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
pact-python-cli/tests/test_init.py Adds tests asserting deprecated wrappers warn and pact does not.
pact-python-cli/src/pact_cli/init.py Replaces warnings.warn with explicit stderr warnings and introduces a replacement-command mapping.
pact-python-cli/hatch_build.py Downloads Ruby standalone plus an additional Rust pact binary during wheel build.

Comment thread pact-python-cli/hatch_build.py
Comment thread pact-python-cli/src/pact_cli/__init__.py Outdated
Comment thread pact-python-cli/hatch_build.py
Until recently, the `pact-standalone` upstream CLI bundled both Ruby and
Rust CLIs together. The Ruby CLIs are being deprecated and will be
removed, and the `pact-cli` repository will contain the Rust-based CLI
which replaces all of the Ruby ones.

For now, this bundles both to preserve compatibility, and adds a
deprecation warning in preparation for the upcoming removal.

Signed-off-by: JP-Ellis <josh@jpellis.me>
@JP-Ellis JP-Ellis force-pushed the fix/bundle-ruby-and-rust branch from bc49301 to 81a383f Compare April 16, 2026 09:20
@JP-Ellis JP-Ellis merged commit be29a3a into main Apr 16, 2026
41 checks passed
@JP-Ellis JP-Ellis deleted the fix/bundle-ruby-and-rust branch April 16, 2026 09:26
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