8000 Fix prop inclusion with try-catch-deoptimization by lukastaegert · Pull Request #5842 · rollup/rollup · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix prop inclusion with try-catch-deoptimization #5842

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

Merged
merged 3 commits into from
Feb 14, 2025

Conversation

lukastaegert
Copy link
Member

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:

Description

This cleans up and refines how argument inclusion and try-catch deoptimization handle prop inclusion. I wanted to do this anyway for another forthcoming PR but it turns out, this already solves #5839.

< 8000 path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" />

- When call arguments are included, do not call "include" on the "this" argument
  again, as this will already be included at the call site. This allows to make
  the inclusion logic more straightforward
- create shared helper to do that
- if a call/new/tagged template expression is called with recursive inclusion,
  do not specifically include the arguments. Instead, if an identifier is
  included recursively, then include an unknown path of the variable.
Copy link
vercel bot commented Feb 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rollup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 14, 2025 8:58am

Copy link
github-actions bot commented Feb 14, 2025

Thank you for your contribution! ❤️

You can try out this pull request locally by installing Rollup via

npm install rollup/rollup#fix_try_statement_return_props

Notice: Ensure you have installed the latest stable 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:
https://rollup-2dh0epilt-rollup-js.vercel.app/repl/?pr=5842

Copy link

Performance report

  • BUILD: 7380ms, 749 MB
    • initialize: 0ms, 28.1 MB
    • generate module graph: 2834ms, 559 MB
      • generate ast: 1277ms, 552 MB
    • sort and bind modules: 407ms, 601 MB
    • mark included statements: 4130ms, 749 MB
      • treeshaking pass 1: 2414ms, 743 MB
      • treeshaking pass 2: 482ms (+13ms, +2.8%), 748 MB
      • treeshaking pass 3: 410ms, 747 MB
      • treeshaking pass 4: 405ms (+11ms, +2.8%), 743 MB
      • treeshaking pass 5: 403ms (+14ms, +3.5%), 749 MB
  • GENERATE: 745ms, 988 MB
    • initialize render: 0ms, 882 MB
    • generate chunks: 74ms, 892 MB
      • optimize chunks: 0ms, 890 MB
    • render chunks: 651ms, 962 MB
    • transform chunks: 16ms, 988 MB
    • generate bundle: 0ms, 988 MB

Copy link
codecov bot commented Feb 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.54%. Comparing base (a724b60) to head (15614bd).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5842      +/-   ##
==========================================
+ Coverage   98.53%   98.54%   +0.01%     
==========================================
  Files         269      269              
  Lines        8547     8544       -3     
  Branches     1466     1466              
==========================================
- Hits         8422     8420       -2     
+ Misses         93       92       -1     
  Partials       32       32              

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

@lukastaegert lukastaegert merged commit 15a6f73 into master Feb 14, 2025
41 checks passed
@lukastaegert lukastaegert deleted the fix_try_statement_return_props branch February 14, 2025 09:28
Copy link

This PR has been released as part of rollup@4.34.7. You can test it via npm install rollup.

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.

tryCatchDeoptimization:true removes object properties that are used in try bodies
1 participant
0