Skip to content

refactor(ast): simplify serializing SourceType#8936

Merged
graphite-app[bot] merged 1 commit intomainfrom
02-06-refactor_ast_simplify_serializing_sourcetype_
Feb 7, 2025
Merged

refactor(ast): simplify serializing SourceType#8936
graphite-app[bot] merged 1 commit intomainfrom
02-06-refactor_ast_simplify_serializing_sourcetype_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Feb 6, 2025

#8919 fixed serialization of the Program::source_type field.

Remove the custom Serialize impl for this - use #[estree(flatten)] and #[estree(skip)] attributes to achieve the same thing. Also, remove extraneous TS type definitions for the parts of SourceType which aren't part of the ESTree AST.

Copy link
Member Author

overlookmotel commented Feb 6, 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 C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Feb 6, 2025
@overlookmotel overlookmotel force-pushed the 02-06-refactor_ast_simplify_serializing_sourcetype_ branch from c7915c5 to 49be7ae Compare February 6, 2025 20:15
@overlookmotel overlookmotel marked this pull request as ready for review February 6, 2025 20:18
@overlookmotel
Copy link
Member Author

cc @hi-ogawa. When I say "simplify", it's not actually simpler! But the complexity is moved into the codegen (previous PR), rather than in code around the AST itself. But that's in line with the DST approach, which we're aiming for.

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 6, 2025

CodSpeed Performance Report

Merging #8936 will not alter performance

Comparing 02-06-refactor_ast_simplify_serializing_sourcetype_ (c58f785) with main (1b89e75)

Summary

✅ 33 untouched benchmarks

@hi-ogawa
Copy link
Contributor

hi-ogawa commented Feb 6, 2025

Nice! I didn't think of combining all macros 😮 I checked through your other refactoring and all make sense 👍

@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Feb 7, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Feb 7, 2025

Merge activity

#8919 fixed serialization of the `Program::source_type` field.

Remove the custom `Serialize` impl for this - use `#[estree(flatten)]` and `#[estree(skip)]` attributes to achieve the same thing. Also, remove extraneous TS type definitions for the parts of `SourceType` which aren't part of the ESTree AST.
@graphite-app graphite-app bot force-pushed the 02-06-feat_ast_tools_typescript_define_fields_inline_for_flattened_types_with_only_a_single_field branch from 28b0e3e to 43746a2 Compare February 7, 2025 02:47
@graphite-app graphite-app bot force-pushed the 02-06-refactor_ast_simplify_serializing_sourcetype_ branch from 49be7ae to c58f785 Compare February 7, 2025 02:48
Base automatically changed from 02-06-feat_ast_tools_typescript_define_fields_inline_for_flattened_types_with_only_a_single_field to main February 7, 2025 03:01
@graphite-app graphite-app bot merged commit c58f785 into main Feb 7, 2025
28 checks passed
@graphite-app graphite-app bot deleted the 02-06-refactor_ast_simplify_serializing_sourcetype_ branch February 7, 2025 03:03
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 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.

3 participants