Skip to content

DRAFT: depends on typify v0.10.0-alpha.1 - #1433

Draft
ahl wants to merge 21 commits into
mainfrom
v0_next
Draft

ahl wants to merge 21 commits into
mainfrom
v0_next

Conversation

@ahl

@ahl ahl commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

ahl added 16 commits September 28, 2026 15:27
typespace gained a parameter ident that takes a scope and a lifetime
together, and a query for a type's builder identifier, so three
workarounds go away.

The token rewriter in util.rs walked a rendered parameter identifier and
inserted a lifetime after every `&`, because nothing public combined the
two dimensions. `parameter_ident(scope, lifetime)` is that query, so the
36-line rewriter and its reviewer note are gone.

`Generator::builder_ident` reconstructed a builder's identifier from the
type's name plus progenitor's own knowledge that its interface is
builder-style. `view::Type::builder_ident` answers it, gated on the same
`struct_builder` setting progenitor sets from that interface style at
lib.rs:281, so the two cannot disagree, and the four call sites ask
typespace instead.

Both path dependencies point at the worktrees carrying the new API,
which is what makes one typespace instance serve typify and progenitor
both; they go back to the published crates when it lands.
Every regenerated file is byte-identical to the fixtures the
phase-split branch committed, except six sites (nexus and
test_default_params) where a defaulted bool property loses
skip_serializing_if = "std::ops::Not::not": the api-pass rebase brought
in typespace main's removal of that attribute. The known classes
otherwise stand, including the cli class awaiting a typespace-side
ruling: body properties with built-in types (String, bool, integers)
lose their per-property cli arguments because the typespace view
answers has_impl(FromStr) as false for built-ins, and json-body
becomes required where a required property is among them. The httpmock
outputs are byte-identical to their typify 1 versions.
The builder path emits the same futures::Stream methods as the
positional path, so uses_futures answering false for Builder made
cargo-progenitor omit the futures dependency from a paginated
builder-interface crate.
GenerationSettings now carries a typify TypeSpaceSettings and exposes
map_typespace_settings, so derives, map types, and the other type
settings go straight to typespace rather than through progenitor's own
copies; the CLI and macro parse derive requests with TraitSpec.

Construction is a private struct that walks the document and inserts
types; Generator::build consumes it, finalizes the type space once, and
keeps the Typespace snapshot with the uses_* answers alongside it. The
generator is named Generator again.

generate_sdk, generate_cli, and generate_httpmock each return a
Codespace and are the only entry points; the token-returning trio is
gone and callers ask for into_stream. Item keys pin the SDK layout
(prelude, types, client) and the CLI and httpmock layouts to what the
token versions produced, so the fixtures move only where typespace
main changed the output.

The direct typespace dependency goes away in favor of typify's
re-export.
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