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

fix(transformer): TransformOptions::enable_all enable decorator transform #9946

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

overlookmotel
Copy link
Contributor

No description provided.

@github-actions github-actions bot added A-transformer Area - Transformer / Transpiler C-bug Category - Bug labels Mar 21, 2025
Copy link
Contributor Author

overlookmotel commented Mar 21, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


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.

Copy link

codspeed-hq bot commented Mar 21, 2025

CodSpeed Instrumentation Performance Report

Merging #9946 will not alter performance

Comparing 03-21-fix_transformer_transformoptions_enable_all_enable_decorator_transform (19b6fe1) with main (c7fc700)

Summary

✅ 33 untouched benchmarks

@overlookmotel
Copy link
Contributor Author

Oh dear!

@Dunqing
Copy link
Member

Dunqing commented Mar 21, 2025

Oh dear, I think we should turn off the legacy decorator plugin for conformance and monitor-oxc because we don't know where the decorator in code is es or the legacy decorator. Transform es decorator by legacy decorator plugin which might cause unexpected circumstances and vice versa.

@overlookmotel overlookmotel changed the base branch from main to graphite-base/9946 March 21, 2025 12:28
@overlookmotel overlookmotel force-pushed the 03-21-fix_transformer_transformoptions_enable_all_enable_decorator_transform branch from 6d55a4e to 114ac43 Compare March 21, 2025 12:28
@overlookmotel overlookmotel changed the base branch from graphite-base/9946 to 03-21-fix_transformer_decorator_do_not_lose_weakmap_when_decorator_and_class_properties_transforms_combined March 21, 2025 12:28
@overlookmotel
Copy link
Contributor Author

overlookmotel commented Mar 21, 2025

After #9952, conformance all passes (well at least doesn't panic!) with legacy: true.

But with emit_decorator_metadata: true there's a panic in this test case:

https://github.com/microsoft/TypeScript/blob/4dc677b292354f4b9162452b2e00f4d7dd118221/tests/cases/compiler/exportedInterfaceInaccessibleInCallbackInModule.ts

on this line:

let old_class_symbol_id = old_class_symbol_id.expect("class always has a symbol id");

I assume this is due to #7278.

I think it'd be ideal to enable decorators transform on conformance, even if we don't on monitor_oxc (for the reasons you gave).

@graphite-app graphite-app bot changed the base branch from 03-21-fix_transformer_decorator_do_not_lose_weakmap_when_decorator_and_class_properties_transforms_combined to graphite-base/9946 March 21, 2025 14:09
@graphite-app graphite-app bot force-pushed the graphite-base/9946 branch from 03051ae to c7fc700 Compare March 21, 2025 14:18
@graphite-app graphite-app bot force-pushed the 03-21-fix_transformer_transformoptions_enable_all_enable_decorator_transform branch from 114ac43 to 5307da4 Compare March 21, 2025 14:18
@graphite-app graphite-app bot changed the base branch from graphite-base/9946 to main March 21, 2025 14:19
@graphite-app graphite-app bot force-pushed the 03-21-fix_transformer_transformoptions_enable_all_enable_decorator_transform branch from 5307da4 to 19b6fe1 Compare March 21, 2025 14:19
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-bug Category - Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants