Skip to content

Do not pass /shared to compilers that cannot reach a compiler server - #3943

Merged
siegfriedpammer merged 1 commit into
masterfrom
tester-compiler-server-timeout
Jul 31, 2026
Merged

Do not pass /shared to compilers that cannot reach a compiler server#3943
siegfriedpammer merged 1 commit into
masterfrom
tester-compiler-server-timeout

Conversation

@siegfriedpammer

Copy link
Copy Markdown
Member

Since #3914 enabled the Roslyn 1.x/2.x configurations on non-Windows, the Linux decompiler-tests CI step went from ~2 to ~31 minutes (and the macOS job from ~10 to ~53 minutes total).

The TRX artifacts show where the time goes: the ~340 UseRoslyn2_10_0 test cases average 20.7 s each, while every other toolset averages 0.2 s. The compile itself is not slow -- invoking the same 2.10 csc.dll by hand takes 0.7 s. The cost is the /shared switch the test harness passes to every Roslyn invocation: the dotnet-hosted Roslyn 2.x client cannot start its VBCSCompiler server under a current dotnet host (the --roll-forward only applies to csc/vbc itself, not to the server process the client spawns), so each invocation waits out the client's full 20-second new-server connection timeout and then falls back to a sub-second in-process compile. Measured with the same trivial compile: 0.7 s without /shared, 20.8 s with it (of which only ~1 s is CPU time).

This gates /shared on Windows-or-Roslyn-3.0+, keeping the compiler server where it works and dropping it for the dotnet-hosted 2.x and Mono-hosted 1.x builds. Locally the InlineAssignmentTest matrix drops from 25 s to 6 s, with the 2.10 cases going from 21.5 s to 2.5 s; the full VBPretty suite passes.

This should also make it feasible to re-enable the decompiler tests on macOS (skipped in #3941's follow-up commit for being the slowest job) if desired.

🤖 Generated with Claude Code

The dotnet-hosted Roslyn 2.10 build cannot start its VBCSCompiler server
under a current dotnet host, so with /shared every test compilation first
waited out the client's full 20-second new-server connection timeout
before falling back to a sub-second in-process compile. Since the 2.10
configurations were enabled on non-Windows (#3914), that added ~29
minutes to the Linux CI job and ~43 minutes on macOS: ~340 affected
tests at ~21s each, versus ~0.2s for the toolsets whose server works.

Assisted-by: Claude:claude-fable-5:Claude Code
@siegfriedpammer
siegfriedpammer marked this pull request as ready for review July 31, 2026 16:17
@siegfriedpammer
siegfriedpammer merged commit d29aeb3 into master Jul 31, 2026
15 checks passed
@siegfriedpammer
siegfriedpammer deleted the tester-compiler-server-timeout branch July 31, 2026 16:57
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