Repository navigation
Identify conversion nodes via node macro annotations #5083
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -838,8 +838,14 @@ pub(crate) fn generate_node_code(crate_ident: &CrateIdent, parsed: &ParsedNodeFn | |
| footprint_invariant, | ||
| forwards_input, | ||
| inject_scope, | ||
| adapter, | ||
| .. | ||
| } = attributes.flags; | ||
| let adapter = match adapter { | ||
| Some(AdapterKind::Conversion) => quote!(Some(gcore::registry::AdapterKind::Conversion)), | ||
| Some(AdapterKind::Rank) => quote!(Some(gcore::registry::AdapterKind::Rank)), | ||
| None => quote!(None), | ||
| }; | ||
| let asynchronous = parsed.is_async; | ||
| let version = attributes.version.unwrap_or(1); | ||
| // A node returning a `Destructure` struct records its fields as output connectors | ||
|
|
@@ -1053,6 +1059,7 @@ pub(crate) fn generate_node_code(crate_ident: &CrateIdent, parsed: &ParsedNodeFn | |
| forwards_input: #forwards_input, | ||
| inject_scope: #inject_scope, | ||
| asynchronous: #asynchronous, | ||
| adapter: #adapter, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: This only records the adapter annotation; no type-resolution or registry path reads it, so Prompt for AI agents |
||
| }, | ||
| version: #version, | ||
| output_fields: #output_fields, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3: This doc comment describes a boolean, but the field is
Option<AdapterKind>. Document whatNoneand theSomevariants mean instead. TheNodeFlagsdoc that says "Boolean node properties" also needs updating.Prompt for AI agents