Skip to content

Improve documentation for manualPureFunctions#6402

Merged
lukastaegert merged 2 commits into
masterfrom
gh-6399_wrongly_removed_pure
Jun 4, 2026
Merged

Improve documentation for manualPureFunctions#6402
lukastaegert merged 2 commits into
masterfrom
gh-6399_wrongly_removed_pure

Conversation

@lukastaegert
Copy link
Copy Markdown
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

Copilot AI review requested due to automatic review settings June 2, 2026 05:51
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rollup Ready Ready Preview, Comment Jun 3, 2026 5:21am

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Documents a known limitation of treeshake.manualPureFunctions: arguments passed to a manually-marked pure function are only checked for direct side effects, not for whether the arguments themselves (e.g. callbacks) might be invoked with side effects. This addresses the confusion described in issue #6399.

Changes:

  • Adds a warning callout under the manualPureFunctions section explaining that callback arguments are not inspected for side effects.
  • Provides three short examples illustrating which calls are retained vs. removed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/configuration-options/index.md Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Thank you for your contribution! ❤️

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

npm install rollup/rollup#gh-6399_wrongly_removed_pure

Notice: Ensure you have installed the latest nightly 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-oz84d98kf-rollup-js.vercel.app/repl/?pr=6402

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Performance report

  • BUILD: 7102ms (-160ms, -2.2%), 833 MB
    • initialize: 0ms, 23.9 MB
    • generate module graph: 2615ms, 632 MB
      • generate ast: 1343ms (-39ms, -2.8%), 625 MB
    • sort and bind modules: 458ms, 689 MB
    • mark included statements: 4022ms, 833 MB
      • treeshaking pass 1: 2264ms, 824 MB
      • treeshaking pass 2: 493ms, 857 MB (+3%)
      • treeshaking pass 3: 432ms, 831 MB
      • treeshaking pass 4: 416ms, 866 MB (+7%)
      • treeshaking pass 5: 416ms, 833 MB
  • GENERATE: 728ms, 939 MB (+3%)
    • initialize render: 0ms, 833 MB
    • generate chunks: 43ms, 856 MB
      • optimize chunks: 0ms, 849 MB
    • render chunks: 667ms, 913 MB
    • transform chunks: 17ms, 939 MB (+3%)
    • generate bundle: 0ms, 939 MB (+3%)

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.78%. Comparing base (765167f) to head (9cefb6a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6402   +/-   ##
=======================================
  Coverage   98.78%   98.78%           
=======================================
  Files         274      274           
  Lines       10785    10785           
  Branches     2882     2882           
=======================================
  Hits        10654    10654           
  Misses         89       89           
  Partials       42       42           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@lukastaegert lukastaegert merged commit f2a0449 into master Jun 4, 2026
48 checks passed
@lukastaegert lukastaegert deleted the gh-6399_wrongly_removed_pure branch June 4, 2026 04:38
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

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.

2 participants