Skip to content

Migrate memo nodes to node macro and make implementing other persistent nodes easier#3552

Merged
TrueDoctor merged 6 commits intomasterfrom
memo-macro
Jan 5, 2026
Merged

Migrate memo nodes to node macro and make implementing other persistent nodes easier#3552
TrueDoctor merged 6 commits intomasterfrom
memo-macro

Conversation

@TrueDoctor
Copy link
Copy Markdown
Member

No description provided.

@github-actions github-actions Bot temporarily deployed to graphite-dev (Preview) December 31, 2025 11:19 Inactive
@github-actions github-actions Bot temporarily deployed to graphite-dev (Preview) January 1, 2026 17:28 Inactive
Comment thread node-graph/nodes/gcore/src/memo.rs Outdated
Comment thread node-graph/nodes/gcore/src/memo.rs Outdated
@Keavon Keavon changed the title Migrate memo nodes to node macro and make implementing other memo nodes easier Migrate memo nodes to node macro and make implementing other persistent nodes easier Jan 5, 2026
@github-actions github-actions Bot temporarily deployed to graphite-dev (Preview) January 5, 2026 11:02 Inactive
TrueDoctor and others added 6 commits January 5, 2026 22:11
- Add #[data] attribute for struct fields that aren't node parameters
  - Data fields are initialized with Default::default()
  - Passed as references to the underlying function
  - Excluded from registry metadata (internal state)
  - Generic types in data fields allowed without #[implementations]

- Add #[serialize] attribute for custom Node::serialize() implementation
  - Receives references to all data fields
  - Generates serialize() method in Node trait impl

- Conditional derives based on data field presence
  - With data fields: Debug, Clone only
  - Without data fields: Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
@github-actions github-actions Bot temporarily deployed to graphite-dev (Preview) January 5, 2026 21:14 Inactive
@TrueDoctor TrueDoctor merged commit fafc687 into master Jan 5, 2026
4 checks passed
@TrueDoctor TrueDoctor deleted the memo-macro branch January 5, 2026 21:28
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.

2 participants