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(rust): add print in OxcCompiler #281

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

hyf0
Copy link
Member

@hyf0 hyf0 commented Nov 15, 2023

Description

Test Plan


@hyf0
Copy link
Member Author

hyf0 commented Nov 15, 2023

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@Boshen
Copy link
Member

Boshen commented Nov 15, 2023

Why do we need codegen again?

@hyf0
Copy link
Member Author

hyf0 commented Nov 15, 2023

Why do we need codegen again?

We plan to add some pre-transpile operations for some thing like contestants folding. After transpiling, we need to transform the ast to string, and use the string as the input for bundling. This make sure the ast rolldown scans have no inconsistency between the ast and the source code.

@Boshen
Copy link
Member

Boshen commented Nov 15, 2023

Why do we need codegen again?

We plan to add some pre-transpile operations for some thing like contestants folding. After transpiling, we need to transform the ast to string, and use the string as the input for bundling. This make sure the ast rolldown scans have no inconsistency between the ast and the source code.

Thanks! So this is preparation for the transformer.

@hyf0
Copy link
Member Author

hyf0 commented Nov 15, 2023

Why do we need codegen again?

We plan to add some pre-transpile operations for some thing like contestants folding. After transpiling, we need to transform the ast to string, and use the string as the input for bundling. This make sure the ast rolldown scans have no inconsistency between the ast and the source code.

Thanks! So this is preparation for the transformer.

Yeah. Many transform functionality require this. TypeScript, JSX and so on. Also for some internal plugins using oxc, rolldown only support passing around string between transform hooks, which also requires this.

@hyf0 hyf0 merged commit ad962af into main Nov 15, 2023
6 checks passed
@hyf0 hyf0 deleted the 11-15-feat_rust_add_print_in_OxcCompiler_ branch November 15, 2023 14:22
houyunlu pushed a commit that referenced this pull request Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants