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

[v2.0.0] Remove experimentalOptimizeChunks #3343

Merged
merged 6 commits into from Feb 14, 2020

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:
Closes #3340

Description

experimentalOptimizeChunks has for a long time been a badly tested, unmaintained huge chunk of code that added a lot of complexity. Now that actual issues started popping up for this feature, I would like to remove it for v2.0.0. If we want to reintroduce it later, I would write a completely new version based on moving the chunking to generateBundle first and not merging chunks after they have been created.

@codecov
Copy link

codecov bot commented Jan 18, 2020

Codecov Report

Merging #3343 into release-2.0.0 will increase coverage by 0.76%.
The diff coverage is n/a.

Impacted file tree graph

@@                Coverage Diff                @@
##           release-2.0.0    #3343      +/-   ##
=================================================
+ Coverage          94.23%   95.00%   +0.76%     
=================================================
  Files                173      172       -1     
  Lines               5949     5802     -147     
  Branches            1756     1712      -44     
=================================================
- Hits                5606     5512      -94     
+ Misses               190      157      -33     
+ Partials             153      133      -20     

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 a5c193d...89bd6d2. Read the comment docs.

@lukastaegert lukastaegert changed the base branch from master to release-2.0.0 January 18, 2020 11:37
@frank-dspeed
Copy link
Contributor

i am for letting it stay and do your reimplamentation in a extra branch while keeping the original implamentation some do relay on it.you can do a none experimentalOtimizeChunks

@lukastaegert
Copy link
Member Author

I can let it stay, but really, we cannot give any support for this. manualChunks are a much better and well tested way of merging chunks that gives you full control. I recommend to rather switch to using manualChunks for fine-tuning.

@frank-dspeed
Copy link
Contributor

@lukastaegert i totally agree with your idea of manual chunks that only should get better documented i am for a deprecation msg added to expermentalOptimized as also a link to a valid replacement example in the documentation using manualChunks

@lukastaegert lukastaegert added this to In progress in Release 2.0.0 via automation Jan 21, 2020
@lukastaegert lukastaegert moved this from In progress to Ready for merge in Release 2.0.0 Jan 21, 2020
@lukastaegert lukastaegert force-pushed the remove-experimental-optimize-chunks branch from 2237c47 to 1952d2f Compare January 21, 2020 07:38
@lukastaegert lukastaegert force-pushed the remove-experimental-optimize-chunks branch 2 times, most recently from db44224 to f13c3b2 Compare January 29, 2020 10:42
* Update CI to only run on Node 10 and 12, add engines to package.json

* Update TypeScript target

* Remove Bublé as a transpilation option from tests (it is still needed in sourcemap tests)

* Remove minNodeVersion form tests

* Reformat package.json
* Create a separate chunk for watch mode via a dynamic import

* Bundle chokidar

* Handle conditional fsevents import

* Only run tests on Node 10 and 12 as we want to do this anyway and chokidar depends on utils.promisify

* Improve chunking

* Refactor and simplify watcher

* Make watcher a proper parameter

* Only unwatch and watch on Linux systems

* No longer run JS files through TypeScript for improved bundling performance
* Remove active deprecations

* Make inactive deprecations active

* Improve coverage

* Improve coverage

* Refine transformer

* Improve coverage

* Refactoring option normalization

* Improve coverage
@LarsDenBakker
Copy link
Contributor

Id say drop this, there is a lot of work being done to optimize chunking already.

@lukastaegert
Copy link
Member Author

I will remove the feature from the 2.0.0 branch for the time being. Effectively what this feature does is creating small manual chunks for very small shared modules, albeit in a fashion that avoids too much unnecessary code being loaded. It can be replicated via manual chunks, albeit with a little work. Once 2.0.0 is settled and the necessary refactorings are done, we can look if we want to reintroduce something like this.

@rollup-bot
Copy link
Collaborator

Thank you for your contribution! ❤️

You can try out this pull request locally via

npm install rollup/rollup#remove-experimental-optimize-chunks

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

@lukastaegert lukastaegert merged commit de04b69 into release-2.0.0 Feb 14, 2020
Release 2.0.0 automation moved this from Ready for merge to Done Feb 14, 2020
@lukastaegert lukastaegert deleted the remove-experimental-optimize-chunks branch February 14, 2020 06:22
@lukastaegert lukastaegert mentioned this pull request Feb 14, 2020
9 tasks
lukastaegert added a commit that referenced this pull request Feb 19, 2020
* [v2.0.0] Update minimum required Node version to 10 (#3346)

* Update CI to only run on Node 10 and 12, add engines to package.json

* Update TypeScript target

* Remove Bublé as a transpilation option from tests (it is still needed in sourcemap tests)

* Remove minNodeVersion form tests

* Reformat package.json

* [v2.0.0] Bundle chokidar (#3331)

* Create a separate chunk for watch mode via a dynamic import

* Bundle chokidar

* Handle conditional fsevents import

* Only run tests on Node 10 and 12 as we want to do this anyway and chokidar depends on utils.promisify

* Improve chunking

* Refactor and simplify watcher

* Make watcher a proper parameter

* Only unwatch and watch on Linux systems

* No longer run JS files through TypeScript for improved bundling performance

* [v2.0.0] Remove active deprecations (#3352)

* Remove active deprecations

* Make inactive deprecations active

* Improve coverage

* Improve coverage

* Refine transformer

* Improve coverage

* Refactoring option normalization

* Improve coverage

* Remove experimentalOptimizeChunks

* Remove more unused code
lukastaegert added a commit that referenced this pull request Feb 26, 2020
* [v2.0.0] Update minimum required Node version to 10 (#3346)

* Update CI to only run on Node 10 and 12, add engines to package.json

* Update TypeScript target

* Remove Bublé as a transpilation option from tests (it is still needed in sourcemap tests)

* Remove minNodeVersion form tests

* Reformat package.json

* [v2.0.0] Bundle chokidar (#3331)

* Create a separate chunk for watch mode via a dynamic import

* Bundle chokidar

* Handle conditional fsevents import

* Only run tests on Node 10 and 12 as we want to do this anyway and chokidar depends on utils.promisify

* Improve chunking

* Refactor and simplify watcher

* Make watcher a proper parameter

* Only unwatch and watch on Linux systems

* No longer run JS files through TypeScript for improved bundling performance

* [v2.0.0] Remove active deprecations (#3352)

* Remove active deprecations

* Make inactive deprecations active

* Improve coverage

* Improve coverage

* Refine transformer

* Improve coverage

* Refactoring option normalization

* Improve coverage

* Remove experimentalOptimizeChunks

* Remove more unused code
lukastaegert added a commit that referenced this pull request Mar 6, 2020
* [v2.0.0] Update minimum required Node version to 10 (#3346)

* Update CI to only run on Node 10 and 12, add engines to package.json

* Update TypeScript target

* Remove Bublé as a transpilation option from tests (it is still needed in sourcemap tests)

* Remove minNodeVersion form tests

* Reformat package.json

* [v2.0.0] Bundle chokidar (#3331)

* Create a separate chunk for watch mode via a dynamic import

* Bundle chokidar

* Handle conditional fsevents import

* Only run tests on Node 10 and 12 as we want to do this anyway and chokidar depends on utils.promisify

* Improve chunking

* Refactor and simplify watcher

* Make watcher a proper parameter

* Only unwatch and watch on Linux systems

* No longer run JS files through TypeScript for improved bundling performance

* [v2.0.0] Remove active deprecations (#3352)

* Remove active deprecations

* Make inactive deprecations active

* Improve coverage

* Improve coverage

* Refine transformer

* Improve coverage

* Refactoring option normalization

* Improve coverage

* Remove experimentalOptimizeChunks

* Remove more unused code
lukastaegert added a commit that referenced this pull request Mar 6, 2020
* [v2.0.0] Update minimum required Node version to 10 (#3346)

* Update CI to only run on Node 10 and 12, add engines to package.json

* Update TypeScript target

* Remove Bublé as a transpilation option from tests (it is still needed in sourcemap tests)

* Remove minNodeVersion form tests

* Reformat package.json

* [v2.0.0] Bundle chokidar (#3331)

* Create a separate chunk for watch mode via a dynamic import

* Bundle chokidar

* Handle conditional fsevents import

* Only run tests on Node 10 and 12 as we want to do this anyway and chokidar depends on utils.promisify

* Improve chunking

* Refactor and simplify watcher

* Make watcher a proper parameter

* Only unwatch and watch on Linux systems

* No longer run JS files through TypeScript for improved bundling performance

* [v2.0.0] Remove active deprecations (#3352)

* Remove active deprecations

* Make inactive deprecations active

* Improve coverage

* Improve coverage

* Refine transformer

* Improve coverage

* Refactoring option normalization

* Improve coverage

* Remove experimentalOptimizeChunks

* Remove more unused code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Release 2.0.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants