Repository navigation
Route typed emit paths to per-file trace threads - #65468
Open
Jake Bailey (jakebailey) wants to merge 1 commit into
Open
Jake Bailey (jakebailey) wants to merge 1 commit into
Jake Bailey (jakebailey) wants to merge 1 commit into
Conversation
Emit events carry rooted file paths, so the string-only router placed unrelated output files on Main. Recognize rooted file paths in the shared routing logic while keeping serialized trace arguments intact. Exercise JavaScript and declaration paths through trace.json, including overlapping file events, string-path thread identity, and empty-path fallback. Update the existing declaration trace baselines accordingly.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the typed-path trace-thread routing fix.
No open issues 🎉
What changed in this PR
Fixes a tracing regression introduced by typed paths in the native TypeScript compiler. Emit events with RootedFilePath arguments now use per-file trace threads instead of falling back to the main thread.
Changes:
- Recognizes typed paths alongside strings when selecting trace threads.
- Adds regression tests for JavaScript and declaration emit routing, empty-path fallback, and duration nesting.
- Updates three trace baselines to reflect declaration output threads.
| File | Description |
|---|---|
tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-creates-types-in-a-stable-order.js |
Records declaration emit on its output-file thread. |
tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-creates-static-index-signature-sibling-types-in-a-stable-order.js |
Updates static index-signature tracing expectations. |
tsc/testdata/baselines/reference/tsc/generateTrace/generateTrace-creates-index-signature-sibling-types-in-a-stable-order.js |
Updates index-signature tracing expectations. |
tsc/internal/tracing/tracing.go |
Handles RootedFilePath values in thread selection. |
tsc/internal/tracing/tracing_test.go |
Verifies typed emit paths use stable, distinct file threads. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I broke this in my typed paths PR. Oops. Yay
any.