Skip to content

refactor(napi/parser): lazy deserializer: prefix local cache property keys with $ #11673

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

Conversation

overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Jun 13, 2025

Pure refactor. We prefix some property names on internal objects with $ to avoid clashes between static properties (pos, ast) and cached fields. Switch the prefixing around - now prefix keys for cached fields, so the internal properties are called e.g. pos not $pos. This shortens generated code, and makes writing implementations simpler.

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


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 June 13, 2025 12:37
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Jun 13, 2025
Copy link
Member Author

overlookmotel commented Jun 13, 2025

Merge activity

… keys with `$` (#11673)

Pure refactor. We prefix some property names on `internal` objects with `$` to avoid clashes between static properties (`pos`, `ast`) and cached fields. Switch the prefixing around - now prefix keys for cached fields, so the internal properties are called e.g. `pos` not `$pos`. This shortens generated code, and makes writing implementations simpler.
@graphite-app graphite-app bot force-pushed the 06-13-refactor_napi_parser_lazy_deserializer_prefix_local_cache_property_keys_with_ branch from 318b4b0 to f1f3c30 Compare June 13, 2025 12:41
@graphite-app graphite-app bot merged commit f1f3c30 into main Jun 13, 2025
15 checks passed
@graphite-app graphite-app bot deleted the 06-13-refactor_napi_parser_lazy_deserializer_prefix_local_cache_property_keys_with_ branch June 13, 2025 12:47
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jun 13, 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 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