8000 refactor(transformer/class-properties): debug assert `private_field_count` is 0 at end of transform by overlookmotel · Pull Request #10457 · oxc-project/oxc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor(transformer/class-properties): debug assert private_field_count is 0 at end of transform #10457

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
Contributor
@overlookmotel overlookmotel commented Apr 16, 2025

private_field_count is incremented when entering a class with private properties/methods and decremented when leaving it. Make sure this is working correctly by ensuring private_field_count == 0 at the end of the transform.

As suggested in #10447 (review).

Copy link
Contributor Author
overlookmotel commented Apr 16, 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.

8000

@overlookmotel overlookmotel marked this pull request as ready for review April 16, 2025 20:34
@overlookmotel overlookmotel requested a review from Dunqing as a code owner April 16, 2025 20:34
@github-actions github-actions bot added A-transformer Area - Transformer / Transpiler C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Apr 16, 2025
Copy link
codspeed-hq bot commented Apr 16, 2025

CodSpeed Instrumentation Performance Report

Merging #10457 will not alter performance

Comparing 04-16-refactor_transformer_class-properties_debug_assert_private_field_count_is_0_at_end_of_transform (e0ef9a8) with main (45f8cc0)

Summary

✅ 36 untouched benchmarks

@overlookmotel
Copy link
Contributor Author

@Dunqing Oh dear!

@Dunqing Dunqing force-pushed the 04-16-refactor_transformer_class-properties_debug_assert_private_field_count_is_0_at_end_of_transform branch from ccc2df1 to e68cb60 Compare April 17, 2025 08:44
@Dunqing Dunqing changed the base branch from main to graphite-base/10457 April 17, 2025 08:51
@Dunqing Dunqing force-pushed the 04-16-refactor_transformer_class-properties_debug_assert_private_field_count_is_0_at_end_of_transform branch from e68cb60 to 51a8979 Compare April 17, 2025 08:51
@Dunqing Dunqing changed the base branch from graphite-base/10457 to 04-17-fix_transformer_class-properties_private_field_count_is_incorrect_when_class_only_have_accessor_with_private_field April 17, 2025 08:51
@Dunqing
Copy link
Member
Dunqing commented Apr 17, 2025

I fixed the panic in #10463 and moved this PR to be based on that.

@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Apr 17, 2025
Copy link
Contributor Author
overlookmotel commented Apr 17, 2025

Merge activity

@graphite-app graphite-app bot changed the base branch from 04-17-fix_transformer_class-properties_private_field_count_is_incorrect_when_class_only_have_accessor_with_private_field to graphite-base/10457 April 17, 2025 10:15
@graphite-app graphite-app bot changed the base branch from graphite-base/10457 to main April 17, 2025 10:22
…ount` is 0 at end of transform (#10457)

`private_field_count` is incremented when entering a class with private properties/methods and decremented when leaving it. Make sure this is working correctly by ensuring `private_field_count == 0` at the end of the transform.

As suggested in #10447 (review).
@graphite-app graphite-app bot force-pushed the 04-16-refactor_transformer_class-properties_debug_assert_private_field_count_is_0_at_end_of_transform branch from 51a8979 to e0ef9a8 Compare April 17, 2025 10:23
@graphite-app graphite-app bot merged commit e0ef9a8 into main Apr 17, 2025
28 checks passed
@graphite-app graphite-app bot deleted the 04-16-refactor_transformer_class-properties_debug_assert_private_field_count_is_0_at_end_of_transform branch April 17, 2025 10:30
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-transformer Area - Transformer / Transpiler 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.

2 participants
0