Repository navigation
Emit the files of each checker in a deterministic order - #64922
Mateusz Burzyński (Andarist) wants to merge 1 commit into
Conversation
|
TypeScript Bot (@typescript-bot) perf test this faster |
|
Jake Bailey (@jakebailey) Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
TypeScript Bot (@typescript-bot) perf test this faster (benchmarks got updated) |
|
Hey Jake Bailey (@jakebailey), this PR was updated less than two minutes before this command. Please wait until it has been unchanged for two minutes and try again. |
|
TypeScript Bot (@typescript-bot) perf test this faster |
|
Jake Bailey (@jakebailey) Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the changes that order checker-dependent transformations while preserving parallel printing.
No open issues 🎉
What changed in this PR
This PR removes a source of nondeterminism in the native compiler’s emit pipeline, complementing the symbol-table ordering work in #64916. Files sharing a checker are transformed in a fixed order, while printing remains parallel.
Changes:
- Group files by checker and transform each group in reverse program order, matching single-threaded emit scheduling.
- Separate checker-dependent transformation from printing and writing output.
- Add a shared-checker regression test with JavaScript, declaration, type, and symbol baselines.
| File | Description |
|---|---|
tsc/testdata/tests/cases/compiler/noFlakyDeclarationEmitSharedCheckerOrder.ts |
Adds a single-checker declaration-emit regression with circular module references. |
tsc/testdata/baselines/reference/compiler/noFlakyDeclarationEmitSharedCheckerOrder.types |
Records expected inferred types. |
tsc/testdata/baselines/reference/compiler/noFlakyDeclarationEmitSharedCheckerOrder.symbols |
Records expected symbol bindings. |
tsc/testdata/baselines/reference/compiler/noFlakyDeclarationEmitSharedCheckerOrder.js |
Records expected JavaScript and declaration output. |
tsc/internal/compiler/program.go |
Schedules ordered transformations per checker and separate printing tasks. |
tsc/internal/compiler/emitter.go |
Splits transformation from deferred printing. |
tsc/internal/compiler/checkerpool.go |
Groups file indices by checker while preserving input order. |
Review effort: Balanced
|
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
|
TypeScript Bot (@typescript-bot) perf test this faster I like to be sure |
|
Jake Bailey (@jakebailey) Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I found this extra source of non-determinism when working on #64916