Skip to content

feat(output): make output folding-friendly using #region - #1330

Merged
hyfdev merged 1 commit into
mainfrom
06-04-feat_output_make_output_folding-friendly_using_region_
Jun 3, 2024
Merged

hyfdev merged 1 commit into
mainfrom
06-04-feat_output_make_output_folding-friendly_using_region_

Conversation

@hyfdev

@hyfdev hyfdev commented Jun 3, 2024 •

Copy link
Copy Markdown
Member

Description

Closes #1278.

I'm gonna close this PR for now due to main-stream IDE use different keywords. Will re-open it if there is any universal solution. #1278 (comment)

Solved in https://youtrack.jetbrains.com/issue/WEB-13948/Display-region...-endregion-in-structure-view-in-TypeScript-and-JavaScript#focus=Comments-27-4077324.0-0

@codecov

codecov Bot commented Jun 3, 2024 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.78%. Comparing base (306291b) to head (8277e90).

Additional details and impacted files
@@                                         Coverage Diff                                         @@
##           06-04-refactor_rust_test_don_t_trim_bundle_output_keep_it_as_it_is    #1330   +/-   ##
===================================================================================================
  Coverage                                                               86.78%   86.78%           
===================================================================================================
  Files                                                                     137      137           
  Lines                                                                    7036     7038    +2     
===================================================================================================
+ Hits                                                                     6106     6108    +2     
  Misses                                                                    930      930           

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

@hyfdev
hyfdev force-pushed the 06-04-feat_output_make_output_folding-friendly_using_region_ branch from 25866bd to 8277e90 Compare June 3, 2024 17:34
@github-actions

github-actions Bot commented Jun 3, 2024 •

Copy link
Copy Markdown
Contributor

Benchmarks Rust

  • target: main(9219b19)
  • pr: 06-04-feat_output_make_output_folding-friendly_using_region_(09ac115)
group                                      pr                                     target
-----                                      --                                     ------
rolldown benchmark/threejs-bundle          1.00     29.4±0.27ms        ? ?/sec    1.02     29.9±0.47ms        ? ?/sec
rolldown benchmark/threejs-scan            1.00     20.8±0.55ms        ? ?/sec    1.00     20.8±0.36ms        ? ?/sec
rolldown benchmark/threejs-sourcemap       1.00     40.0±1.58ms        ? ?/sec    1.00     39.9±0.28ms        ? ?/sec
rolldown benchmark/threejs10x-bundle       1.00    329.1±3.72ms        ? ?/sec    1.01    333.0±5.23ms        ? ?/sec
rolldown benchmark/threejs10x-scan         1.00    207.1±6.69ms        ? ?/sec    1.01    209.9±4.49ms        ? ?/sec
rolldown benchmark/threejs10x-sourcemap    1.01   452.3±12.84ms        ? ?/sec    1.00   448.6±14.14ms        ? ?/sec

@codspeed

codspeed Bot commented Jun 3, 2024 •

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #1330 will not alter performance

Comparing 06-04-feat_output_make_output_folding-friendly_using_region_ (09ac115) with main (ace105c)

Summary

✅ 6 untouched benchmarks

@hyfdev
hyfdev force-pushed the 06-04-refactor_rust_test_don_t_trim_bundle_output_keep_it_as_it_is branch from 306291b to 12bae91 Compare June 3, 2024 18:22
@hyfdev
hyfdev force-pushed the 06-04-feat_output_make_output_folding-friendly_using_region_ branch from 8277e90 to e21f7cc Compare June 3, 2024 18:23
Base automatically changed from 06-04-refactor_rust_test_don_t_trim_bundle_output_keep_it_as_it_is to main June 3, 2024 18:23
@hyfdev
hyfdev force-pushed the 06-04-feat_output_make_output_folding-friendly_using_region_ branch from e21f7cc to 09ac115 Compare June 3, 2024 18:23
@netlify

netlify Bot commented Jun 3, 2024

Copy link
Copy Markdown

✅ Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit 09ac115
🔍 Latest deploy log https://app.netlify.com/sites/rolldown-rs/deploys/665e0a3b23ccba00086c309e

@hyfdev
hyfdev merged commit ace105c into main Jun 3, 2024
@hyfdev
hyfdev deleted the 06-04-feat_output_make_output_folding-friendly_using_region_ branch June 3, 2024 18:24
IWANABETHATGUY added a commit that referenced this pull request Oct 20, 2026
… pairs (#11235)

`experimental.attachDebugInfo: 'simple'` (the default) now writes a `//
<module id>` line where each module starts, like esbuild and Bun, and no
longer wraps each module in `//#region` / `//#endregion`.

The pairs came in with #1278 / #1330 so that VS Code and WebStorm can
fold each module of the output. Today few people read bundler output in
an editor, but agents read it often, and for an agent the pairs are only
extra tokens. The start line keeps the part that is still useful: which
file the code comes from.

The test harness used `//#endregion` to find where the runtime ends, so
`HiddenModuleMarkersPlugin` now wraps only the hidden modules in a
temporary region pair before the minify pass. Other markers are no
longer protected from the dce-only pass, so snapshots drop the same
markers that production builds drop. Vite's `rolldown-canary` tests
check the old markers, so they need an update there.
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