-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Correct the logic of include in BinaryExpression and don't optimize external references away #6041
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
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/6040 Notice: 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:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
BinaryExpression
include logic: ifincluded
was set totrue
before callingsuper.include()
, theinclude()
logic forleft
andright
would not be executed.Include changes from #6042.