Skip to content

[Automated] Update cargo CLI Options - #4886

Closed
thomhurst wants to merge 5 commits into
issue-4692-cargo-regenfrom
automated/update-cli-options-cargo
Closed

thomhurst wants to merge 5 commits into
issue-4692-cargo-regenfrom
automated/update-cli-options-cargo

Conversation

@thomhurst

Copy link
Copy Markdown
Owner

Summary

This PR contains automatically generated updates to cargo CLI options classes.

The generator scraped the latest CLI help output from the installed tool.

Changes

  • Updated options classes to reflect latest CLI documentation
  • Added new commands if any were detected
  • Updated option types and descriptions

Assembly-wide public API impact

Affected API families: Assembly/common, Cargo.

  • Added APIs: 441
  • Removed or changed APIs: 5
  • Members with matching names but changed signatures: 2

Breaking changes are present. Consumers may need to update method arguments, option property types or nullability, enum members, and references to removed APIs.

Representative removed or changed members:

  • ModularPipelines.Rust.Options.CargoAddOptions.CargoAddOptions(System.Collections.Generic.IEnumerable<string!>! Dep) -> void
  • ModularPipelines.Rust.Options.CargoAddOptions.Deconstruct(out System.Collections.Generic.IEnumerable<string!>! Dep) -> void
  • ModularPipelines.Rust.Options.CargoAddOptions.Dep.get -> System.Collections.Generic.IEnumerable<string!>!
  • ModularPipelines.Rust.Options.CargoAddOptions.Dep.init -> void
  • static ModularPipelines.Rust.Extensions.CargoExtensions.Cargo(this ModularPipelines.IPipelineContext! context) -> ModularPipelines.Rust.Services.ICargo!

Representative added members:

  • ModularPipelines.Rust.Options.CargoAddOptions.Base.get -> string?
  • ModularPipelines.Rust.Options.CargoAddOptions.Base.set -> void
  • ModularPipelines.Rust.Options.CargoAddOptions.Branch.get -> string?
  • ModularPipelines.Rust.Options.CargoAddOptions.Branch.set -> void
  • ModularPipelines.Rust.Options.CargoAddOptions.Build.get -> bool?

Command coverage

Command coverage report:

  • cargo (cargo 1.98.1 (797e8a9bc 2026-08-05)): 16 commands, tree f8b1c0ec09c6f1a8fbc12f34c9e244131aa2869c068c7f752c8da91976b1ec19
    • Baseline comparison: 16 commands at cargo 1.98.0 (797e8a9bc 2026-08-05) -> 16 commands at cargo 1.98.1 (797e8a9bc 2026-08-05)

Verification

  • Solution builds successfully

🤖 Generated with ModularPipelines.OptionsGenerator

thomhurst and others added 5 commits September 13, 2026 15:44
…out of required positionals

Two regressions from #4470 broke the cargo regeneration (#4692):

- CargoCliScraper only read option rows under headings containing "option"
  or ending in "selection", so clap's `Source:` and `Section:` groups on
  `cargo add`/`cargo remove` (--path, --git, --branch, --dev, ...) vanished
  from the generated options. Every heading is now an option section except
  the positional, command and prose ones (Arguments, Commands, Examples, ...).

- UsageSynopsisParser treated an operand attached to an option
  (`--path <PATH>`) as a positional slot when deciding whether an operand
  missing from an alternate usage form is still required. With `[OPTIONS]`
  ahead of every form the phases matched, so `<DEP>` stayed a required
  constructor parameter even though `--path`/`--git` are alternatives to it.
  Option-attached operands no longer count as positional slots.

Regenerated cargo from cargo 1.98.0 (the same tree as the baseline) and
recorded provenance; the only generated change is the explicit
IValidatableObject.Validate implementation the generator now emits, and
CargoOptionsTests compiles and passes unchanged.

Closes #4692

Claude-Session: https://claude.ai/code/session_01PkLNTUfwGXjqXZrYrHaDGC
@thomhurst thomhurst added automated dependencies Pull requests that update a dependency file labels Sep 13, 2026
@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 1320f89d-5091-4877-9fa0-e3f6a9bce1b9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-13T23:31:04.864830Z 56658e5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Sep 13, 2026

Copy link
Copy Markdown

Greptile Summary

Updates Cargo 1.98.1 generation metadata and synchronizes the Rust integration’s public API baselines with its generated Cargo option classes.

  • Records the Cargo tool-version and generator-source fingerprint update.
  • Adds newly generated option properties to the unshipped API baseline.
  • Records the regenerated breaking changes to CargoAddOptions.
  • Removes a stale unshipped Cargo extension entry.

Confidence Score: 5/5

The PR appears safe to merge with no actionable correctness, security, or repository-rule violations identified.

The metadata is internally consistent, the public API entries align with generated Cargo sources, and validation preserves CargoAdd’s required dependency-source contract.

Important Files Changed

Filename Overview
src/ModularPipelines.Rust/Generated/Cargo.CommandCoverage.json Updates the recorded Cargo patch version while preserving the 16-command coverage tree.
src/ModularPipelines.Rust/Generated/Cargo.Generation.json Updates Cargo provenance to the new tool version and generator-source fingerprint.
src/ModularPipelines.Rust/PublicAPI.Shipped.txt Removes regenerated CargoAddOptions members from the shipped API baseline so their removals can be tracked.
src/ModularPipelines.Rust/PublicAPI.Unshipped.txt Records CargoAddOptions removals and the newly exposed generated Cargo option APIs.

Reviews (1): Last reviewed commit: "chore: Update cargo CLI options" | Re-trigger Greptile

@github-actions

Copy link
Copy Markdown
Contributor

Review

Automated cargo CLI options regeneration — no actionable issues found.

What changed: Only generated/metadata files are touched (Cargo.CommandCoverage.json, Cargo.Generation.json, PublicAPI.Shipped.txt, PublicAPI.Unshipped.txt). No hand-authored .cs sources are modified, consistent with this repo's rule that generated tool options must come from the generator, not manual edits.

Verified:

  • commandTreeSha256 is unchanged between 1.98.0 → 1.98.1, matching the PR body's claim that this is a patch-version bump with no CLI surface change.
  • The CargoAddOptions API delta in PublicAPI.Shipped.txt/PublicAPI.Unshipped.txt (removal of the old required-Dep-constructor members, addition of Dep as a nullable settable property plus the other new option properties) matches the already-generated CargoAddOptions.Generated.cs and ICargo.Generated.cs in the base branch — this is the analyzer bookkeeping catching up to source that was already regenerated on issue-4692-cargo-regen, not a new behavioral change introduced by this PR.
  • The pre-existing *REMOVED* entries for ICargo.AddAsync and CargoExtensions.Cargo (old ModularPipelines.Context/ModularPipelines.Models qualified signatures) already have matching current-namespace replacement entries elsewhere in PublicAPI.Unshipped.txt on the base branch, so there's no orphaned "removed but still present" analyzer mismatch — that concern doesn't apply here.

No prior reviewer comments (CodeRabbit skipped since the base isn't main; Codex reported no findings) are outstanding.

Since this is generated output, per repo policy it should be accepted as-is rather than hand-edited.

@thomhurst

Copy link
Copy Markdown
Owner Author

Do not incorporate this snapshot: #4722 was rebased onto current main and received additional operand-identity fixes at 672df5c. This output records the previous generator source. Replacement authoritative Cargo generation is running at https://github.com/thomhurst/ModularPipelines/actions/runs/34790317773 and will use the new source-ref branch naming. Retaining this PR until the replacement is available for comparison.

@thomhurst

Copy link
Copy Markdown
Owner Author

Superseded by #4887, regenerated successfully from the corrected, rebased #4722 source at 672df5c. The old branch contains one generated metadata/baseline commit atop c0cf690; its handwritten source changes are the pre-rebase parent history, not unique work. #4887 preserves Cargo 1.98.1 and all 16 commands and is receiving current feature-target CI. Keeping the old branch for provenance; no generated files were hand-edited.

@thomhurst thomhurst closed this Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant