Skip to content

Comments

refactor: allow multiple help messages in diagnostics#7624

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-22-refactor_allow_multiple_help_messages_in_diagnostics
Dec 22, 2025
Merged

refactor: allow multiple help messages in diagnostics#7624
graphite-app[bot] merged 1 commit intomainfrom
12-22-refactor_allow_multiple_help_messages_in_diagnostics

Conversation

@sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Dec 22, 2025

Allow multiple help messages in diagnostics.

Copy link
Member Author


How to use the Graphite Merge Queue

Add the label graphite: merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@netlify
Copy link

netlify bot commented Dec 22, 2025

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit 5f12334
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/69497f7ddb201c000883315b

@sapphi-red sapphi-red marked this pull request as ready for review December 22, 2025 10:39
Copilot AI review requested due to automatic review settings December 22, 2025 10:39
Copy link
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

This PR refactors the diagnostic system to support multiple help messages instead of a single optional help message. The change enables diagnostics to provide multiple pieces of helpful information to users, improving the diagnostic experience.

Key Changes

  • Changed the help field in Diagnostic struct from Option<String> to helps: Vec<String>
  • Updated the add_help method to push messages to the vector
  • Modified all consumers to use the new vector-based API

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
crates/rolldown_error/src/build_diagnostic/diagnostic.rs Updated Diagnostic struct to use helps: Vec<String>, modified initialization and add_help method, and updated the report builder logic to use with_helps
crates/rolldown_error/src/build_diagnostic/events/resolve_error.rs Changed from clone_from to conditional push for adding help messages
crates/rolldown_error/src/build_diagnostic/events/prefer_builtin_feature.rs Changed from Option assignment to direct push to the helps vector

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

@IWANABETHATGUY
Copy link
Member

Should it be a feature rather than a refactor?

@sapphi-red
Copy link
Member Author

This is a feature internally, but because this PR itself doesn't introduce any new user-facing features, I think it's better to mark with refactor:.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 22, 2025

Benchmarks Rust

  • target: main(c542ec4)
  • pr: 12-22-refactor_allow_multiple_help_messages_in_diagnostics(5f12334)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.01     65.0±2.08ms        ? ?/sec    1.00     64.6±1.92ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.01     72.5±2.71ms        ? ?/sec    1.00     71.5±1.72ms        ? ?/sec
bundle/bundle@rome_ts                                        1.00    108.8±2.30ms        ? ?/sec    1.02    110.6±2.02ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.00    120.5±1.88ms        ? ?/sec    1.01    121.9±2.47ms        ? ?/sec
bundle/bundle@threejs                                        1.00     40.3±1.46ms        ? ?/sec    1.00     40.3±0.79ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.00     43.5±0.67ms        ? ?/sec    1.01     44.1±0.75ms        ? ?/sec
bundle/bundle@threejs10x                                     1.01    402.3±6.21ms        ? ?/sec    1.00    397.8±4.92ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.00    460.6±6.83ms        ? ?/sec    1.02   468.0±10.81ms        ? ?/sec
scan/scan@rome_ts                                            1.00     85.0±1.58ms        ? ?/sec    1.02     86.8±1.85ms        ? ?/sec
scan/scan@threejs                                            1.00     29.0±1.72ms        ? ?/sec    1.03     30.0±0.47ms        ? ?/sec
scan/scan@threejs10x                                         1.00    297.0±4.84ms        ? ?/sec    1.04    309.1±5.68ms        ? ?/sec

@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 22, 2025

Merge activity

Allow multiple help messages in diagnostics.
@graphite-app graphite-app bot force-pushed the 12-22-refactor_allow_multiple_help_messages_in_diagnostics branch from 434f788 to 5f12334 Compare December 22, 2025 17:27
@graphite-app graphite-app bot merged commit 5f12334 into main Dec 22, 2025
33 checks passed
@graphite-app graphite-app bot deleted the 12-22-refactor_allow_multiple_help_messages_in_diagnostics branch December 22, 2025 17:36
This was referenced Dec 24, 2025
shulaoda added a commit that referenced this pull request Dec 24, 2025
## [1.0.0-beta.57] - 2025-12-24

✨ TypeScript Project References Support
- Rolldown now supports TypeScript project references when manually specifying a `tsconfig`
- See more details: https://rolldown.rs/options/tsconfig

💥 Rename `__export` to `__exportAll`
- Update `rolldown-plugin-dts` to the latest version for compatibility

### 💥 BREAKING CHANGES

- tsconfig: enable project references support in manual mode (#7545) by @shulaoda

### 🚀 Features

- add `CANNOT_CALL_NAMESPACE` warning (#7636) by @sapphi-red
- add import path for unresolved import diagnostics (#7625) by @sapphi-red
- optimize dynamic entry facade chunks by merging with common chunks when they are captured by common chunks (#7486) by @IWANABETHATGUY

### 🐛 Bug Fixes

- rename `__export` to `__exportAll` to be compatible with `cjs-module-lexer` (#7640) by @IWANABETHATGUY
- strip UTF-8 BOM when using text loader (#7635) by @sapphi-red
- rolldown_plugin_replace: avoid crashing with invalid delimiters (#7621) by @sapphi-red

### 🚜 Refactor

- export all filter functions (#7622) by @sxzz
- allow multiple help messages in diagnostics (#7624) by @sapphi-red

### 📚 Documentation

- add README.md to packages/rolldown (#7556) by @Copilot

### ⚡ Performance

- use fsevents on macOS for file watching (#7596) by @sapphi-red

### 🧪 Testing

- handle re-exports of external modules in CJS format (#7641) by @IWANABETHATGUY
- update integration to use vite's rolldown-canary branch (#7633) by @shulaoda

### ⚙️ Miscellaneous Tasks

- docs: fix Netlify ignore condition to detect docs changes across all PR commits (#7637) by @Copilot
- deps: update rollup submodule for tests to v4.54.0 (#7630) by @sapphi-red
- skip benchmarks for PRs with 'graphite: merge-when-ready' label (#7631) by @Boshen
- deps: update esbuild for tests to 0.27.2 (#7629) by @sapphi-red
- fix "update-test-dependencies" workflow (#7628) by @sapphi-red
- deps: update test262 submodule for tests (#7626) by @sapphi-red
- deps: update dependency oxlint to v1.35.0 (#7623) by @renovate[bot]

Co-authored-by: shulaoda <[email protected]>
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