Skip to content

feat(shipper): gate shipper-cli behind default 'cli' feature#149

Merged
EffortlessSteven merged 1 commit into
mainfrom
feat/shipper-optional-cli-feature
Apr 19, 2026
Merged

feat(shipper): gate shipper-cli behind default 'cli' feature#149
EffortlessSteven merged 1 commit into
mainfrom
feat/shipper-optional-cli-feature

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Makes shipper-cli an optional dependency of the shipper crate, behind a default cli feature. cargo install shipper and the shipper binary keep working unchanged; lean embedders who want the curated shipper-core re-export via the product name can now opt out of the clap graph.

Why

The shipper crate's library surface (engine, plan, types, config, state, store) only touches shipper-core — but until now, depending on shipper forced consumers to pull shipper-cli and therefore clap, even when they never intended to invoke the CLI. The #95 three-crate split identified shipper-core as the canonical lean embedding surface and this closes the loop for callers who prefer the product name.

Changes

  • shipper-cli dependency is now optional = true.
  • New [features] block: default = ["cli"], cli = ["dep:shipper-cli"].
  • [[bin]] name = "shipper" gets required-features = ["cli"]--no-default-features cleanly skips the binary instead of failing late with a clap missing-dep error.
  • src/lib.rs and crates/shipper/README.md document the embedding opt-out.
  • CHANGELOG.md gets an [Unreleased] entry.

Compatibility

  • cargo install shipper --locked — unchanged (default features include cli).
  • cargo install shipper-cli --locked — unchanged.
  • shipper = "0.3.0-rc.2" (lib consumers) — unchanged (they already got shipper-cli transitively; now they still do, by default).
  • shipper = { version = "0.3.0-rc.2", default-features = false }new opt-in: drops clap.

Test plan

  • cargo check -p shipper clean
  • cargo check -p shipper --no-default-features clean
  • cargo build -p shipper --bin shipper --no-default-features fails with the intended requires the features: cli message
  • cargo test -p shipper — 39 passed
  • cargo clippy --workspace --all-targets --all-features -- -D warnings clean
  • cargo clippy -p shipper --no-default-features --all-targets -- -D warnings clean
  • cargo fmt --all -- --check clean

The `shipper` crate is the install façade — `cargo install shipper`
is the recommended install path — but until now its library surface
forced every consumer to pull `shipper-cli` and therefore `clap`,
even though the re-exported modules (`engine`, `plan`, `types`, …)
only touch `shipper-core`.

This commit:
- Marks `shipper-cli` as an optional dependency.
- Adds a `cli` feature that is on by default, so `cargo install shipper`
  and the `shipper` binary keep working with zero user action.
- Gates the `[[bin]]` target with `required-features = ["cli"]` so
  `--no-default-features` cleanly skips the binary instead of failing
  late with a `clap` missing-dep error.

Lean embedders who prefer the product name can now do:

  [dependencies]
  shipper = { version = "0.3.0-rc.2", default-features = false }

which drops the `clap` graph while keeping the curated re-exports.
`shipper-core` remains the canonical lean embedding surface and is
the recommendation for most library use.

Verified:
- `cargo check -p shipper` — default features (build includes bin)
- `cargo check -p shipper --no-default-features` — lib only
- `cargo build -p shipper --bin shipper --no-default-features` — fails
  with a clear `requires the features: cli` message (as intended)
- `cargo test -p shipper` — 39 tests pass
- `cargo clippy --workspace --all-targets --all-features -- -D warnings` clean
- `cargo clippy -p shipper --no-default-features --all-targets -- -D warnings` clean
- `cargo fmt --all -- --check` clean

Docs updated: lib.rs, README.md, CHANGELOG.md [Unreleased] entry.
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Apr 19, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@EffortlessSteven has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 49 minutes and 0 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 49 minutes and 0 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: ASSERTIVE

Plan: Pro

Run ID: ccfc8ae9-2525-40d3-93db-9173b9c5237c

📥 Commits

Reviewing files that changed from the base of the PR and between e247495 and 2af9137.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • crates/shipper/Cargo.toml
  • crates/shipper/README.md
  • crates/shipper/src/lib.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/shipper-optional-cli-feature

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.

@codecov

codecov Bot commented Apr 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@EffortlessSteven EffortlessSteven merged commit 3a12353 into main Apr 19, 2026
37 of 38 checks passed
@EffortlessSteven EffortlessSteven deleted the feat/shipper-optional-cli-feature branch April 19, 2026 02:30
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