Correct the logic of include in BinaryExpression and don't optimize external references away#6041
Correct the logic of include in BinaryExpression and don't optimize external references away#6041lukastaegert merged 4 commits intomasterfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Thank you for your contribution! ❤️You can try out this pull request locally by installing Rollup via npm install rollup/rollup#fix/6040Notice: Ensure you have installed the latest nightly Rust toolchain. If you haven't installed it yet, please see https://www.rust-lang.org/tools/install to learn how to download Rustup and install Rust. or load it into the REPL: |
Performance report
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6041 +/- ##
==========================================
+ Coverage 98.77% 98.79% +0.01%
==========================================
Files 271 271
Lines 10597 10601 +4
Branches 2828 2830 +2
==========================================
+ Hits 10467 10473 +6
+ Misses 89 88 -1
+ Partials 41 40 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
lukastaegert
left a comment
There was a problem hiding this comment.
I think the problem was that the includeNode logic was no longer called if this.included was set to true first. I changed it so that it works like in other nodes—the first line is
if (!this.include) this.includeNode(context)
Then all test cases are green as they should be. In general, the purpose of an includeNode method is to deoptimize paths of its children once on the first include, which is what is happening here.
Thanks for your work and the quick fix again, I do not know what I would do without you at the moment ❤️
|
This PR has been released as part of rollup@4.46.2. You can test it via |
Ah, you're right!
Glad I could help — that’s what teammates are for! 🥳 |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
resolves #6040
Description
There was an issue with the previous
BinaryExpressioninclude logic: ifincludedwas set totruebefore callingsuper.include(), theinclude()logic forleftandrightwould not be executed.Include changes from #6042.