refactor(swc): make the primary compilation path linear - #12023
refactor(swc): make the primary compilation path linear#12023magic-akari wants to merge 1 commit into
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d63922c96e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".
d63922c to
b886bdc
Compare
|
Move the primary compiler path to an explicit resolve-config, parse, transform, minify, and finalize pipeline, while freezing build_as_input under config::legacy for bundler and custom-pass compatibility. Expose Compiler::compile as a lazy request with codegen and AST terminals. Keep emit-only preparation on codegen, retain comments and helper requirements for AST consumers, and provide paired inspect/mutate hooks after parsing, resolution, and the post-syntax checkpoint. Route process_js_file, process_js, and the default Node and wasm transforms through the direct pipeline. Keep Flow source classification on source input without reclassifying caller-supplied Program variants.
b886bdc to
34d363e
Compare
|
Codex (@codex) review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 34d363eb67
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".
|
As magic-akari requested, I'll wait for a review from CPunisher 😄 |
Donny/강동윤 (kdy1)
left a comment
There was a problem hiding this comment.
Thank you!
CPunisher I think this PR is good to go. Can you take a look?
Description:
Make the primary SWC compilation pipeline explicit:
resolve config → parse → transform → minify → finalizeAdd a lazy
Compiler::compileAPI with AST/codegen terminals and paired inspect/mutate hooks; migrate the default Node/wasm paths and isolate delayedbuild_as_inputunderconfig/legacy.Codegen remains outside the pipeline, with emit preparation before transforms; Flow behavior is preserved, wasm custom passes remain on legacy for ABI/timing compatibility, and wasm span snapshots shift only because skipped inactive React setup no longer advances the shared
SourceMap(generated output is unchanged).BREAKING CHANGE:
Related issue (if exists):