Skip to content

recognize modeled traits in derive paths regardless of token spacing - #75

Merged
ahl merged 1 commit into
mainfrom
derive-path
Nov 22, 2026
Merged

ahl merged 1 commit into
mainfrom
derive-path

Conversation

@ahl

@ahl ahl commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

TypespaceTrait::from_path compared derive strings literally, so a path rendered by ToTokens (schemars :: JsonSchema, as typify-macro passes extra derives) did not match, and a qualified derive naming a modeled trait was emitted as a plain extra derive. from_path now parses the string as a syn::Path and compares its segments, which fixes every caller: per-type extra derives in render_derives and ForeignTrait / TraitSpec parsing in settings.

`TypespaceTrait::from_path` compared derive strings literally, so a path
rendered by `ToTokens` (`schemars :: JsonSchema`, as typify-macro passes
extra derives) did not match, and a qualified derive naming a modeled
trait was emitted as a plain extra derive. `from_path` now parses the
string as a `syn::Path` and compares its segments, which fixes every
caller: per-type extra derives in `render_derives` and `ForeignTrait` /
`TraitSpec` parsing in settings.
@ahl
ahl merged commit 2f87232 into main Nov 22, 2026
10 checks passed
@ahl
ahl deleted the derive-path branch November 22, 2026 20:39
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