Repository navigation
Identify conversion nodes via node macro annotations - #5083
Open
TrueDoctor wants to merge 1 commit into
Open
TrueDoctor wants to merge 1 commit into
TrueDoctor wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
2 issues found across 6 files
Confidence score: 3/5
- In
codegen.rs, adapter annotations are recorded but never consumed, soadapter(conversion)andadapter(rank)have no behavioral effect. Wire this metadata into adapter discovery and type resolution. - In
registry.rs, the comment describesAdapterKindas a boolean, which makes the field’s meaning unclear. Document whatNoneand eachSomevariant mean, and update theNodeFlagsdescription.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="node-graph/libraries/core-types/src/registry.rs">
<violation number="1" location="node-graph/libraries/core-types/src/registry.rs:32">
P3: This doc comment describes a boolean, but the field is `Option<AdapterKind>`. Document what `None` and the `Some` variants mean instead. The `NodeFlags` doc that says "Boolean node properties" also needs updating.</violation>
</file>
<file name="node-graph/node-macro/src/codegen.rs">
<violation number="1" location="node-graph/node-macro/src/codegen.rs:1062">
P2: This only records the adapter annotation; no type-resolution or registry path reads it, so `adapter(conversion)` and `adapter(rank)` currently have no behavioral effect. Consume this metadata in adapter discovery/type resolution, or remove the flag until that path is wired through.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| forwards_input: #forwards_input, | ||
| inject_scope: #inject_scope, | ||
| asynchronous: #asynchronous, | ||
| adapter: #adapter, |
Contributor
There was a problem hiding this comment.
P2: This only records the adapter annotation; no type-resolution or registry path reads it, so adapter(conversion) and adapter(rank) currently have no behavioral effect. Consume this metadata in adapter discovery/type resolution, or remove the flag until that path is wired through.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At node-graph/node-macro/src/codegen.rs, line 1062:
<comment>This only records the adapter annotation; no type-resolution or registry path reads it, so `adapter(conversion)` and `adapter(rank)` currently have no behavioral effect. Consume this metadata in adapter discovery/type resolution, or remove the flag until that path is wired through.</comment>
<file context>
@@ -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,
},
version: #version,
</file context>
| pub forwards_input: bool, | ||
| pub inject_scope: bool, | ||
| pub asynchronous: bool, | ||
| /// Whether type resolution may insert this node on an edge, from `#[node_macro::node(adapter(...))]`. |
Contributor
There was a problem hiding this comment.
P3: This doc comment describes a boolean, but the field is Option<AdapterKind>. Document what None and the Some variants mean instead. The NodeFlags doc that says "Boolean node properties" also needs updating.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At node-graph/libraries/core-types/src/registry.rs, line 32:
<comment>This doc comment describes a boolean, but the field is `Option<AdapterKind>`. Document what `None` and the `Some` variants mean instead. The `NodeFlags` doc that says "Boolean node properties" also needs updating.</comment>
<file context>
@@ -29,6 +29,17 @@ pub struct NodeFlags {
pub forwards_input: bool,
pub inject_scope: bool,
pub asynchronous: bool,
+ /// Whether type resolution may insert this node on an edge, from `#[node_macro::node(adapter(...))]`.
+ pub adapter: Option<AdapterKind>,
+}
</file context>
Suggested change
| /// Whether type resolution may insert this node on an edge, from `#[node_macro::node(adapter(...))]`. | |
| /// The edge-insertion role from `#[node_macro::node(adapter(...))]`, or `None` if type resolution may not insert this node on an edge. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.