oxc-project / oxc-project/backlog
parser: make sure `ParserOptions::preserve_parens` work for all tools
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 7
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
It's currently broken in various places, try make it off by default and see things break apart by running just c.
We require this off by default for the minifier, to make the whole tool chain work in unison.
The current work around is a prepass in the minifer, which has some overhead, ~10% for typescript.js.
minifier/react.development.js
time: [296.99 µs 300.41 µs 305.12 µs]
Found 3 outliers among 100 measurements (3.00%)
1 (1.00%) high mild
2 (2.00%) high severe
Benchmarking minifier/typescript.js: Collecting 100 samples in estimated 9.3113 s (200 iterat
minifier/typescript.js time: [44.802 ms 45.090 ms 45.430 ms]
Found 10 outliers among 100 measurements (10.00%)
10 (10.00%) high severe
[react.development.js] - using [/Users/boshen/oxc/oxc/target/react.development.js]
[typescript.js] - using [/Users/boshen/oxc/oxc/target/typescript.js]
Benchmarking prepass/react.development.js: Collecting 100 samples in estimated 5.0674 s (333k
prepass/react.development.js
time: [15.262 µs 15.358 µs 15.515 µs]
Found 8 outliers among 100 measurements (8.00%)
5 (5.00%) high mild
3 (3.00%) high severe
Benchmarking prepass/typescript.js: Collecting 100 samples in estimated 5.2454 s (1400 iterat
prepass/typescript.js time: [3.6823 ms 3.6879 ms 3.6938 ms]
Found 6 outliers among 100 measurements (6.00%)
2 (2.00%) low mild
3 (3.00%) high mild
1 (1.00%) high severe
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ParserOptions::preserve_parens and run just c to identify the tools and cases that break when it is disabled. Trace the minifier's current prepass workaround and verify that the option is off by default across the tool chain without requiring that overhead.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- compilers, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100