Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 60 additions & 14 deletions generators/cli/sdk/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion generators/cli/sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ num-bigint = { version = "0.4", features = ["serde"], optional = true }
ordered-float = { version = "4.5", features = ["serde"], optional = true }
# Added by the generated SDK crate for specs with server-sent events (see
# AbstractRustGeneratorContext, which declares these two behind an `sse` feature).
reqwest-sse = { version = "0.1", optional = true }
reqwest-sse = { version = "0.2", optional = true }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 Locked dependency version no longer matches what the generated CLI code requires, breaking reproducible builds

The pinned server-sent-events library is moved to a new major line (reqwest-sse = "0.2" at generators/cli/sdk/Cargo.toml:110) even though the generated CLI code still asks for the previous line (0.1), so the shipped lock file no longer contains a version the generated output can use.
Impact: Generated CLIs that use streaming can no longer be built or audited in locked/offline mode, silently disabling the dependency-auditing guarantee this dependency exists to provide.

Version-closure mismatch between cli/sdk lock and the Rust SDK generator

This dependency is declared solely to pin the generated model/SDK crates' dependency closure into the shipped Cargo.lock (see the comments at generators/cli/sdk/Cargo.toml:88-109, which state "Versions must match what the model generator emits ... Any package they need that is absent from this lock makes the generated output fail cargo build --locked ... cargo audit").

The Rust SDK generator still emits reqwest-sse = { version: "0.1", optional: true } (generators/rust/base/src/context/AbstractRustGeneratorContext.ts:212) and reqwest = { version: "0.12", ... } (AbstractRustGeneratorContext.ts:114-115). In Cargo semver, the requirement "0.1" means >=0.1.0, <0.2.0, which 0.2.0 does not satisfy. The lock was regenerated to reqwest-sse 0.2.0 (generators/cli/sdk/Cargo.lock:1817-1818), so the generated crate's ^0.1 requirement can no longer be resolved from the shipped lock — defeating the lock-closure purpose.

Secondly, reqwest-sse 0.2.0 depends on reqwest 0.13.4 (generators/cli/sdk/Cargo.lock:1823), while the SSE template code calls response.events() through the EventSource trait on a reqwest 0.12 Response (generators/rust/base/src/asIs/sse_stream.rs:5, :155-158). The 0.2 trait is implemented against reqwest 0.13 types, so the generated SSE code would not compile against reqwest 0.12.

The bump should be coordinated: AbstractRustGeneratorContext.ts (and the reqwest version / sse_stream.rs usage) must be updated together with this pin, or the pin should stay at 0.1.

Prompt for agents
The reqwest-sse pin in generators/cli/sdk/Cargo.toml exists only to make the generated Rust SDK's dependency closure resolvable in the shipped Cargo.lock (see comments at lines 88-109). The Rust SDK generator still emits reqwest-sse = "0.1" (generators/rust/base/src/context/AbstractRustGeneratorContext.ts:212) and reqwest = "0.12" (same file, lines 114-121). Cargo's "0.1" requirement means >=0.1.0,<0.2.0, which 0.2.0 does not satisfy, so after this bump the lock no longer contains a reqwest-sse version the generated crate can resolve under --locked. Additionally reqwest-sse 0.2 depends on reqwest 0.13 (generators/cli/sdk/Cargo.lock:1823), while the SSE template code in generators/rust/base/src/asIs/sse_stream.rs uses response.events() on a reqwest 0.12 Response, so the generated code would not compile against 0.2. Either revert this pin to 0.1, or coordinate the upgrade: bump reqwest-sse to 0.2 (and reqwest to 0.13) in AbstractRustGeneratorContext.ts, adapt sse_stream.rs to the new reqwest-sse 0.2 API, and update all affected generated seed outputs and versions.yml.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

pin-project = { version = "1.1", optional = true }

serde = { version = "1", features = ["derive"] }
Expand Down
Loading