Repository navigation
Conversation
vbreuss
force-pushed
the
feat/union-parameters-disable-switch
branch
from
November 10, 2026 19:44
44eda65 to
934295d
Compare
🚀 Benchmark ResultsCompared to CallbackBenchmarks✅ No changes in memory or relative performance (1 benchmarks) All benchmarks compared to main
Raw resultsBenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon) AMD EPYC 9V74 3.67GHz, 1 CPU, 4 logical and 2 physical cores .NET SDK 11.0.100 [Host] : .NET 11.0.0 (11.0.0, 11.0.26.53018), X64 RyuJIT x86-64-v4 Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=1 WarmupCount=10
CompleteEventBenchmarks✅ No changes in memory or relative performance (1 benchmarks) All benchmarks compared to main
Raw resultsBenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon) AMD EPYC 9V74 3.69GHz, 1 CPU, 4 logical and 2 physical cores .NET SDK 11.0.100 [Host] : .NET 11.0.0 (11.0.0, 11.0.26.53018), X64 RyuJIT x86-64-v4 Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=1 WarmupCount=10
CompleteIndexerBenchmarks✅ No changes in memory or relative performance (2 benchmarks) All benchmarks compared to main
Raw resultsBenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon) AMD EPYC 7763 3.23GHz, 1 CPU, 4 logical and 2 physical cores .NET SDK 11.0.100 [Host] : .NET 11.0.0 (11.0.0, 11.0.26.53018), X64 RyuJIT x86-64-v3 Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=1 WarmupCount=10
CompleteMethodBenchmarksRelative performance (how many times as long the other library takes as Mockolate, main → PR)
All benchmarks compared to main
Raw resultsBenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon) AMD EPYC 9V74 3.69GHz, 1 CPU, 4 logical and 2 physical cores .NET SDK 11.0.100 [Host] : .NET 11.0.0 (11.0.0, 11.0.26.53018), X64 RyuJIT x86-64-v4 Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=1 WarmupCount=10
CompletePropertyBenchmarksRelative performance (how many times as long the other library takes as Mockolate, main → PR)
All benchmarks compared to main
Raw resultsBenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon) AMD EPYC 9V74 3.69GHz, 1 CPU, 4 logical and 2 physical cores .NET SDK 11.0.100 [Host] : .NET 11.0.0 (11.0.0, 11.0.26.53018), X64 RyuJIT x86-64-v4 Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=1 WarmupCount=10
MockCreationBenchmarks✅ No changes in memory or relative performance (1 benchmarks) All benchmarks compared to main
Raw resultsBenchmarkDotNet v0.15.8, Linux Ubuntu 26.04.1 LTS (Resolute Raccoon) Intel Xeon Platinum 8370C CPU 2.80GHz (Max: 2.79GHz), 1 CPU, 4 logical and 2 physical cores .NET SDK 11.0.100 [Host] : .NET 11.0.0 (11.0.0, 11.0.26.53018), X64 RyuJIT x86-64-v4 Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15 LaunchCount=1 WarmupCount=10
|
…DisableUnionParameters kill switch Once C# 15 ships, union mode follows the language version on its own; the remaining switch only lets projects keep the classic overloads. WIP: the generator tests need a Roslyn package with LanguageVersion.CSharp15, which is not on nuget.org yet, so this does not compile until that package is referenced. The v4 upgrade guide (Docs/changelogs/migration-to-v4.md) still describes the MockolateUnionParameters opt-in and has to move to the kill switch as well.
The generator must still load in Roslyn 5.0, so the generator tests also run against it on net10.0, while net11.0 needs a Roslyn that knows C# 15. Now that .NET 11 defaults to C# 15, the preview language version is no longer needed for the union-typed setup surface.
vbreuss
force-pushed
the
feat/union-parameters-disable-switch
branch
from
November 11, 2026 14:26
43a29aa to
34d6fda
Compare
This branch has not been deployed
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.
Now that C# 15 has shipped with .NET 11, union mode no longer needs an opt-in: it follows the project's language version on its own. The only switch left is
MockolateDisableUnionParameters, which lets a project keep the classic setup and verify overloads with C# 15, e.g. to retarget to .NET 11 first and switch to the new methods later.MockolateUnionParametersnever shipped in a release, so removing it breaks no one.The generator must still load in Roslyn 5.0, while the union tests need a Roslyn that knows C# 15.
Mockolate.SourceGenerators.Teststherefore also runs onnet10.0againstMinimumRoslynVersion(without the snapshot and union tests), so the classic output stays covered on the oldest supported compiler. Sincenet11.0defaults to C# 15, the test projects no longer need<LangVersion>preview</LangVersion>.Warning
Draft: the
net11.0generator tests need aMicrosoft.CodeAnalysis.CSharppackage withLanguageVersion.CSharp15, which is not on nuget.org yet. UntilDirectory.Packages.propsreferences it,Mockolate.SourceGenerators.Testsdoes not compile fornet11.0.The union test job is renamed from "Union tests (net11.0, C# preview)" to "Union tests (net11.0, C# 15)".