-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Context
lib.rs defines three macros:
field!(lines 46-133) — generatesserde_json::Valuemaps via schemars. Only used intests/test_field_macro.rs.sign!(lines 135-171) — inline signature + Predict creation. Zero callers currently.hashmap!(lines 178-187) — convenience HashMap literal. Used in tests/examples.
These are ergonomic features for the untyped path. field! and sign! use schemars::schema_for!() to generate JSON schemas, which is the pre-V1 approach. The typed path uses #[derive(Signature)] + SignatureSchema::of::<S>().
What's needed
field! macro
- Should emit typed
FieldSchemavalues instead ofserde_json::Valuemaps - Or consider if
#[derive(Signature)]makes this macro redundant
sign! macro
- Should work with the typed
Signaturederive and produce aPredict<__InlineSignature>that's fully wired (accessor registration, etc.) - Currently generates a derive but doesn't call
register_predict_accessororbuild()
hashmap! macro
- Low priority.
HashMap::from([...])is standard Rust. Keep or kill, doesn't matter much.
schemars dependency
__macro_supportre-exports schemars solely forfield!- Once field! is modernized, schemars can be dropped from Cargo.toml (also requires specials.rs migration, see related issue)
Related
- fully remove untyped signatures #52 (remove untyped signatures)
- specials.rs migration issue
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels