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

feat(transformer): add async_generator_functions plugin #6573

Merged

Conversation

Dunqing
Copy link
Member

@Dunqing Dunqing commented Oct 15, 2024

Passed 15/19 tests. The remaining 4 failed tests related to this expression, the problem same as I mentioned in #6658. I will fix them in follow-up PRs.

Copy link

graphite-app bot commented Oct 15, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Member Author

Dunqing commented Oct 15, 2024

@github-actions github-actions bot added A-transformer Area - Transformer / Transpiler C-enhancement Category - New feature or request labels Oct 15, 2024
@Dunqing Dunqing force-pushed the 10-15-feat_transformer_add_async_generator_functions_plugin branch from 3ff16d0 to 4a65e1b Compare October 15, 2024 05:24
@Dunqing Dunqing marked this pull request as draft October 15, 2024 05:26
Copy link

codspeed-hq bot commented Oct 15, 2024

CodSpeed Performance Report

Merging #6573 will not alter performance

Comparing 10-15-feat_transformer_add_async_generator_functions_plugin (934cb5e) with main (af5140f)

Summary

✅ 30 untouched benchmarks

@Dunqing Dunqing force-pushed the 10-15-feat_transformer_add_async_generator_functions_plugin branch 5 times, most recently from 336f775 to f355151 Compare October 28, 2024 14:51
@Boshen Boshen requested a review from overlookmotel October 28, 2024 15:35
@Dunqing Dunqing force-pushed the 10-15-feat_transformer_add_async_generator_functions_plugin branch from ae5c2b8 to 1d41cee Compare October 29, 2024 05:10
@Dunqing Dunqing changed the base branch from main to 10-29-refactor_transformer_async-to-generator_move_transform_methods_to_asyncgeneratorexecutor_and_make_it_public October 29, 2024 05:10
@Dunqing Dunqing added this to the Transformer Milestone 2 milestone Oct 29, 2024
@overlookmotel overlookmotel changed the base branch from 10-29-refactor_transformer_async-to-generator_move_transform_methods_to_asyncgeneratorexecutor_and_make_it_public to graphite-base/6573 October 29, 2024 13:54
@Dunqing Dunqing marked this pull request as ready for review October 30, 2024 08:42
@Dunqing Dunqing requested a review from overlookmotel October 30, 2024 08:42
Copy link
Contributor

@overlookmotel overlookmotel left a comment

Choose a reason for hiding this comment

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

I've not reviewed the whole transform, but nice one getting the semantic tests to pass!

@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Oct 30, 2024
Copy link
Contributor

overlookmotel commented Oct 30, 2024

Merge activity

  • Oct 30, 8:03 AM EDT: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Oct 30, 8:03 AM EDT: Graphite disabled "merge when ready" on this PR due to: a merge conflict with the target branch; resolve the conflict and try again..
  • Oct 30, 8:03 AM EDT: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Oct 31, 5:14 AM EDT: A user added this pull request to the Graphite merge queue.
  • Oct 31, 5:18 AM EDT: A user merged this pull request with the Graphite merge queue.

@Dunqing Dunqing force-pushed the 10-15-feat_transformer_add_async_generator_functions_plugin branch from be7a548 to 90f1da9 Compare October 31, 2024 08:22
@Dunqing Dunqing changed the base branch from graphite-base/6573 to main October 31, 2024 08:22
@overlookmotel
Copy link
Contributor

@Dunqing Looks like CI has got stuck. I see it do this sometimes, don't know why. Solution I've found is:

  • Make a random change (add a dummy comment, whatever) and gt m -a.
  • Revert that change and gt m -a again.
  • gt submit

Or if branch has got behind main, then just gt sync + gt submit also works.

@Dunqing
Copy link
Member Author

Dunqing commented Oct 31, 2024

@Dunqing Looks like CI has got stuck. I see it do this sometimes, don't know why. Solution I've found is:

  • Make a random change (add a dummy comment, whatever) and gt m -a.
  • Revert that change and gt m -a again.
  • gt submit

Or if branch has got behind main, then just gt sync + gt submit also works.

Thanks! That works, just an empty commit so I think it's fine if we don't revert it

Passed 15/19 tests. The remaining 4 failed tests related to `this` expression, the problem same as I mentioned in #6658. I will fix them in follow-up PRs.
@overlookmotel overlookmotel force-pushed the 10-15-feat_transformer_add_async_generator_functions_plugin branch from bb26a2f to 934cb5e Compare October 31, 2024 09:14
@graphite-app graphite-app bot merged commit 934cb5e into main Oct 31, 2024
27 checks passed
@graphite-app graphite-app bot deleted the 10-15-feat_transformer_add_async_generator_functions_plugin branch October 31, 2024 09:18
@oxc-bot oxc-bot mentioned this pull request Nov 4, 2024
Boshen added a commit that referenced this pull request Nov 4, 2024
## [0.35.0] - 2024-11-04

- f543a8d ast: [**BREAKING**] Remove `AstBuilder::*_from_*` methods
(#7073) (overlookmotel)

- b8daab3 transformer: [**BREAKING**] API to `TryFrom<&EnvOptions> for
TransformOptions` and `TryFrom<&BabelOptions> TransformOptions` (#7020)
(Boshen)

- 9a6a2f9 semantic: [**BREAKING**] Remove
`SymbolTable::get_symbol_id_from_span` API (#6955) (Boshen)

### Features

- 854870e ast: Label AST fields with #[ts] (#6987) (ottomated)
- ce5b609 ast: Remove explicit untagged marker on enums (#6915)
(ottomated)
- 9725e3c ast_tools: Add #[estree(always_flatten)] to Span (#6935)
(ottomated)
- fbc297e ast_tools: Move tsify custom types to estree attribute macro
(#6934) (ottomated)
- 169fa22 ast_tools: Default enums to rename_all = "camelCase" (#6933)
(ottomated)
- caa4b1f codegen: Improve printing of comments (#7108) (Boshen)
- 001058a codegen: Always print legal comments on its own line (#7089)
(Boshen)
- 413973d codegen: Print linked and external legal comment (#7059)
(Boshen)
- ee27b92 codegen: Print eof legal comments (#7058) (Boshen)
- 6516f9e codegen: Print inline legal comments (#7054) (Boshen)
- 1e2f012 linter: Add `oxc/no-map-spread` (#6751) (DonIsaac)
- 6d97af4 rust: Use `oxc-miette` (#6938) (Boshen)
- bfdbcf1 transformer: Add `EnvOptions::from_browerslist_query` API
(#7098) (Boshen)
- 21b8e49 transformer: Add `ESTarget` (#7091) (Boshen)
- fcaba4a transformer: Add `TransformerOptions::env` with `EnvOptions`
(#7037) (Boshen)
- 1d906c6 transformer: Class properties transform skeleton (#7038)
(overlookmotel)
- 934cb5e transformer: Add `async_generator_functions` plugin (#6573)
(Dunqing)

### Bug Fixes

- 0601271 ast: Fix `StaticMemberExpression.get_first_object` (#6969)
(tomoya yanagibashi)
- da199c7 ecmascript: Allow getting PropName for object methods (#6967)
(camchenry)
- f5a7134 linter/no-unused-vars: False positive for discarded reads
within sequences (#6907) (DonIsaac)
- 9ed9501 module_lexer: Add missing `export * from 'foo';` case (#7103)
(Boshen)
- d15e408 napi/transform: Fix 'typescript.declaration' option not
working (#7012) (Boshen)
- dcdb9ea napi/transform: Fix test (Boshen)
- caaf00e parser: Fix incorrect parsed `TSIndexSignature` (#7016)
(Boshen)
- b188b4a transformer: Fix typescript globals being recognized as
globals (#7100) (Boshen)
- a2244ff transformer/async-to-generator: Output is incorrect when arrow
function without params (#7052) (Dunqing)
- 7d12669 types: Move @oxc-project/types to dependencies (#6909)
(ottomated)

### Performance

- 6ca01b9 ast: Reduce size of `Comment` (#6921) (overlookmotel)
- c58ec89 data_structures: Optimize `NonEmptyStack::pop` (#7021)
(overlookmotel)
- fa9a4ec parser: Check `.` before `[` in `parse_member_expression_rest`
(#6979) (Boshen)

### Refactor

- b0211a1 ast: `StaticMemberExpression::get_first_object` use loop
instead of recursion (#7065) (overlookmotel)
- fc07458 ast: Move custom types `.d.ts` file (#6931) (overlookmotel)
- c41c013 ast: Rename lifetime (#6922) (overlookmotel)
- 335eb38 ast_tools: Faster formatting Rust code (#6972) (overlookmotel)
- 4cf0085 ast_tools: Reorder imports in generated code (#6926)
(overlookmotel)
- dd79c1b codegen: Replace `daachorse` with string match for annotation
comment (#7064) (Boshen)
- 0bb1aa4 codegen: Move options to its own file (#7053) (Boshen)
- b021147 data_structures: Make all methods of `NonNull` shim
`#[inline(always)]` (#7024) (overlookmotel)
- fb1710a data_structures: Add `#[repr(transparent)]` to `NonNull` shim
(#7023) (overlookmotel)
- f1fc8db data_structures: Add `read` method to `NonNull` shim (#7022)
(overlookmotel)
- cea0e6b isolated_declarations: Do not use `AstBuilder::*_from_*`
methods (#7071) (overlookmotel)
- 97caae1 minifier: Do not use `AstBuilder::*_from_*` methods (#7072)
(overlookmotel)
- 2c7ac29 minifier: Remove `Tri`, use `Option<bool>` instead (#6912)
(Boshen)
- 9926990 napi: Move custom types to bottom of file (#6930)
(overlookmotel)
- 23157bd napi: Types file in root of types package (#6929)
(overlookmotel)
- 953b051 parser: Remove `oxc_ecmascript` crate (#7109) (Boshen)
- fdd480d parser: Do not use `AstBuilder::*_from_*` methods (#7068)
(overlookmotel)
- 9e85b10 parser: Add `ParserImpl::alloc` method (#7063) (overlookmotel)
- 17a938e parser: Use function `parse_type_member_semicolon` (#7018)
(Boshen)
- aa1b29c parser: Remove `parse_ts_index_signature_member` function
(#7017) (Boshen)
- 7f1d1fe transform: Deserialize `BabelPreests::env` directly (#7051)
(Boshen)
- 76947e2 transform: Refactor Babel Targets (#7026) (Boshen)
- d03e622 transformer: Do not use `AstBuilder::*_from_*` methods (#7070)
(overlookmotel)
- 9d384ad transformer: Use `identifier_reference_with_reference_id`
builder method (#7056) (overlookmotel)
- 4688a06 transformer: Use `*_with_scope_id` builder methods where
possible (#7055) (overlookmotel)
- 7122e00 transformer: Use `ctx.alloc` over `ctx.ast.alloc` where
possible (#7066) (overlookmotel)
- a3b68b4 transformer: Flatten dir structure of options/babel/env
(#7049) (Boshen)
- 6d92f36 transformer: Deserialize `BabelOptions::compiler_assumptions`
(#7048) (Boshen)
- f83a760 transformer: Deserialize `BabelOptions::presets` (#7047)
(Boshen)
- 52c20d6 transformer: Deserialize `BabelOptions::plugins` (#7045)
(Boshen)
- e921df6 transformer: Rename `EnvOptions` to `BabelEnvOptions` (#7036)
(Boshen)
- af5140f transformer: Isolate babel options logic (#7034) (Boshen)
- 12aa910 transformer: Clean up `env/targets/query.rs` (#7033) (Boshen)
- 3d174bb transformer: Clean up `BabelOptions` (#7029) (Boshen)
- 6284f84 transformer: Use `Browserslist::Version` (#7028) (Boshen)
- 5b11cdf transformer: Clean up TransformerOptions (#7005) (Boshen)
- f0c87d4 transformer: Mark all EnvOptions as not implemented (#7004)
(Boshen)
- d9edef6 transformer: Combine ObjectRestSpread into a single file
(#7002) (Boshen)
- c945fe7 transformer: Import `oxc_allocator::Box` as `ArenaBox` (#6999)
(overlookmotel)
- fc1af2e transformer: Import `oxc_allocator::Vec` as `ArenaVec` (#6998)
(overlookmotel)
- 63e8bfe transformer: Rename `AString` to `ArenaString` (#6997)
(overlookmotel)
- 562bb9a transformer/async-to-generator: Move transform methods to
`AsyncGeneratorExecutor` and make it public (#6992) (Dunqing)
- e23f7e6 transformer/common: `VarDeclarations` insert either `var` or
`let` statements (#7043) (overlookmotel)
- e5ecbb9 transformer/jsx: Return `&mut T` not `&mut ArenaBox<T>`
(#7001) (overlookmotel)
- 9e66c29 transformer/react-refresh: Small refactor (#6973)
(overlookmotel)
- 1ca8cd2 transformer/react-refresh: Avoid panic for `init` of
`VariableDeclarator` isn't a `BindingIdentifier` (#6937) (Dunqing)
- 5f153ac transformer/react-refresh: Use `VarDeclarations` to insert
declarators (#6884) (Dunqing)
- df3b089 transformer/react-refresh: Use `StatementInjector` to insert
statements (#6881) (Dunqing)
- ae22671 transformer/typescript: Pass `&mut T` not `&mut ArenaBox<T>`
(#7000) (overlookmotel)
- 938ee87 traverse: Do not use `AstBuilder::*_from_*` methods (#7069)
(overlookmotel)

### Styling

- 86ab091 transformer/common: Split up `StatementInjectorStore` methods
into blocks (#7042) (overlookmotel)

### Testing

- 64e2499 module_lexer: Use a single integration test for faster
compilation (#7097) (Boshen)
- 6133a50 transformer: Use a single integration test for faster
compilation (#7099) (Boshen)

---------

Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
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-transformer Area - Transformer / Transpiler C-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants