Skip to content

fix(checker): preserve default library member names after a flow limit - #1125

Merged
maschwenk merged 1 commit into
mainfrom
fix/fast-flow-limit-lib-names
Nov 28, 2026
Merged

maschwenk merged 1 commit into
mainfrom
fix/fast-flow-limit-lib-names

Conversation

@maschwenk

@maschwenk maschwenk commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

fixes #1118. when a file hits the control-flow depth limit (TS2563), flow analysis stays disabled on that checker. under --fast, the same checker can then check lib.es5.d.ts, where Function[Symbol.hasInstance] resolves to an error type and causes two false TS2430 errors on CallableFunction and NewableFunction. this keeps the flow bailout everywhere except a direct computed property name in a default library file starting at a bare FlowFlags::Start, and only outside Go-compatible history. ordinary mode is unchanged.

check before after
largeControlFlowGraph false TS2430 (4 CPUs, 4 checkers, --fast) 24/25 runs 0/25 runs
repeated parity vs pinned tsgo (incl. 2 real TS2430 controls) - 150/150 match
cold t3code-server & 19 CI catalog benchmarks baseline flat

adds a flow_limit CLI integration test that fails 5/5 times without the fix

@codspeed

codspeed Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

Warning

oxc-project has exceeded the Hobby plan limit of 5 active contributors. Upgrade your plan or apply to the open source program by December 8, 2026 to keep using CodSpeed.

1 warning

⚠️ 4 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

βœ… 8 untouched benchmarks
⏩ 8 skipped benchmarks1


Comparing fix/fast-flow-limit-lib-names (8ca1b33) with main (13db502)

Open in CodSpeed

Footnotes

  1. 8 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Performance change vs main

Workflow run Β· main 13db50241e4f β†’ PR merge 798ca4d429cf (head 8ca1b33ab814)

Clef gate: Clef estimated 56.2% default and single-threaded wall time, 53.0% peak RSS, 72.2% single-threaded instruction count impact probability.

Release builds in fast mode (TSRS_FAST=1) with Hyperfine 2 hardware counters. After warming each binary, alternating main/PR pairs measure wall time at both the fast preset's default checker count and with --singleThreaded, with ten pairs per configuration by default. Instructions come from the single-threaded runs; peak RSS comes from the default-count runs.
Incremental runs start with fresh build info before every invocation; check runs disable incremental compilation.

Project Mode Single-thread wall time Ξ” Single-thread instructions Ξ” Default wall time Ξ” Default peak RSS Ξ”
vscode check -0.2% +0.036% +0.2% -0.1%
vscode incremental -0.2% +0.036% -0.1% -0.1%
xstate-main check +0.1% +0.007% -2.2% +0.3%
xstate-main incremental -0.3% +0.009% -1.2% -0.6%
webpack check -0.2% +0.020% -0.2% +0.2%
webpack incremental +0.1% +0.020% -2.1% +0.1%
mui-docs check -0.4% -0.003% -1.9% -2.5%
mui-docs incremental +0.4% +0.007% -0.6% +0.4%
Compiler check -0.1% +0.036% +0.6% +0.5%
Compiler incremental -0.5% +0.035% -2.9% -0.4%
Compiler-Unions check -0.3% +0.020% +1.3% -1.0%
Compiler-Unions incremental -0.1% +0.019% -1.5% 0.0%
cal-diy check -0.1% +0.005% +0.6% +0.6%
cal-diy incremental +0.3% +0.009% +0.4% +0.1%
formbricks-web check +0.4% +0.016% +0.2% 0.0%
formbricks-web incremental +0.4% +0.010% -0.1% +0.3%
supabase-studio check +0.2% +0.011% +0.4% +0.2%
supabase-studio incremental +0.3% +0.015% +0.4% 0.0%
t3code-server check -0.1% +0.018% -0.3% -0.2%
t3code-server incremental +0.1% +0.017% +0.3% +0.1%
mikro-orm check +0.3% +0.006% +0.3% -0.2%
mikro-orm incremental -0.2% +0.006% +0.5% +0.5%
next-packages-next check +0.4% +0.013% +0.8% -0.1%
next-packages-next incremental 0.0% +0.009% +0.1% 0.0%
next-root check -0.3% +0.022% -0.1% -0.4%
next-root incremental +0.2% +0.019% +0.3% -0.3%
storybook check -0.2% +0.011% -3.2% -0.2%
storybook incremental -0.1% +0.011% -1.4% -0.2%
nuxt check +0.5% +0.015% -1.0% -0.3%
nuxt incremental +0.1% +0.011% -0.2% +0.4%
playwright check 0.0% +0.021% +0.2% +0.7%
playwright incremental +0.7% +0.020% -1.1% 0.0%
drizzle-orm check +0.9% +0.007% -1.4% -0.4%
drizzle-orm incremental +0.1% +0.007% -0.1% -0.2%
typeorm check +0.3% +0.032% -1.1% +0.8%
typeorm incremental +0.2% +0.030% +4.2% -0.4%
date-fns check +0.2% -0.007% +0.3% +0.1%
date-fns incremental -1.0% +0.005% -1.1% -0.6%

Negative means the PR used less; positive means it used more. Deltas are medians of paired PR/main ratios for wall time and instructions. Single-threaded runs reduce scheduling noise; shared CI machines can still add noise to wall time.

Measured medians (main β†’ PR)
Project Mode Single-thread wall time (s) Single-thread instructions Default wall time (s) Default peak RSS (MiB)
vscode check 8.363 β†’ 8.351 82,264,452,608 β†’ 82,294,097,133.5 1.433 β†’ 1.435 1841.2 β†’ 1839.7
vscode incremental 8.577 β†’ 8.580 84,679,400,429 β†’ 84,709,389,522.5 1.637 β†’ 1.635 2162.5 β†’ 2160.6
xstate-main check 0.510 β†’ 0.512 5,566,749,800 β†’ 5,567,239,142.5 0.130 β†’ 0.125 242.2 β†’ 243.0
xstate-main incremental 0.545 β†’ 0.545 5,728,494,537.5 β†’ 5,729,009,291 0.165 β†’ 0.165 244.3 β†’ 242.9
webpack check 0.913 β†’ 0.913 10,882,619,675 β†’ 10,884,425,770 0.207 β†’ 0.206 404.4 β†’ 405.0
webpack incremental 0.958 β†’ 0.957 11,105,268,257 β†’ 11,107,052,349 0.244 β†’ 0.239 403.1 β†’ 403.3
mui-docs check 2.371 β†’ 2.369 33,112,564,678.5 β†’ 33,112,756,080 0.954 β†’ 0.945 1239.1 β†’ 1208.6
mui-docs incremental 2.502 β†’ 2.525 34,464,291,890.5 β†’ 34,465,324,077 1.094 β†’ 1.085 1160.5 β†’ 1164.6
Compiler check 0.142 β†’ 0.142 1,775,251,476 β†’ 1,775,893,304 0.064 β†’ 0.064 77.4 β†’ 77.8
Compiler incremental 0.140 β†’ 0.140 1,789,635,504.5 β†’ 1,790,261,824 0.066 β†’ 0.065 79.7 β†’ 79.4
Compiler-Unions check 0.191 β†’ 0.192 3,052,425,627.5 β†’ 3,053,020,885.5 0.090 β†’ 0.090 81.8 β†’ 81.0
Compiler-Unions incremental 0.193 β†’ 0.193 3,065,127,567 β†’ 3,065,703,598 0.092 β†’ 0.091 85.0 β†’ 85.1
cal-diy check 2.810 β†’ 2.809 28,972,523,137.5 β†’ 28,974,487,893 0.916 β†’ 0.917 1349.0 β†’ 1357.6
cal-diy incremental 2.697 β†’ 2.707 30,593,489,791.5 β†’ 30,595,841,134.5 1.019 β†’ 1.020 1266.6 β†’ 1267.5
formbricks-web check 3.355 β†’ 3.364 37,093,220,707 β†’ 37,099,149,026 0.862 β†’ 0.862 1579.8 β†’ 1580.6
formbricks-web incremental 3.548 β†’ 3.561 39,692,469,100.5 β†’ 39,696,850,569 1.081 β†’ 1.081 1620.9 β†’ 1626.1
supabase-studio check 3.581 β†’ 3.588 40,829,092,609.5 β†’ 40,833,321,384.5 0.896 β†’ 0.898 1307.3 β†’ 1309.6
supabase-studio incremental 3.861 β†’ 3.859 43,776,127,928 β†’ 43,781,515,818.5 1.038 β†’ 1.042 1363.1 β†’ 1363.0
t3code-server check 3.592 β†’ 3.589 41,063,405,693 β†’ 41,071,189,660.5 1.588 β†’ 1.587 1446.7 β†’ 1444.2
t3code-server incremental 3.600 β†’ 3.603 41,581,769,515.5 β†’ 41,587,170,901.5 1.409 β†’ 1.407 1305.0 β†’ 1306.2
mikro-orm check 3.967 β†’ 3.986 44,480,420,955.5 β†’ 44,483,947,699 0.833 β†’ 0.831 1283.2 β†’ 1280.2
mikro-orm incremental 4.039 β†’ 4.029 44,791,916,137 β†’ 44,794,097,309.5 1.082 β†’ 1.077 1255.6 β†’ 1261.3
next-packages-next check 1.459 β†’ 1.461 17,416,946,060 β†’ 17,419,214,994 0.368 β†’ 0.370 560.9 β†’ 560.2
next-packages-next incremental 1.487 β†’ 1.488 17,733,189,566 β†’ 17,734,625,304.5 0.442 β†’ 0.439 564.6 β†’ 564.8
next-root check 1.176 β†’ 1.176 13,996,377,798 β†’ 13,999,613,067.5 0.261 β†’ 0.261 431.6 β†’ 429.8
next-root incremental 1.228 β†’ 1.229 14,459,115,378.5 β†’ 14,462,194,860.5 0.318 β†’ 0.317 473.8 β†’ 472.4
storybook check 0.761 β†’ 0.764 8,867,856,332.5 β†’ 8,868,825,311.5 0.199 β†’ 0.199 397.3 β†’ 396.3
storybook incremental 0.812 β†’ 0.813 9,192,615,704 β†’ 9,193,611,888.5 0.246 β†’ 0.253 376.5 β†’ 376.0
nuxt check 0.806 β†’ 0.811 8,502,889,958 β†’ 8,504,134,438 0.207 β†’ 0.206 391.1 β†’ 389.9
nuxt incremental 0.858 β†’ 0.862 8,905,981,748 β†’ 8,906,952,458 0.235 β†’ 0.231 391.5 β†’ 393.2
playwright check 0.668 β†’ 0.670 7,403,393,080.5 β†’ 7,404,978,215.5 0.173 β†’ 0.175 361.7 β†’ 364.1
playwright incremental 0.685 β†’ 0.688 7,581,738,882 β†’ 7,583,240,059 0.190 β†’ 0.188 340.3 β†’ 340.3
drizzle-orm check 0.513 β†’ 0.517 5,948,532,606.5 β†’ 5,948,817,070 0.173 β†’ 0.172 378.0 β†’ 376.3
drizzle-orm incremental 0.528 β†’ 0.533 6,120,172,722 β†’ 6,120,381,201.5 0.173 β†’ 0.173 345.5 β†’ 345.0
typeorm check 0.581 β†’ 0.584 6,387,279,200.5 β†’ 6,389,396,631 0.133 β†’ 0.131 225.3 β†’ 227.2
typeorm incremental 0.634 β†’ 0.634 6,776,452,769 β†’ 6,778,374,843.5 0.168 β†’ 0.180 233.8 β†’ 232.8
date-fns check 0.274 β†’ 0.274 3,341,358,059 β†’ 3,341,344,776.5 0.083 β†’ 0.084 152.4 β†’ 152.6
date-fns incremental 0.308 β†’ 0.306 3,577,917,654 β†’ 3,578,302,367.5 0.142 β†’ 0.140 164.6 β†’ 163.5

tsrs-lint

Release tsrs-lint linting each project's source files with all 61 rules. After a warmup run of each binary, alternating main/PR pairs (10 per mode) measure wall time, CPU time and peak RSS with TSRS_FAST unset and with TSRS_FAST=1.

Project Mode Wall time Ξ” CPU time Ξ” Peak RSS Ξ” Diagnostics (main β†’ PR)
webpack default +0.4% +1.2% +0.1% 35405, identical
webpack TSRS_FAST=1 -0.1% +0.3% +0.1% 35405, identical
drizzle-orm default +0.6% -0.6% -0.2% 7057, identical
drizzle-orm TSRS_FAST=1 -0.1% +0.1% +0.1% 7057, identical
xstate-main default -1.1% -0.3% +0.1% 6489, identical
xstate-main TSRS_FAST=1 -0.2% -0.7% +0.2% 6489, identical

Negative means the PR used less. Wall and CPU time deltas are medians of paired PR/main ratios; peak RSS compares medians.

Measured lint medians (main β†’ PR)
Project Mode Wall time (s) CPU time (s) Peak RSS (MiB)
webpack default 0.352 β†’ 0.354 1.818 β†’ 1.823 465.1 β†’ 465.4
webpack TSRS_FAST=1 0.352 β†’ 0.351 1.809 β†’ 1.819 464.9 β†’ 465.4
drizzle-orm default 0.215 β†’ 0.213 1.135 β†’ 1.138 404.4 β†’ 403.5
drizzle-orm TSRS_FAST=1 0.212 β†’ 0.214 1.140 β†’ 1.145 403.8 β†’ 404.1
xstate-main default 0.312 β†’ 0.308 1.358 β†’ 1.356 341.9 β†’ 342.2
xstate-main TSRS_FAST=1 0.310 β†’ 0.309 1.366 β†’ 1.358 342.4 β†’ 343.1

@maschwenk
maschwenk marked this pull request as ready for review November 28, 2026 23:35
@maschwenk
maschwenk added this pull request to the merge queue Nov 28, 2026
Merged via the queue into main with commit 41c0c54 Nov 28, 2026
73 checks passed
@maschwenk
maschwenk deleted the fix/fast-flow-limit-lib-names branch November 28, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

--fast reports spurious TS2430 on CallableFunction and NewableFunction after TS2563

1 participant