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

Do not mark variable access in files without side effects as TDZ #4866

Merged
merged 1 commit into from
Feb 18, 2023

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

The logic to deoptimize variables when accessed in their temporal dead zone did not take module boundaries into account, leading to falsely deoptimized variables and wrongly attributed side effects.

@lukastaegert lukastaegert marked this pull request as ready for review February 18, 2023 19:30
@netlify
Copy link

netlify bot commented Feb 18, 2023

Deploy Preview for rollupjs ready!

Name Link
🔨 Latest commit 587510e
🔍 Latest deploy log https://app.netlify.com/sites/rollupjs/deploys/63f12808c3e46d00083a1dce
😎 Deploy Preview https://deploy-preview-4866--rollupjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

github-actions bot commented Feb 18, 2023

Thank you for your contribution! ❤️

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

npm install rollup/rollup#gh-4808-cross-module-TDZs

or load it into the REPL:
https://deploy-preview-4866--rollupjs.netlify.app/repl/?pr=4866

@codecov
Copy link

codecov bot commented Feb 18, 2023

Codecov Report

Merging #4866 (587510e) into master (e6148a8) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #4866   +/-   ##
=======================================
  Coverage   98.98%   98.98%           
=======================================
  Files         219      219           
  Lines        7943     7943           
  Branches     2189     2188    -1     
=======================================
  Hits         7862     7862           
  Misses         26       26           
  Partials       55       55           
Impacted Files Coverage Δ
cli/run/batchWarnings.ts 99.17% <ø> (ø)
cli/run/build.ts 90.62% <ø> (ø)
cli/run/index.ts 100.00% <ø> (ø)
cli/run/loadConfigFromCommand.ts 100.00% <ø> (ø)
cli/run/watch-cli.ts 86.11% <ø> (ø)
cli/run/loadConfigFile.ts 96.61% <100.00%> (ø)
src/ast/nodes/Identifier.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@lukastaegert lukastaegert merged commit 2a9abba into master Feb 18, 2023
@lukastaegert lukastaegert deleted the gh-4808-cross-module-TDZs branch February 18, 2023 19:44
@rollup-bot
Copy link
Collaborator

This PR has been released as part of rollup@3.17.1. 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.

Tree-shaking of unused classes is broken
2 participants