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(tree_shaking): pure annotation #1225

Merged
merged 9 commits into from
May 25, 2024
Merged

Conversation

IWANABETHATGUY
Copy link
Contributor

Description

@IWANABETHATGUY IWANABETHATGUY changed the title chore: 🤖 update pure annotation feat: pure annotation May 23, 2024
@IWANABETHATGUY IWANABETHATGUY changed the title feat: pure annotation feat(tree_shaking): pure annotation May 23, 2024
Copy link

netlify bot commented May 23, 2024

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit b3479aa
🔍 Latest deploy log https://app.netlify.com/sites/rolldown-rs/deploys/6650d5e2afbd210008f832de

Copy link

codecov bot commented May 23, 2024

Codecov Report

Attention: Patch coverage is 93.75000% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 87.15%. Comparing base (b07fdde) to head (b3479aa).
Report is 2 commits behind head on main.

Files Patch % Lines
...s/rolldown/src/ast_scanner/side_effect_detector.rs 89.39% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1225      +/-   ##
==========================================
+ Coverage   87.07%   87.15%   +0.07%     
==========================================
  Files         128      128              
  Lines        6376     6467      +91     
==========================================
+ Hits         5552     5636      +84     
- Misses        824      831       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented May 23, 2024

Benchmarks Rust

group                                      pr                                     target
-----                                      --                                     ------
rolldown benchmark/threejs-bundle          1.00     30.7±0.52ms        ? ?/sec    1.03     31.7±0.53ms        ? ?/sec
rolldown benchmark/threejs-scan            1.00     21.4±0.73ms        ? ?/sec    1.02     21.8±0.25ms        ? ?/sec
rolldown benchmark/threejs-sourcemap       1.03     46.1±2.90ms        ? ?/sec    1.00     44.9±0.84ms        ? ?/sec
rolldown benchmark/threejs10x-bundle       1.00    329.9±2.89ms        ? ?/sec    1.01    331.7±4.28ms        ? ?/sec
rolldown benchmark/threejs10x-scan         1.00    211.3±1.67ms        ? ?/sec    1.00    211.2±3.91ms        ? ?/sec
rolldown benchmark/threejs10x-sourcemap    1.00    457.9±6.86ms        ? ?/sec    1.00   459.1±12.46ms        ? ?/sec

Copy link

codspeed-hq bot commented May 23, 2024

CodSpeed Performance Report

Merging #1225 will not alter performance

Comparing feat/pure-annotation1 (b3479aa) with main (b07fdde)

Summary

✅ 6 untouched benchmarks

@IWANABETHATGUY IWANABETHATGUY marked this pull request as ready for review May 24, 2024 18:01
@hyf0 hyf0 self-assigned this May 25, 2024
@IWANABETHATGUY IWANABETHATGUY added this pull request to the merge queue May 25, 2024
Copy link
Member

@hyf0 hyf0 left a comment

Choose a reason for hiding this comment

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

Good work.

// the result Variant should be `Err(usize)`
let insert_index = self
.attached_comment_vecmap
.binary_search_by(|probe| probe.0.end.cmp(&expr.span.start));
Copy link
Member

Choose a reason for hiding this comment

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

I'm fine with this implementation.

However, this feel not right about how to get comments of ast nodes. I was expecting we could get comment of ast node by simply using API like trivias.get_comments(expr.span).

Once oxc support emit comments in codegen, we could see how oxc get comments from oxc ast nodes.

@Boshen cc

@@ -112,6 +112,7 @@ impl RuntimeNormalModuleTask {
);
let mut symbol_for_module = AstSymbols::from_symbol_table(symbol_table);
let facade_path = ResourceId::new("runtime");
let trivias = ast.with_mut(|fields| std::mem::take(fields.trivias));
Copy link
Member

Choose a reason for hiding this comment

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

Probably, it's better to use it directly rather take out trivias field, it might be needed in the future. But this doesn't block merging PR.

Merged via the queue into main with commit d7d2284 May 25, 2024
29 checks passed
@IWANABETHATGUY IWANABETHATGUY deleted the feat/pure-annotation1 branch May 25, 2024 09:26
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.

None yet

2 participants