Skip to content
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

refactor(syntax): add #[ast] attr to semantic ID types #8867

Merged

Conversation

overlookmotel
Copy link
Contributor

@overlookmotel overlookmotel commented Feb 3, 2025

Add #[ast] attr to ScopeId, SymbolId and ReferenceId types. This makes them an "official" part of the AST, and removes the hacky "special case" logic from oxc_ast_tools which was previously working around that they weren't registered as part of the AST.

This uses the #[ast(foreign = ...)] feature introduced in #8866 to inform oxc_ast_tools about the foreign NonMaxU32 type, enabling the ID types to be parsed and understood.

Copy link
Contributor Author

overlookmotel commented Feb 3, 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.

@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 3, 2025
@overlookmotel overlookmotel marked this pull request as ready for review February 3, 2025 16:23
Copy link

codspeed-hq bot commented Feb 3, 2025

CodSpeed Performance Report

Merging #8867 will not alter performance

Comparing 02-03-refactor_syntax_add_ast_attr_to_semantic_id_types (768ad4f) with main (4b4d543)

Summary

✅ 33 untouched benchmarks

@overlookmotel overlookmotel force-pushed the 02-03-feat_ast_tools_allow_defining_foreign_types_with_ast_foreign_._ branch from dc0a998 to 534c4f8 Compare February 3, 2025 21:53
@overlookmotel overlookmotel force-pushed the 02-03-refactor_syntax_add_ast_attr_to_semantic_id_types branch from eb373ac to ec98843 Compare February 3, 2025 21:53
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Feb 4, 2025
Copy link

graphite-app bot commented Feb 4, 2025

Merge activity

Add `#[ast]` attr to `ScopeId`, `SymbolId` and `ReferenceId` types. This makes them an "official" part of the AST, and removes the hacky "special case" logic from `oxc_ast_tools` which was previously working around that they weren't registered as part of the AST.

This uses the `#[ast(foreign = ...)]` feature introduced in #8866 to inform `oxc_ast_tools` about the foreign `NonMaxU32` type, enabling the ID types to be parsed and understood.
@graphite-app graphite-app bot force-pushed the 02-03-feat_ast_tools_allow_defining_foreign_types_with_ast_foreign_._ branch from 534c4f8 to 9072f4c Compare February 4, 2025 02:49
@graphite-app graphite-app bot force-pushed the 02-03-refactor_syntax_add_ast_attr_to_semantic_id_types branch from ec98843 to 768ad4f Compare February 4, 2025 02:50
Base automatically changed from 02-03-feat_ast_tools_allow_defining_foreign_types_with_ast_foreign_._ to main February 4, 2025 03:21
@graphite-app graphite-app bot merged commit 768ad4f into main Feb 4, 2025
29 checks passed
@graphite-app graphite-app bot deleted the 02-03-refactor_syntax_add_ast_attr_to_semantic_id_types branch February 4, 2025 03:27
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