Skip to content

add concatenate modules side effects test case, fix imports order - #15868

Merged
sokra merged 3 commits into
mainfrom
add-concatenate-modules-test-case
Jun 28, 2022
Merged

sokra merged 3 commits into
mainfrom
add-concatenate-modules-test-case

Conversation

@vankop

@vankop vankop commented May 27, 2022 •

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?
add test case, fixes #15866

Did you add tests for your changes?
yes

Does this PR introduce a breaking change?
no

What needs to be documented once your changes are merged?
nothing

@webpack-bot

Copy link
Copy Markdown
Contributor

For maintainers only:

  • This needs to be documented (issue in webpack/webpack.js.org will be filed when merged)
  • This needs to be backported to webpack 4 (issue will be created when merged)

@vankop vankop changed the title add concatenate modules side effects test case add concatenate modules side effects test case, fix imports order May 27, 2022
@sokra

sokra commented Jun 2, 2022

Copy link
Copy Markdown
Member

Opting out of side effects also opts out of evaluation of modules in source order. So technically we are allowed to place side effect free modules in any order, but at least it must be deterministic. Without module concatenation modules are evaluated in usage order, so sorting by range start seems correct.

Test case need to test the sideEffects: false case.

@pgoldberg

Copy link
Copy Markdown
Contributor

@vankop Thank you for the fix! Are there any updates on when this might merge?

@vankop

vankop commented Jun 25, 2022

Copy link
Copy Markdown
Contributor Author

@pgoldberg next release I guess..

@sokra
sokra merged commit b2ecd5d into main Jun 28, 2022
@sokra
sokra deleted the add-concatenate-modules-test-case branch June 28, 2022 09:27
@sokra

sokra commented Jun 28, 2022

Copy link
Copy Markdown
Member

Thanks

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.

Concatenated modules have nondeterministic ordering when side effect analysis is on

4 participants