Skip to content

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Oct 3, 2025

Pure refactor. Minify syntax of raw transfer deserializers. Purpose is not to compress the size of the files per se, but to remove dead code.

This is first step towards adding support for range and parent to raw transfer.

tasks/ast_tools gains dependencies on oxc_minify etc. These have to be dependencies on copies of the published crates from crates.io, NOT local copies (not workspace = true).

This is because if changes are made to the AST, the local versions of many crates may not compile until after the codegen has run to update code to account for those changes - catch 22. Depending on published versions of the crates avoids this circularity.

@github-actions github-actions bot added A-parser Area - Parser A-ast-tools Area - AST tools labels Oct 3, 2025
Copy link
Member Author

overlookmotel commented Oct 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 the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Oct 3, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 3, 2025

CodSpeed Instrumentation Performance Report

Merging #14308 will not alter performance

Comparing 10-02-refactor_napi_parser_minify_syntax_in_raw_transfer_deserializers (a98757a) with main (f37b211)1

Summary

✅ 37 untouched

Footnotes

  1. No successful run was found on main (a98757a) during the generation of this report, so f37b211 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@overlookmotel overlookmotel requested a review from Boshen October 3, 2025 08:48
@overlookmotel overlookmotel marked this pull request as ready for review October 3, 2025 08:48
Copilot AI review requested due to automatic review settings October 3, 2025 08:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the raw transfer deserializers by adding minification functionality to remove dead code, preparing for future support of range and parent features. The minification preserves readability while cleaning up the generated code.

Key changes:

  • Added minification step to raw transfer deserializer code generation
  • Implemented custom minifier function that optimizes code while maintaining readability
  • Updated dependencies to use published crate versions instead of workspace versions

Reviewed Changes

Copilot reviewed 2 out of 5 changed files in this pull request and generated 3 comments.

File Description
tasks/ast_tools/src/generators/raw_transfer.rs Added minify function and integrated it into the code generation pipeline
tasks/ast_tools/Cargo.toml Added external dependencies for minification functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@overlookmotel
Copy link
Member Author

@Boshen I've asked for your review as the changes to Cargo.lock look a bit odd. I think it's OK, but would appreciate it if you could have a look.

@overlookmotel overlookmotel force-pushed the 10-02-refactor_napi_parser_minify_syntax_in_raw_transfer_deserializers branch from 22ea1c9 to 68a4d51 Compare October 3, 2025 09:06
@overlookmotel
Copy link
Member Author

Everything seems to build OK, and tests pass, so I'm going to assume it's working fine, and merge.

@overlookmotel overlookmotel assigned overlookmotel and unassigned Boshen Oct 4, 2025
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Oct 4, 2025
Copy link
Member Author

overlookmotel commented Oct 4, 2025

Merge activity

…14308)

Pure refactor. Minify syntax of raw transfer deserializers. Purpose is not to compress the size of the files per se, but to remove dead code.

This is first step towards adding support for `range` and `parent` to raw transfer.

`tasks/ast_tools` gains dependencies on `oxc_minify` etc. These have to be dependencies on copies of the published crates from crates.io, NOT local copies (not `workspace = true`).

This is because if changes are made to the AST, the local versions of many crates may not compile until after the codegen has run to update code to account for those changes - catch 22. Depending on published versions of the crates avoids this circularity.
@graphite-app graphite-app bot force-pushed the 10-02-refactor_napi_parser_minify_syntax_in_raw_transfer_deserializers branch from 066f4a5 to a98757a Compare October 4, 2025 14:11
@graphite-app graphite-app bot merged commit a98757a into main Oct 4, 2025
27 checks passed
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Oct 4, 2025
@graphite-app graphite-app bot deleted the 10-02-refactor_napi_parser_minify_syntax_in_raw_transfer_deserializers branch October 4, 2025 14:16
@Boshen Boshen mentioned this pull request Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ast-tools Area - AST tools A-parser Area - Parser 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