Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Originally, I wanted to make the conversion of flags easier by providing a macro just for encoding flags. However it turned out that it was not too difficult to generate macros for about half the AST nodes that can completely take over the encoding, so this happens in this PR. With a little more work, some of the remaining AST nodes can probably still be encoded, but this already helps a lot in adding new features like TypeScript and JSX.
It will also make it easier to swap the parser at some point if we want to.

Copy link

vercel bot commented May 29, 2024

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 Jun 1, 2024 5:33am

Copy link

github-actions bot commented May 29, 2024

Thank you for your contribution! ❤️

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

npm install rollup/rollup#macros-for-flags

Notice: Ensure you 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-3p7c1q4zr-rollup-js.vercel.app/repl/?pr=5532

Copy link

github-actions bot commented May 29, 2024

Performance report!

Rough benchmark

Command Mean [s] Min [s] Max [s] Relative
node _benchmark/previous/bin/rollup -i ./perf/entry.js -o _benchmark/result/previous.js 9.330 ± 0.071 9.273 9.409 1.01 ± 0.01
node _benchmark/current/bin/rollup -i ./perf/entry.js -o _benchmark/result/current.js 9.203 ± 0.087 9.102 9.257 1.00

Internal benchmark

  • BUILD: 8219ms, 754 MB
    • initialize: 0ms, 26.1 MB
    • generate module graph: 3153ms, 575 MB
      • generate ast: 1512ms, 567 MB
    • sort and bind modules: 449ms, 617 MB
    • mark included statements: 4617ms, 754 MB
      • treeshaking pass 1: 1559ms, 719 MB
      • treeshaking pass 2: 751ms, 740 MB
      • treeshaking pass 3: 293ms, 741 MB
      • treeshaking pass 4: 272ms, 745 MB
      • treeshaking pass 5: 319ms, 752 MB
      • treeshaking pass 6: 263ms, 751 MB
      • treeshaking pass 7: 246ms, 750 MB
      • treeshaking pass 8: 238ms, 754 MB
      • treeshaking pass 9: 218ms, 751 MB
      • treeshaking pass 10: 219ms, 748 MB
      • treeshaking pass 11: 215ms, 754 MB
  • GENERATE: 889ms, 1.02 GB
    • initialize render: 0ms, 913 MB
    • generate chunks: 81ms, 925 MB
      • optimize chunks: 0ms, 919 MB
    • render chunks: 791ms, 997 MB
    • transform chunks: 16ms, 1.02 GB
    • generate bundle: 0ms, 1.02 GB

Copy link

codecov bot commented May 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.81%. Comparing base (b5df98b) to head (13ce2b9).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5532   +/-   ##
=======================================
  Coverage   98.81%   98.81%           
=======================================
  Files         238      238           
  Lines        9544     9544           
  Branches     2439     2439           
=======================================
  Hits         9431     9431           
  Misses         48       48           
  Partials       65       65           

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

@lukastaegert lukastaegert merged commit 178794b into master Jun 8, 2024
@lukastaegert lukastaegert deleted the macros-for-flags branch June 8, 2024 04:59
Copy link

github-actions bot commented Jul 8, 2024

This PR has been released as part of [email protected]. 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.

1 participant