Skip to content

refactor(ast): estree via on struct fields implement From#8898

Merged
graphite-app[bot] merged 1 commit intomainfrom
02-04-refactor_ast_estree_via_on_struct_fields_implement_from_
Feb 5, 2025
Merged

refactor(ast): estree via on struct fields implement From#8898
graphite-app[bot] merged 1 commit intomainfrom
02-04-refactor_ast_estree_via_on_struct_fields_implement_from_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Feb 4, 2025

Align the behavior of custom serialization to ESTree using the #[estree(via)] attribute. Change its behavior on struct fields to match structs - the "via" type must implement From to convert from the original type to itself.

The future goal is to use these same "via" types to go back in the other direction (JS -> Rust), so we need to have a casting system.

@github-actions github-actions bot added A-ast Area - AST A-ast-tools Area - AST tools C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Feb 4, 2025
This was referenced Feb 4, 2025
Copy link
Member Author

overlookmotel commented Feb 4, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@overlookmotel overlookmotel marked this pull request as ready for review February 4, 2025 14:20
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 4, 2025

CodSpeed Performance Report

Merging #8898 will not alter performance

Comparing 02-04-refactor_ast_estree_via_on_struct_fields_implement_from_ (5cb8466) with main (223eb8d)

Summary

✅ 33 untouched benchmarks

@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Feb 4, 2025
@overlookmotel overlookmotel force-pushed the 02-04-refactor_ast_override_ts_type_defs_with_estree_custom_ts_def_attribute_on_type branch from d4eb7a7 to 5046b09 Compare February 4, 2025 21:56
@overlookmotel overlookmotel force-pushed the 02-04-refactor_ast_estree_via_on_struct_fields_implement_from_ branch from 80264d4 to 74d5176 Compare February 4, 2025 21:56
@graphite-app
Copy link
Contributor

graphite-app bot commented Feb 4, 2025

Merge activity

  • Feb 4, 5:21 PM EST: The Graphite merge queue removed this pull request due to downstack failures on PR #8881.
  • Feb 4, 10:22 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Feb 4, 10:22 PM UTC: The merge label '0-merge' was removed. This PR will no longer be merged by the Graphite merge queue
  • Feb 4, 8:45 PM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Feb 4, 8:45 PM EST: A user added this pull request to the Graphite merge queue.
  • Feb 4, 8:50 PM EST: A user merged this pull request with the Graphite merge queue.

@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Feb 4, 2025
@graphite-app graphite-app bot force-pushed the 02-04-refactor_ast_override_ts_type_defs_with_estree_custom_ts_def_attribute_on_type branch from 5046b09 to 223eb8d Compare February 4, 2025 22:36
Base automatically changed from 02-04-refactor_ast_override_ts_type_defs_with_estree_custom_ts_def_attribute_on_type to main February 4, 2025 23:13
@graphite-app graphite-app bot force-pushed the 02-04-refactor_ast_estree_via_on_struct_fields_implement_from_ branch from 74d5176 to f22d18b Compare February 4, 2025 23:13
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Feb 5, 2025
Align the behavior of custom serialization to ESTree using the `#[estree(via)]` attribute. Change its behavior on struct fields to match structs - the "via" type must implement `From` to convert from the original type to itself.

The future goal is to use these same "via" types to go back in the other direction (JS -> Rust), so we need to have a casting system.
@graphite-app graphite-app bot force-pushed the 02-04-refactor_ast_estree_via_on_struct_fields_implement_from_ branch from f22d18b to 5cb8466 Compare February 5, 2025 01:45
@graphite-app graphite-app bot merged commit 5cb8466 into main Feb 5, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 02-04-refactor_ast_estree_via_on_struct_fields_implement_from_ branch February 5, 2025 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0-merge Merge with Graphite Merge Queue A-ast Area - AST A-ast-tools Area - AST tools C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant