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

Properly include reexports for implicit dependencies #3688

Merged
merged 1 commit into from Jul 22, 2020

Conversation

lukastaegert
Copy link
Member

@lukastaegert lukastaegert commented Jul 22, 2020

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:
Resolves #3683

Description

When an implicitly dependent chunk contained reexports from other chunks that were not actually used in that chunk, then the reexporting modules were not properly linked as a dependency to the implicit entry chunk. This resulted in missing exports in some cases and weird errors in others.
This fixes this by using the same logic as for regular and dynamic entry points here (which was forgotten for implicit entry points).

@rollup-bot
Copy link
Collaborator

Thank you for your contribution! ❤️

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

npm install rollup/rollup#implicit-dependent-chunk-fixes

or load it into the REPL:
https://rollupjs.org/repl/?circleci=12377

@codecov
Copy link

codecov bot commented Jul 22, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@21cc03d). Click here to learn what that means.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #3688   +/-   ##
=========================================
  Coverage          ?   96.78%           
=========================================
  Files             ?      183           
  Lines             ?     6319           
  Branches          ?     1843           
=========================================
  Hits              ?     6116           
  Misses            ?      105           
  Partials          ?       98           
Impacted Files Coverage Δ
src/Module.ts 100.00% <100.00%> (ø)
src/ast/variables/ExportDefaultVariable.ts 100.00% <0.00%> (ø)
src/ast/variables/ThisVariable.ts 66.66% <0.00%> (ø)
src/ast/nodes/shared/MultiExpression.ts 100.00% <0.00%> (ø)
src/ast/nodes/shared/Node.ts 96.96% <0.00%> (ø)
src/utils/options/options.ts 100.00% <0.00%> (ø)
src/utils/identifierHelpers.ts 100.00% <0.00%> (ø)
src/utils/getIndentString.ts 100.00% <0.00%> (ø)
src/ast/nodes/DoWhileStatement.ts 100.00% <0.00%> (ø)
src/utils/chunkAssignment.ts 100.00% <0.00%> (ø)
... and 174 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 21cc03d...2d185ae. Read the comment docs.

@lukastaegert lukastaegert merged commit 9f84284 into master Jul 22, 2020
@lukastaegert lukastaegert deleted the implicit-dependent-chunk-fixes branch July 22, 2020 04:39
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.

Exports without side effects removed from emitted chunk with implicitlyLoadedAfterOneOf
2 participants