Skip to content

fix: avoid SetGlobalDefaultError panic when rolldown devtools is enabled#1364

Draft
fengmk2 wants to merge 2 commits intomainfrom
fix-devtools-1356
Draft

fix: avoid SetGlobalDefaultError panic when rolldown devtools is enabled#1364
fengmk2 wants to merge 2 commits intomainfrom
fix-devtools-1356

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Apr 12, 2026

Skip installing a global tracing subscriber during NAPI module init when
VITE_LOG is not set. Previously, init_tracing() always installed a no-op
subscriber (empty Targets filter) that occupied the global default slot.
When rolldown devtools was later enabled via build.rolldownOptions.devtools,
DebugTracer::init() would panic trying to claim the already-occupied slot.

Now the global default slot stays free for other components unless VITE_LOG
is explicitly set, and even then try_init() is used for graceful fallback.

Closes #1356

On Windows, crossterm emits both Press and Release events for each
key press. Without filtering for Press-only, arrow keys in the
`vp i` package manager prompt were processed twice per press (move
then move back), making them appear non-functional.

Closes #1361
@fengmk2 fengmk2 self-assigned this Apr 12, 2026
Copy link
Copy Markdown
Member Author

fengmk2 commented Apr 12, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label auto-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.

Skip installing a global tracing subscriber during NAPI module init when
VITE_LOG is not set. Previously, init_tracing() always installed a no-op
subscriber (empty Targets filter) that occupied the global default slot.
When rolldown devtools was later enabled via build.rolldownOptions.devtools,
DebugTracer::init() would panic trying to claim the already-occupied slot.

Now the global default slot stays free for other components unless VITE_LOG
is explicitly set, and even then try_init() is used for graceful fallback.

Closes #1356
@fengmk2 fengmk2 force-pushed the fix-devtools-1356 branch from b913a30 to a493b94 Compare April 12, 2026 13:40
Copy link
Copy Markdown
Member Author

fengmk2 commented Apr 12, 2026

rolldown/rolldown#9078

Base automatically changed from fix-win-vp-i to main April 13, 2026 03:21
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