Repository navigation
Conversation
ihid-assistant
Bot
force-pushed
the
csharp-roslyn-fast-path
branch
from
November 18, 2026 10:52
7b49b91 to
16fd5b4
Compare
ihid-assistant
Bot
force-pushed
the
csharp-roslyn-fast-path
branch
from
November 18, 2026 17:21
16fd5b4 to
9315f2c
Compare
The runner now first tries a fast path. It reduces the solution's .csproj to a key, finds the project shape with the same key, and compiles the solution with Roslyn inside its own process, using that shape's compiler arguments and generated files. It then runs the test executable against the shape's precompiled dependencies. This skips `dotnet restore` and `dotnet build`. If the fast path can't handle the solution, the runner prints the reason and builds with MSBuild as before. Setting EXERCISM_FAST_PATH=off turns the fast path off. The README explains both ways and how to add a new shape. Co-authored-by: iHiD <286476+iHiD@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ErikSchierboom
force-pushed
the
csharp-roslyn-fast-path
branch
from
November 18, 2026 17:59
9315f2c to
ecbe613
Compare
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.
Hello 🙂 I'm working with Claude to try and get our tooling faster.
This PR is the last of three that together make this project around 5x faster. I've run it in production to benchmark things in the real world against the most recent few hundred solutions, so I'm confident that it works robustly. However, I've not written the code. I have tried my hardest to get Claude to write sensible messages and comments that explains stuff, but I'd ask for your patience in the fact I'm sending AI code to you. Everything below here is from your friendly neighbourhood LLM...
This is the third of three PRs. Merge them in order: #330, then #331, then this one (#332).
What changed
dotnet restoreanddotnet build. Each call starts MSBuild, which evaluates the project, resolves packages and compiles. Now the runner first tries a fast path. It compiles the solution with Roslyn inside its own process, then runs the xUnit v3 test executable as in Run the xUnit v3 test executable directly instead of through dotnet test (~45% faster) #330..csprojinto account. It reduces it to its properties,Usingitems and package references, then looks for a shape from Build a template project for each project shape when the image is built (no run-time change) #331 with identical ones. If it finds one, it compiles with that shape's compiler arguments and generated source files.results.json. No failure messages change in this PR.EXERCISM_FAST_PATH=offturns off the fast path, so its results can be compared with MSBuild's.This has been tested in production, and with all three PRs merged it has reduced the median run from 9.0s to 1.8s.
When MSBuild still runs
In each of these cases, the runner prints
Fast path not used: <reason>and builds with MSBuild:.csprojmatches no shape. If the track changes an exercise's.csproj, the new version will match no shape until someone adds it (the README explains how). It also happens for a project file with conditions, imports, targets or item types other thanUsingandPackageReference.binorobjfolder, another project file, aDirectory.Build.*orDirectory.Packages.propsfile,global.json,nuget.config,AssemblyInfo.cs, a.resxor.globalconfigfile, or an.editorconfigwith diagnostic settings.[GeneratedRegex]), or has a[Fact]or[Theory]outside the test file. The runner finds these while it reads the source files, so these solutions take slightly longer than they would with Run the xUnit v3 test executable directly instead of through dotnet test (~45% faster) #330 alone.🤖 Generated with Claude Code