Skip to content

refactor(experimental/devtools)!: rename InputOptions#debug to InputOptions#devtools#7686

Merged
graphite-app[bot] merged 1 commit intomainfrom
copilot/rename-input-options-debug-to-devtools
Dec 29, 2025
Merged

refactor(experimental/devtools)!: rename InputOptions#debug to InputOptions#devtools#7686
graphite-app[bot] merged 1 commit intomainfrom
copilot/rename-input-options-debug-to-devtools

Conversation

Copy link
Contributor

Copilot AI commented Dec 29, 2025

  • Rename option from debug to devtools in TypeScript layer
    • Update packages/rolldown/src/options/input-options.ts
    • Update packages/rolldown/src/utils/bindingify-input-options.ts
    • Update packages/rolldown/src/utils/validator.ts
  • Rename option from debug to devtools in Rust layer
    • Rename DebugOptions to DevtoolsOptions in crates/rolldown_common/src/inner_bundler_options/types/debug_options.rs and rename the file to devtools_options.rs
    • Update crates/rolldown_common/src/inner_bundler_options/types/mod.rs
    • Update crates/rolldown_common/src/lib.rs
    • Update crates/rolldown_common/src/inner_bundler_options/mod.rs (BundlerOptions struct)
    • Rename BindingDebugOptions to BindingDevtoolsOptions in crates/rolldown_binding/src/options/binding_input_options/binding_debug_options.rs and rename the file to binding_devtools_options.rs
    • Update crates/rolldown_binding/src/options/binding_input_options/mod.rs
    • Update crates/rolldown_binding/src/utils/normalize_binding_options.rs
    • Update crates/rolldown_common/src/inner_bundler_options/types/normalized_bundler_options.rs
    • Update crates/rolldown/src/utils/prepare_build_context.rs
    • Update crates/rolldown/src/stages/generate_stage/chunk_ext.rs
    • Update crates/rolldown_binding/src/classic_bundler.rs
  • Update test files
    • Update packages/rolldown/tests/behaviors/emit-debug-data/devtools.test.js
    • Update examples/basic-typescript/rolldown.config.js
  • Update JSON schema
    • Update crates/rolldown_testing/_config.schema.json
  • Build and lint verification passed
  • Update node test snapshot (packages/rolldown/tests/cli/__snapshots__/cli-e2e.test.ts.snap)
Original prompt

This section details on the original issue you should resolve

<issue_title>Rename InputOptions#debug to InputOptions#devtools</issue_title>
<issue_description>Had discussed with devtools team. The debug keyword would be used for other purpose, like debugging rolldown itself. We want to switched to devtools to carry related code for clarity.

Not an urget task, so I want make an issue for collecting feedbacks</issue_description>

<agent_instructions>Change the option both in Rust and TS layer</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@sapphi-red Sounds good from me & @IWANABETHATGUY & @shulaoda

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@netlify
Copy link

netlify bot commented Dec 29, 2025

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit 4c86cb7
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/6952343da54b250008e8427d

@hyf0 hyf0 marked this pull request as ready for review December 29, 2025 06:35
Copilot AI review requested due to automatic review settings December 29, 2025 06:35
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 renames the InputOptions#debug option to InputOptions#devtools across both TypeScript and Rust layers to better align with the devtools team's naming conventions and avoid confusion with debugging rolldown itself.

Key Changes:

  • Renamed option from debug to devtools in TypeScript interfaces and validators
  • Renamed DebugOptions to DevtoolsOptions and BindingDebugOptions to BindingDevtoolsOptions in Rust
  • Updated all usages throughout the codebase including tests and examples

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/rolldown/tests/behaviors/emit-debug-data/devtools.test.js Updated test to use devtools option instead of debug
packages/rolldown/src/utils/validator.ts Updated validation schema to accept devtools field instead of debug
packages/rolldown/src/utils/bindingify-input-options.ts Updated binding conversion to pass devtools option
packages/rolldown/src/options/input-options.ts Renamed interface field from debug to devtools
packages/rolldown/src/binding.d.cts Updated TypeScript bindings to use BindingDevtoolsOptions instead of BindingDebugOptions
examples/basic-typescript/rolldown.config.js Updated example config to use devtools option
crates/rolldown_testing/_config.schema.json Updated JSON schema to reference DevtoolsOptions instead of DebugOptions
crates/rolldown_common/src/lib.rs Updated public exports to use DevtoolsOptions instead of DebugOptions
crates/rolldown_common/src/inner_bundler_options/types/normalized_bundler_options.rs Renamed field from debug to devtools in normalized options
crates/rolldown_common/src/inner_bundler_options/types/mod.rs Updated module declarations to use devtools_options instead of debug_options
crates/rolldown_common/src/inner_bundler_options/types/devtools_options.rs Renamed struct from DebugOptions to DevtoolsOptions
crates/rolldown_common/src/inner_bundler_options/mod.rs Updated BundlerOptions to use DevtoolsOptions type
crates/rolldown_binding/src/utils/normalize_binding_options.rs Updated normalization to use devtools field and DevtoolsOptions type
crates/rolldown_binding/src/options/binding_input_options/mod.rs Updated to import and use BindingDevtoolsOptions
crates/rolldown_binding/src/options/binding_input_options/binding_devtools_options.rs Renamed struct from BindingDebugOptions to BindingDevtoolsOptions
crates/rolldown_binding/src/classic_bundler.rs Updated condition to check options.devtools instead of options.debug
crates/rolldown/src/utils/prepare_build_context.rs Updated to use devtools field instead of debug
crates/rolldown/src/stages/generate_stage/chunk_ext.rs Updated condition to check options.devtools instead of options.debug

Review Summary: The renaming has been executed comprehensively and consistently across all layers of the codebase. All TypeScript types, Rust structs, field names, module paths, and usages have been properly updated. The changes follow proper naming conventions (UpperCamelCase for types, snake_case for fields) and maintain backward compatibility in terms of functionality. No issues were found in the changed code regions.


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

@hyf0
Copy link
Member

hyf0 commented Dec 29, 2025

@copilot Update node test snapshot via just-test-node rolldown --update

@github-actions
Copy link
Contributor

Benchmarks Rust

  • target: main(1dde120)
  • pr: copilot/rename-input-options-debug-to-devtools(d2606fc)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.01     62.1±0.97ms        ? ?/sec    1.00     61.7±1.08ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.00     68.0±1.07ms        ? ?/sec    1.00     68.1±1.03ms        ? ?/sec
bundle/bundle@rome_ts                                        1.00    106.4±3.13ms        ? ?/sec    1.00    105.9±1.66ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.00    118.8±2.70ms        ? ?/sec    1.00    118.4±2.86ms        ? ?/sec
bundle/bundle@threejs                                        1.01     38.8±1.95ms        ? ?/sec    1.00     38.4±0.41ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.00     42.1±0.43ms        ? ?/sec    1.00     42.2±0.46ms        ? ?/sec
bundle/bundle@threejs10x                                     1.00    389.7±3.83ms        ? ?/sec    1.00    390.1±5.59ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.00    447.1±2.29ms        ? ?/sec    1.00    449.2±2.91ms        ? ?/sec
scan/scan@rome_ts                                            1.00     83.0±1.44ms        ? ?/sec    1.00     83.1±1.71ms        ? ?/sec
scan/scan@threejs                                            1.02     28.6±1.86ms        ? ?/sec    1.00     28.0±0.28ms        ? ?/sec
scan/scan@threejs10x                                         1.00    292.2±3.85ms        ? ?/sec    1.00    291.1±3.57ms        ? ?/sec

Copy link
Contributor Author

Copilot AI commented Dec 29, 2025

@copilot Update node test snapshot via just-test-node rolldown --update

Updated the test snapshot in commit 16d85ac. The CLI help option --debug.session-id has been renamed to --devtools.session-id.

Copilot AI requested a review from hyf0 December 29, 2025 07:15
@hyf0 hyf0 changed the title [WIP] Rename InputOptions#debug to InputOptions#devtools feat(experimental/devtools)!: rename InputOptions#debug to InputOptions#devtools Dec 29, 2025
@hyf0 hyf0 changed the title feat(experimental/devtools)!: rename InputOptions#debug to InputOptions#devtools refactor(experimental/devtools)!: rename InputOptions#debug to InputOptions#devtools Dec 29, 2025
@hyf0 hyf0 requested review from shulaoda and removed request for hyf0 December 29, 2025 07:55
Copy link
Member

hyf0 commented Dec 29, 2025

Merge activity

  • Dec 29, 7:55 AM UTC: The merge label 'graphite: merge-when-ready' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Dec 29, 7:56 AM UTC: hyf0 added this pull request to the Graphite merge queue.
  • Dec 29, 8:01 AM UTC: The Graphite merge queue couldn't merge this PR because it was not satisfying all requirements (Failed CI: 'node-test-ubuntu / Node Test').
  • Dec 29, 9:49 AM UTC: The merge label 'graphite: merge-when-ready' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Dec 29, 9:49 AM UTC: hyf0 added this pull request to the Graphite merge queue.
  • Dec 29, 9:49 AM UTC: Merged by the Graphite merge queue.

…ptions#devtools (#7686)

- [x] Rename option from `debug` to `devtools` in TypeScript layer
  - [x] Update `packages/rolldown/src/options/input-options.ts`
  - [x] Update `packages/rolldown/src/utils/bindingify-input-options.ts`
  - [x] Update `packages/rolldown/src/utils/validator.ts`
- [x] Rename option from `debug` to `devtools` in Rust layer
  - [x] Rename `DebugOptions` to `DevtoolsOptions` in `crates/rolldown_common/src/inner_bundler_options/types/debug_options.rs` and rename the file to `devtools_options.rs`
  - [x] Update `crates/rolldown_common/src/inner_bundler_options/types/mod.rs`
  - [x] Update `crates/rolldown_common/src/lib.rs`
  - [x] Update `crates/rolldown_common/src/inner_bundler_options/mod.rs` (BundlerOptions struct)
  - [x] Rename `BindingDebugOptions` to `BindingDevtoolsOptions` in `crates/rolldown_binding/src/options/binding_input_options/binding_debug_options.rs` and rename the file to `binding_devtools_options.rs`
  - [x] Update `crates/rolldown_binding/src/options/binding_input_options/mod.rs`
  - [x] Update `crates/rolldown_binding/src/utils/normalize_binding_options.rs`
  - [x] Update `crates/rolldown_common/src/inner_bundler_options/types/normalized_bundler_options.rs`
  - [x] Update `crates/rolldown/src/utils/prepare_build_context.rs`
  - [x] Update `crates/rolldown/src/stages/generate_stage/chunk_ext.rs`
  - [x] Update `crates/rolldown_binding/src/classic_bundler.rs`
- [x] Update test files
  - [x] Update `packages/rolldown/tests/behaviors/emit-debug-data/devtools.test.js`
  - [x] Update `examples/basic-typescript/rolldown.config.js`
- [x] Update JSON schema
  - [x] Update `crates/rolldown_testing/_config.schema.json`
- [x] Build and lint verification passed
- [x] Update node test snapshot (`packages/rolldown/tests/cli/__snapshots__/cli-e2e.test.ts.snap`)

<!-- START COPILOT ORIGINAL PROMPT -->

<details>

<summary>Original prompt</summary>

>
> ----
>
> *This section details on the original issue you should resolve*
>
> <issue_title>Rename `InputOptions#debug` to `InputOptions#devtools`</issue_title>
> <issue_description>Had discussed with devtools team. The `debug` keyword would be used for other purpose, like debugging rolldown itself. We want to switched to `devtools` to carry related code for clarity.
>
> Not an urget task, so I want make an issue for collecting feedbacks</issue_description>
>
> <agent_instructions>Change the option both in Rust and TS layer</agent_instructions>
>
> ## Comments on the Issue (you are @copilot in this section)
>
> <comments>
> <comment_new><author>@sapphi-red</author><body>
> Sounds good from me & @IWANABETHATGUY & @shulaoda </body></comment_new>
> </comments>
>

</details>

<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes #6930

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for you](https://github.com/rolldown/rolldown/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.
@graphite-app graphite-app bot force-pushed the copilot/rename-input-options-debug-to-devtools branch from 16d85ac to 4c86cb7 Compare December 29, 2025 07:56
@graphite-app graphite-app bot merged commit 4c86cb7 into main Dec 29, 2025
61 of 62 checks passed
@graphite-app graphite-app bot deleted the copilot/rename-input-options-debug-to-devtools branch December 29, 2025 09:49
IWANABETHATGUY pushed a commit that referenced this pull request Dec 30, 2025
…ptions#devtools (#7686)

- [x] Rename option from `debug` to `devtools` in TypeScript layer
  - [x] Update `packages/rolldown/src/options/input-options.ts`
  - [x] Update `packages/rolldown/src/utils/bindingify-input-options.ts`
  - [x] Update `packages/rolldown/src/utils/validator.ts`
- [x] Rename option from `debug` to `devtools` in Rust layer
  - [x] Rename `DebugOptions` to `DevtoolsOptions` in `crates/rolldown_common/src/inner_bundler_options/types/debug_options.rs` and rename the file to `devtools_options.rs`
  - [x] Update `crates/rolldown_common/src/inner_bundler_options/types/mod.rs`
  - [x] Update `crates/rolldown_common/src/lib.rs`
  - [x] Update `crates/rolldown_common/src/inner_bundler_options/mod.rs` (BundlerOptions struct)
  - [x] Rename `BindingDebugOptions` to `BindingDevtoolsOptions` in `crates/rolldown_binding/src/options/binding_input_options/binding_debug_options.rs` and rename the file to `binding_devtools_options.rs`
  - [x] Update `crates/rolldown_binding/src/options/binding_input_options/mod.rs`
  - [x] Update `crates/rolldown_binding/src/utils/normalize_binding_options.rs`
  - [x] Update `crates/rolldown_common/src/inner_bundler_options/types/normalized_bundler_options.rs`
  - [x] Update `crates/rolldown/src/utils/prepare_build_context.rs`
  - [x] Update `crates/rolldown/src/stages/generate_stage/chunk_ext.rs`
  - [x] Update `crates/rolldown_binding/src/classic_bundler.rs`
- [x] Update test files
  - [x] Update `packages/rolldown/tests/behaviors/emit-debug-data/devtools.test.js`
  - [x] Update `examples/basic-typescript/rolldown.config.js`
- [x] Update JSON schema
  - [x] Update `crates/rolldown_testing/_config.schema.json`
- [x] Build and lint verification passed
- [x] Update node test snapshot (`packages/rolldown/tests/cli/__snapshots__/cli-e2e.test.ts.snap`)

<!-- START COPILOT ORIGINAL PROMPT -->

<details>

<summary>Original prompt</summary>

>
> ----
>
> *This section details on the original issue you should resolve*
>
> <issue_title>Rename `InputOptions#debug` to `InputOptions#devtools`</issue_title>
> <issue_description>Had discussed with devtools team. The `debug` keyword would be used for other purpose, like debugging rolldown itself. We want to switched to `devtools` to carry related code for clarity.
>
> Not an urget task, so I want make an issue for collecting feedbacks</issue_description>
>
> <agent_instructions>Change the option both in Rust and TS layer</agent_instructions>
>
> ## Comments on the Issue (you are @copilot in this section)
>
> <comments>
> <comment_new><author>@sapphi-red</author><body>
> Sounds good from me & @IWANABETHATGUY & @shulaoda </body></comment_new>
> </comments>
>

</details>

<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes #6930

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for you](https://github.com/rolldown/rolldown/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.
This was referenced Dec 31, 2025
shulaoda added a commit that referenced this pull request Dec 31, 2025
## [1.0.0-beta.58] - 2025-12-31

### 💥 BREAKING CHANGES

- experimental/devtools: rename InputOptions#debug to InputOptions#devtools (#7686) by @Copilot

### 🚀 Features

- implement target feature check in `should_transform_js` for raw options (#7697) by @shulaoda
- support `output.dynamicImportInCjs` option (#7677) by @shulaoda
- types: expose `ChecksOptions` type (#7653) by @sapphi-red

### 🐛 Bug Fixes

- export runtime helpers for cross-chunk access (#7658) by @shulaoda
- cjs namespace merging regression (#7665) by @IWANABETHATGUY
- replace panic with proper error handling for hash placeholder generation (#7661) by @shulaoda
- remove the blank line between shebang and postBanner (#7643) by @btea
- rolldown_plugin_vite_reporter: apply padding before ANSI coloring for proper size column alignment (#7649) by @shulaoda

### 🚜 Refactor

- rust: use `StableModuleId` as the map key if possible (#7718) by @hyf0
- rust: return `StableModuleId` instead of `&str` from `Module#stable_id()` (#7717) by @hyf0
- rust: return correct stable id of external module from `Module#stable_id()` (#7716) by @hyf0
- rust: introduce `StableModuleId` type (#7715) by @hyf0
- rust: reduce unnecessary `id.as_arc_str().clone().into()` (#7714) by @hyf0
- rust: remove `ModuleId#resource_id` and use `as_arc_str` directly (#7710) by @hyf0
- rust: remove unused `Module#id_clone` (#7709) by @hyf0
- rust: remove `Module#id_as_str` and use `Module#id` directly (#7708) by @hyf0
- consolidate namespace call analysis into import analyzer (#7657) by @IWANABETHATGUY
- rust: make `ExternalModule#id` have the type `ModuleId` (#7707) by @hyf0
- rust: rename `Module#id` to `Module#id_as_str` (#7706) by @hyf0
- rust: use `ModuleId` instead of raw `ArcStr` for `ScanStageCache` (#7701) by @hyf0
- simplify error propagation in cache merge (#7702) by @shulaoda
- use `ModuleId` as the type of `ResolvedId#id` (#7694) by @hyf0
- types: rename `resolved_request_info.rs` to `resolved_id.rs` and move its contents (#7687) by @hyf0
- devtools: emit data to `<CWD>/node_modules/.rolldown` (#7692) by @hyf0
- use `InvalidOption` for hash placeholder generation errors (#7674) by @shulaoda
- rolldown_error: remove dependency on rolldown_utils (#7672) by @shulaoda
- use nodejs-built-in-modules v1.0.0 directly in callsites (#7667) by @Boshen

### 📚 Documentation

- migrate input options content from options to auto gen docs (#7663) by @mdong1909
- create reference index page (#7659) by @mdong1909
- tweak auto-generated reference output (#7654) by @sapphi-red
- initialize auto-gen docs (#7252) by @mdong1909

### ⚙️ Miscellaneous Tasks

- deps: update napi (#7705) by @renovate[bot]
- pin Node.js version to 24.12.0 LTS in .node-version file (#7713) by @Copilot
- update esbuild test reasons (#7703) by @sapphi-red
- deps: update crate-ci/typos action to v1.40.1 (#7696) by @renovate[bot]
- deps: update oxc to v0.106.0 (#7512) by @renovate[bot]
- js: replace dprint with oxfmt (#7214) by @Boshen
- deps: update dependency oxlint to v1.36.0 (#7691) by @renovate[bot]
- deps: update github-actions (#7679) by @renovate[bot]
- deps: update npm packages (#7680) by @renovate[bot]
- deps: update rust crates (#7678) by @renovate[bot]
- deps: update oxc resolver to v11.16.2 (#7668) by @renovate[bot]
- add API reference files to knip entry points (#7669) by @Copilot
- deps: update notify (#7651) by @sapphi-red
- add `homepage` field to package.json (#7648) by @trivikr
- deps: update oxc resolver to v11.16.1 (#7647) by @renovate[bot]
- deps: update rolldown-plugin-dts to 0.20.0 (#7645) by @shulaoda

Co-authored-by: shulaoda <165626830+shulaoda@users.noreply.github.com>
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.

Rename InputOptions#debug to InputOptions#devtools

4 participants