Do not pass /shared to compilers that cannot reach a compiler server - #3943
Merged
Conversation
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
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.
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_0test cases average 20.7 s each, while every other toolset averages 0.2 s. The compile itself is not slow -- invoking the same 2.10csc.dllby hand takes 0.7 s. The cost is the/sharedswitch the test harness passes to every Roslyn invocation: the dotnet-hosted Roslyn 2.x client cannot start its VBCSCompiler server under a currentdotnethost (the--roll-forwardonly 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
/sharedon 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 theInlineAssignmentTestmatrix 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