Skip to content

docs(meta/design): add devtools.md#8663

Merged
graphite-app[bot] merged 1 commit intomainfrom
03-13-docs_meta_design_add_devtools.md_
Mar 15, 2026
Merged

docs(meta/design): add devtools.md#8663
graphite-app[bot] merged 1 commit intomainfrom
03-13-docs_meta_design_add_devtools.md_

Conversation

@hyf0
Copy link
Copy Markdown
Member

@hyf0 hyf0 commented Mar 13, 2026

add historical context about devtools

Copy link
Copy Markdown
Member Author

hyf0 commented Mar 13, 2026


How to use the Graphite Merge Queue

Add the label graphite: merge-when-ready 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.

@hyf0 hyf0 marked this pull request as ready for review March 13, 2026 04:23
Copilot AI review requested due to automatic review settings March 13, 2026 04:23
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 13, 2026

Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit dac2db6
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/69b6d4e05f07920008ffda1e
😎 Deploy Preview https://deploy-preview-8663--rolldown-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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

Adds a new internal design doc capturing historical context and current architecture for Rolldown’s tracing-based devtools emission pipeline (intended for consumers like Vite Devtools).

Changes:

  • Documented the devtools user-facing option shape and (claimed) CLI equivalent
  • Described the on-disk JSONL output format, action catalog, and context injection model
  • Captured current implementation tradeoffs and potential future directions (performance, storage backends, scoping)

You can also share your feedback on Copilot code review. Take the survey.

@hyf0 hyf0 force-pushed the 03-13-docs_meta_design_add_devtools.md_ branch from baf68f4 to e66d88e Compare March 13, 2026 09:06
Copilot AI review requested due to automatic review settings March 13, 2026 10:17
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

Adds a new design document capturing historical context and the current architecture of Rolldown’s devtools tracing pipeline, including output format, action catalog, and future direction notes.

Changes:

  • Documented the devtools user-facing option (devtools.sessionId) and CLI mapping.
  • Described the on-disk JSON-lines output format, action/event model, and context injection via tracing spans.
  • Added action catalog and forward-looking notes on performance, storage backend, and subscriber scoping.

You can also share your feedback on Copilot code review. Take the survey.

Copilot AI review requested due to automatic review settings March 13, 2026 11:56
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

Adds a design document capturing the current devtools system’s intent, architecture, emitted event schema, and known limitations/future directions so contributors and external consumers have a shared reference point.

Changes:

  • Documented the user-facing devtools option and output format (NDJSON files under node_modules/.rolldown/<session_id>/).
  • Described the tracing-based architecture (spans for context, events for actions), action catalog, and TS type generation pipeline.
  • Captured current pain points (performance/storage/scoping) and possible future approaches.

You can also share your feedback on Copilot code review. Take the survey.

hyf0 added a commit that referenced this pull request Mar 13, 2026
Reverts #8669

It doesn't solve the problem,
#8663 still hang.
Copilot AI review requested due to automatic review settings March 14, 2026 01:42
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

Adds a design document capturing historical context and current behavior of Rolldown’s devtools tracing system, including its output format, architecture, and known limitations/future directions.

Changes:

  • Documented the devtools user-facing API, output file layout, and large-string handling behavior.
  • Described the tracing/span-based architecture and action/event catalog.
  • Recorded performance/storage bottlenecks and potential future improvements (scoped subscribers, alternative backends).

You can also share your feedback on Copilot code review. Take the survey.

Copilot AI review requested due to automatic review settings March 14, 2026 13:24
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

Adds a new design document describing Rolldown’s devtools tracing system (API surface, output format, architecture, and future improvements) to preserve historical context and guide future development.

Changes:

  • Documented the devtools user-facing option + CLI mapping and how it flows through JS → binding → Rust.
  • Documented the JSON-lines output layout, action catalog, and large-string handling behavior.
  • Captured current architecture/lifecycle integration details and outlined known performance/scaling limitations + potential next steps.

You can also share your feedback on Copilot code review. Take the survey.

@hyf0 hyf0 changed the base branch from main to graphite-base/8663 March 14, 2026 14:46
@hyf0 hyf0 force-pushed the 03-13-docs_meta_design_add_devtools.md_ branch from 2e784ca to d0df749 Compare March 14, 2026 14:46
@hyf0 hyf0 changed the base branch from graphite-base/8663 to 03-14-ci_should_do_matrix_out_side_of_reusable_workflows_2 March 14, 2026 14:46
Base automatically changed from 03-14-ci_should_do_matrix_out_side_of_reusable_workflows_2 to main March 14, 2026 14:51
@hyf0 hyf0 force-pushed the 03-13-docs_meta_design_add_devtools.md_ branch from d0df749 to 0c85ce0 Compare March 14, 2026 14:52
@hyf0
Copy link
Copy Markdown
Member Author

hyf0 commented Mar 15, 2026

@copilot mention in the doc, for database directly, we would like to store data like source code into a standalone field and reference the source via an id instead of inlining them everywhere.

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 15, 2026

@hyf0 I've opened a new pull request, #8715, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Copy Markdown
Member Author

hyf0 commented Mar 15, 2026

Merge activity

add historical context about devtools
@graphite-app graphite-app bot force-pushed the 03-13-docs_meta_design_add_devtools.md_ branch from fae3744 to dac2db6 Compare March 15, 2026 15:48
@graphite-app graphite-app bot merged commit dac2db6 into main Mar 15, 2026
30 checks passed
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

Adds a design/history document for Rolldown’s devtools tracing system, documenting the user-facing API, on-disk JSONL output format, internal tracing architecture, and known limitations/future directions.

Changes:

  • Introduces meta/design/devtools.md covering devtools API, output schema, and crate-level architecture.
  • Documents large-string StringRef behavior and consumer-side parsing expectations.
  • Captures current limitations (performance, storage scalability, global subscriber scoping) and potential future approaches.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +119 to +123
- `load` — `HookLoadCallStart` / `HookLoadCallEnd` wrapped similarly
- `transform` — `HookTransformCallStart` / `HookTransformCallEnd`
- `render_chunk` — `HookRenderChunkStart` / `HookRenderChunkEnd`

Each hook call pair gets a unique `call_id` (UUID v4) via its enclosing span.
| `ModuleGraphReady` | After scan + normalize | modules[]{id, is_external, imports[]{module_id, kind, module_request}, importers[]} |
| `BuildEnd` | After scan stage + after write/generate | — |
| `ChunkGraphReady` | After chunk graph construction | chunks[]{chunk_id, name, reason, modules[], imports[], is_user_defined_entry, is_async_entry, entry_module} |
| `HookRenderChunkStart/End` | Per plugin per renderChunk call | chunk_id, plugin_name, plugin_id, call_id, content |

const data = fs.readFileSync('node_modules/.rolldown/<sid>/logs.json', 'utf8');
const events = parseToEvents(data.trim());
// events: Array<StringRef | { timestamp, session_id, action: "BuildStart" | "ModuleGraphReady" | ... }>
This was referenced Mar 18, 2026
shulaoda added a commit that referenced this pull request Mar 18, 2026
## [1.0.0-rc.10] - 2026-03-18

### 🚀 Features

- add indentExclusionRanges property to MagicString (#8746) by @IWANABETHATGUY
- expose `oxcRuntimePlugin` (#8654) by @sapphi-red
- rust: make bundler generic over FileSystem for in-memory benchmarks (#8652) by @Boshen

### 🐛 Bug Fixes

- rolldown_plugin_vite_dynamic_import_vars: align dynamic import fast check with Vite (#8760) by @shulaoda
- renamer: handle existing bindings in nested scopes when finding unique names (#8741) by @drewolson
- pass `yarn_pnp` option where needed (#8736) by @sapphi-red
- preserve optional chaining in namespace member expr rewrite (#8712) by @Copilot
- correct UTF-16 index handling in native MagicString (#8693) by @IWANABETHATGUY
- mark failing doctests as ignore (#8700) by @Boshen
- prevent may_partial_namespace from leaking through include_module (#8682) by @IWANABETHATGUY
- ci: bump native-build cache key to invalidate stale napi-rs artifacts (#8678) by @Boshen
- `comments.annotation: false` breaking tree-shaking (#8657) by @IWANABETHATGUY
- validate filenames for NUL bytes from chunkFileNames/entryFileNames (#8644) by @IWANABETHATGUY
- dce-only minify should not set NODE_ENV to production (#8651) by @IWANABETHATGUY

### 🚜 Refactor

- rust: remove dead `CrossModuleOptimizationConfig::side_effects_free_function_optimization` (#8673) by @Dunqing
- rust: simplify `cross_module_optimization` by removing redundant scope tracking (#8672) by @Dunqing
- simplify string repeat in guess_indentor (#8753) by @IWANABETHATGUY
- consolidate custom magic-string tests into one file (#8696) by @IWANABETHATGUY
- extract CJS bailout checks from include_symbol (#8683) by @IWANABETHATGUY
- rust: remove `BindingIdentifierExt` to use `BindingIdentifier::symbol_id()` instead (#8667) by @Dunqing
- bench: add bench_preset helper and inline presets (#8658) by @Boshen
- rust: filter external modules from entries instead of mapping bit positions (#8637) by @Dunqing

### 📚 Documentation

- clarify watch mode behavior and its limitations (#8751) by @sapphi-red
- add external link icon to GitHub button in Hero section (#8731) by @thisisnkc
- guide: clarify that `inject` option is only conceptually similar to esbuild's one (#8743) by @sapphi-red
- meta/design: add `devtools.md` (#8663) by @hyf0
- add viteplus alpha announcement banner (#8668) by @shulaoda

### ⚡ Performance

- rolldown: some minor perf optimization found by autoresearch (#8730) by @Brooooooklyn
- replace Vec allocation with lazy iterator in find_hash_placeholders (#8703) by @Boshen
- replace TypedDashMap with TypedMap in CustomField (#8708) by @Boshen
- bench: remove scan benchmark binary to halve LTO link time (#8694) by @Boshen

### 🧪 Testing

- watch: increase timeout for error output (#8766) by @sapphi-red
- vite-tests: remove JS plugin tests (#8767) by @sapphi-red
- watch: add CLI exit code test (#8752) by @sapphi-red
- normalize paths on Windows even if `resolve.symlinks` is false (#8483) by @sapphi-red

### ⚙️ Miscellaneous Tasks

- correct comment in bundle-analyzer-plugin.ts (#8770) by @origami-z
- upgrade oxc to 0.120.0 (#8764) by @Boshen
- enable all test for `reset` category in MagicString.test.ts (#8749) by @IWANABETHATGUY
- deps: update test262 submodule for tests (#8742) by @sapphi-red
- deps: update oxc apps (#8734) by @renovate[bot]
- deps: update softprops/action-gh-release action to v2.6.1 (#8724) by @renovate[bot]
- deps: update npm packages (major) (#8722) by @renovate[bot]
- deps: update github-actions (major) (#8721) by @renovate[bot]
- deps: update softprops/action-gh-release action to v2.6.0 (#8720) by @renovate[bot]
- deps: update npm packages (#8718) by @renovate[bot]
- deps: update rust crates (#8717) by @renovate[bot]
- deps: update github-actions (#8716) by @renovate[bot]
- deps: update dependency oxlint-tsgolint to v0.17.0 (#8713) by @renovate[bot]
- deps: bump cargo-shear to v1.11.2 (#8711) by @Boshen
- use org level `CODE_OF_CONDUCT.md` (#8706) by @sapphi-red
- fix cache key mismatch and remove redundant cache saves (#8695) by @Boshen
- deps: update oxc apps (#8692) by @renovate[bot]
- deps: update oxc apps (#8649) by @renovate[bot]
- should do matrix out side of reusable workflows 2 (#8691) by @hyf0
- should do matrix out side of reusable workflows (#8690) by @hyf0
- deps: update dependency rolldown-plugin-dts to v0.22.5 (#8689) by @renovate[bot]
- upgrade oxc to 0.119.0 and oxc_resolver to 11.19.1 (#8686) by @Boshen
- correct if condition of `type-check` job (#8677) by @hyf0
- Gate CI type-check job on node changes (#8669) by @Copilot
- benchmark: improve codspeed build (#8665) by @Boshen
- deps: update oxc to v0.118.0 (#8650) by @renovate[bot]
- deps: update crate-ci/typos action to v1.44.0 (#8647) by @renovate[bot]
- deps: update oxc resolver to v11.19.1 (#8646) by @renovate[bot]
- deps: update dependency rust to v1.94.0 (#8648) by @renovate[bot]
- deps: update dependency rolldown-plugin-dts to v0.22.4 (#8645) by @renovate[bot]

### ◀️ Revert

- Revert "ci: Gate CI type-check job on node changes" (#8674) by @hyf0
- "chore(deps): update dependency rust to v1.94.0 (#8648)" (#8660) by @shulaoda

### ❤️ New Contributors

* @origami-z made their first contribution in [#8770](#8770)
* @drewolson made their first contribution in [#8741](#8741)
* @thisisnkc made their first contribution in [#8731](#8731)

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.

4 participants