Repository navigation
Ship for .NET 10 and .NET 11 side by side (#356) - #358
Merged
Merged
Conversation
The library, the tests and the benchmarks target net11.0, and global.json asks for SDK 11.0.100 with rollForward latestFeature as before, so CI's setup-dotnet, which reads global.json, installs the .NET 11 SDK on all five runners. System.IO.Hashing moves from 10.0.14 to 11.0.0, the release that ships with .NET 11; it is still a package on .NET 11, not part of the shared framework (no System.IO.Hashing assembly in Microsoft.NETCore.App 11.0.0). scripts/stryker-file.sh copies the test build output from its framework directory, which is now net11.0. Versions are from Microsoft's release metadata, read 2026-11-10: releases-index.json and 11.0/releases.json at builds.dotnet.microsoft.com/dotnet/release-metadata list 11.0.0, released 2026-11-10, runtime 11.0.0 and SDK 11.0.100, release type STS, end of support 2028-11-14. The System.IO.Hashing versions are from nuget.org's flat container index the same day. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK3MspnYsGe3E6AZW1Prra
The README's installation section said the package requires .NET 10 or later, which a net11.0-only package no longer satisfies, and the bug report template offered net10.0 as its example framework. No CHANGELOG entry yet: what it says depends on whether the package drops net10.0 or keeps it beside net11.0, which is still to be decided. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK3MspnYsGe3E6AZW1Prra
…10.0 The library and the test project target net10.0;net11.0 rather than net11.0 alone: .NET 10 is the LTS and .NET 11 the STS, both supported to 2028-11-14, so a .NET 10 consumer keeps a package built for it. dotnet test runs the suite once per framework, on that framework's runtime. System.IO.Hashing is chosen per framework: 10.0.15, the latest 10.0 package (published 2026-11-10), for net10.0, and 11.0.0 for net11.0. A .NET 10 consumer's dependency stays on the 10.0 line; master had 10.0.14, so for them this is a patch bump. Restored as intended: the library's project.assets.json lists System.IO.Hashing/10.0.15 under net10.0 and 11.0.0 under net11.0. Benchmarks go back to net10.0 alone. BenchmarkDotNet 0.15.8, the latest stable release, stops on .NET 11 before running anything, with "NotImplementedException: GetRuntimeVersion not implemented for NotRecognized": its RuntimeMoniker list ends at Net10_0, and 0.16.0-preview.2 (2026-09-23, a prerelease) is the first with Net11_0. On net10.0 under SDK 11.0.100 a dry job of FilterTestBenchmarks.Bloom_Hit runs out of process on .NET 10.0.14. Measured with SDK 11.0.100 and runtimes 10.0.14 and 11.0.0: a build with every bin and obj removed, -warnaserror, exits 0 with no warnings and writes the library and the tests for both frameworks. The release workflow's tag check, dotnet msbuild -getProperty:Version on the library project, still reads 6.2.0 from the multi-targeted project. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK3MspnYsGe3E6AZW1Prra
Both workflows' setup-dotnet now installs a 10.0.x SDK beside global.json's 11.0.100: the SDK from global.json builds both frameworks, and the .NET 10 SDK brings the runtime the net10.0 suite runs on. setup-dotnet's README (v6, read 2026-11-10): "In case both dotnet-version and global-json-file inputs are used, versions from both inputs will be installed." The matrix stays at five jobs, each testing both frameworks. CI's results logger takes a prefix rather than a file name. With LogFileName fixed, both frameworks wrote the same file and only one survived: a run here left one test-results file holding 2,668 results, all loaded from bin/Release/net10.0. With LogFilePrefix each framework writes its own, <prefix>_net10.0_<time>.trx and <prefix>_net11.0_<time>.trx, and the upload step's test-results/ path takes both. The Test step needs no --framework, and either framework failing fails it. Measured with SDK 11.0.100, runtimes 10.0.14 and 11.0.0, and a temporary test (not committed) that fails only on the runtime major named in an environment variable, run with dotnet test and no --framework: | case | summaries printed | exit | |---------------------------|------------------------------------|------| | fails nowhere | Passed! net11.0, Passed! net10.0 | 0 | | fails on .NET 10 only | Passed! net11.0, Failed! net10.0 | 1 | | fails on .NET 11 only | Passed! net10.0, Failed! net11.0 | 1 | | no .NET 10 runtime at all | Passed! net11.0, and the host's | 1 | | | "You must install or update .NET" | | The last row is why the setup step installs 10.0.x: without it the net10.0 suite does not run, and only the exit code says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK3MspnYsGe3E6AZW1Prra
run_mutation took its verdict from the last line of dotnet test's output and called a mutant killed only when that line began "Failed!". With two target frameworks, dotnet test prints a summary for each, in the order the frameworks finish, so a mutant that only one framework's suite catches was reported as a survivor whenever the other framework finished last. Watched failing, before this change, with SDK 11.0.100 and runtimes 10.0.14 and 11.0.0, serially in this tree, MUTATION_FILTER 'FullyQualifiedName~TestHyperLogLog', on HyperLogLog's alpha for m = 16 (return 0.673 -> 0.697), the change put behind #if for one framework: | mutant | verdict before | |---------------------------------|----------------------------| | alpha, both frameworks | killed (10 tests) | | alpha, net11.0 only, round 1 | SURVIVED (all 131 passed) | | alpha, net10.0 only, round 1 | killed (10 tests) | | alpha, net11.0 only, round 2 | killed (10 tests) | | alpha, net10.0 only, round 2 | killed (10 tests) | | alpha, net11.0 only, round 3 | killed (10 tests) | | alpha, net10.0 only, round 3 | SURVIVED (all 131 passed) | | 0.673 -> 0.6730, equivalent | SURVIVED (all 131 passed) | Two of the six one-framework mutants, one of each kind, were reported as survivors with a count, the form TESTING.md tells a reader to believe. Now every summary line is read. A mutant is killed when any framework's summary says Failed!, which is what fails CI's Test step, and the verdict says on which framework and how many tests. It survives only when dotnet test exited 0 and every summary is a pass. A run that failed with no failing summary, such as a test host that crashed or a framework whose runtime is not installed, is still counted as surviving, as it was, but now reads "SURVIVED (no failing summary, but dotnet test exited N; summaries from: ...)" rather than as a survivor. Counting it killed would turn a missing runtime into a kill for every mutant. The parallel mode runs run_mutation in each copy, so it takes the same reading. The measurements after this change are in the commit that updates TESTING.md's description of these verdicts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK3MspnYsGe3E6AZW1Prra
Brings in #350, which charges every read at least what it allocates and adds TestReadChargesAreUpperBounds, whose constants are measured against what the runtime allocates; this branch now runs them on net10.0 and net11.0 both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK3MspnYsGe3E6AZW1Prra
The test project now builds for net10.0 and net11.0, and the script assumed one build: it ran the suite with a fixed TRX name, which both frameworks would write, copied a single bin/Release/<framework> directory for the reach step, and let Stryker choose the framework itself. Stryker's documentation (configuration, target-framework, read 2026-11-10) says the default is "randomly chosen if multiple frameworks are targeted", so the tests found to reach a file in one framework's build could be run by Stryker against the other's. A new --framework option names the build to sweep. The suite runs with --framework, the reach step copies that framework's build, and each file's Stryker config sets target-framework to it. The value is checked against the directories the build wrote, not a list kept in the script, and a framework with no build is refused with the ones there are. The default is net10.0, because every sweep recorded in TESTING.md and in the commit history ran on net10.0, the only framework before this branch, so a new sweep stays comparable with them. --framework net11.0 sweeps the other. Checked: bash -n passes, and --help prints the new option inside the usage block (its sed range moves from 5,24 to 5,28 for the four new lines). A full sweep was not run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK3MspnYsGe3E6AZW1Prra
README: "Targets .NET 10 and .NET 11" in place of the net11.0-only "Requires .NET 11 or later" this branch had written. CHANGELOG, under Unreleased, Added: the package carries lib/net10.0 and lib/net11.0, both tested on every CI runner, and each depends on the System.IO.Hashing of its own .NET, 10.0.15 and 11.0.0. 6.2.0 shipped 10.0.11 (its project file at v6.2.0). Both .NETs are supported until 2028-11-14 (Microsoft's support policy page and release metadata, read 2026-11-10). The CHANGELOG names no count of runners, following CLAUDE.md on counts in docs. NoGCRegion.Largest's remarks, TestAllocationMeasurement's two summaries of it, and TESTING.md's paragraph on rooms said macOS collects on segments. That is true of .NET 10 only: gcpriv.h at v11.0.0 defines USE_REGIONS when (!defined(HOST_APPLE) || defined(HOST_OSX)), where v10.0.0 and v10.0.14 have !defined(__APPLE__). That came from dotnet/runtime#125416, "Enable GC regions on macOS", merged 2026-03-20, first in 11.0.0-preview.3 (preview.2's gcpriv.h lacks it). The cap stays what segments give, since the suite still runs .NET 10 on macOS, and it holds under .NET 11 too: TestTheLargestRoomEveryRunnerGivesIsGiven enters a region of exactly Largest under each framework, and passes on net11.0 here (Linux). On macOS under .NET 11 it is CI's runner that checks it. TESTING.md's Verifying section says the suite runs once per framework, needs both runtimes, and that a missing runtime fails the run while the other framework's summary still reads Passed!, as measured in the commit that changed CI. Its stryker-file.sh paragraph says a sweep is of one framework's build, net10.0 by default. CONTRIBUTING.md says building takes the .NET 11 SDK and testing the .NET 10 runtime as well, and that in a tree last restored for other target frameworks dotnet clean fails with NETSDK1005 until a restore runs, which the && in its command then turns into a skipped build. Seen here: the first dotnet clean after retargeting failed with NETSDK1005 on all three projects. CLAUDE.md also says the library targets net10.0. It is left for Matt, as an instruction file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK3MspnYsGe3E6AZW1Prra
TESTING.md described the verdicts of the single-framework mutate.sh: a crashed test host read as SURVIVED with no count, a survivor as "SURVIVED (all N passed)". Since ac9c317 it reads every framework's summary, so the paragraph now gives the forms it prints. Measured after ac9c317, serially in this tree, with SDK 11.0.100 and runtimes 10.0.14 and 11.0.0, MUTATION_FILTER 'FullyQualifiedName~TestHyperLogLog', on HyperLogLog's alpha for m = 16 (return 0.673 -> 0.697), the change put behind #if for one framework, the same mutants ac9c317's message shows the old script misreporting: | mutant | verdict after | |------------------------------|-----------------------------------------------------| | alpha, both frameworks | killed (10 tests on net11.0, 10 tests on net10.0) | | alpha, net11.0 only, x3 | killed (10 tests on net11.0; all 131 on net10.0 | | | passed), all three rounds | | alpha, net10.0 only, x3 | killed (10 tests on net10.0; all 131 on net11.0 | | | passed), all three rounds | | 0.673 -> 0.6730, equivalent | SURVIVED (all 131 on net11.0, all 131 on net10.0 | | | passed) | With no .NET 10 runtime installed (SDK 11.0.100 and runtime 11.0.0): | alpha, both frameworks | killed (10 tests on net11.0) | | 0.673 -> 0.6730, equivalent | SURVIVED (no failing summary, but dotnet test | | | exited 1; summaries from: net11.0) | Before ac9c317, two of the six one-framework runs read "SURVIVED (all 131 passed)". After it, none does, and the equivalent mutant still survives as a survivor, so the reading kills neither too little nor everything. dotnet test with a filter no test matches exits 0 with no summary; that reads "SURVIVED (no failing summary, but dotnet test exited 0; summaries from: none)". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK3MspnYsGe3E6AZW1Prra
TestWhatEveryReadMakesOnceIsChargedWhatItAllocates holds a checksum's
state, a Crc32, to PersistenceFormat.ChecksumStateCost. On net11.0 it
fails, and the cause is the package rather than the runtime:
System.IO.Hashing 11.0.0's Crc32 adds a field, ParameterSet, a reference
of 8 bytes, so new Crc32() allocates 32 bytes there and 24 with 10.0.x.
Measured, least of 20, in a probe built for both frameworks:
| runtime | System.IO.Hashing | new Crc32() |
|---------|-----------------------|-------------|
| 10.0.14 | 10.0.14 | 24 |
| 10.0.14 | 10.0.15 | 24 |
| 10.0.14 | 11.0.0 (its net10.0) | 32 |
| 11.0.0 | 10.0.15 (rolled fwd) | 24 |
| 11.0.0 | 11.0.0 | 32 |
So the message now names the System.IO.Hashing assembly version loaded,
and the runtime, beside the charge. Red on net11.0 before the fix that
follows, run alone on both frameworks with SDK 11.0.100 and runtimes
10.0.14 and 11.0.0:
net11.0: "a checksum's state is charged 24 bytes, and that is not what
one allocates (System.IO.Hashing 11.0.0.0 loaded, on .NET
11.0.0)"
net10.0: passed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KK3MspnYsGe3E6AZW1Prra
…ytes ChecksumStateCost was a constant 24, what a Crc32 allocates with System.IO.Hashing 10. With 11.0.0 it allocates 32: the package's Crc32 adds a ParameterSet field beside its running value and hash length. The size follows the package, not the runtime (the previous commit's table), so the net11.0 build, which depends on 11.0.0, charged every large-form read from a byte array 8 bytes less than it allocates, and #350's TestReadChargesAreUpperBounds failed 16 tests there, all by 8 bytes. The cost is now read once, when PersistenceFormat is first used, from the assembly version of the System.IO.Hashing loaded: 32 from major 11 on, 24 before. Not from the target framework, because the application decides which package loads: a .NET 10 application that takes System.IO.Hashing 11.x runs this library's net10.0 build with the 32-byte state, and a framework-chosen 24 would undercharge it. A version that cannot be read is charged 32, the larger, since a charge may exceed what a read allocates but must not fall short of it. TestWhatEveryReadMakesOnceIsChargedWhatItAllocates is the test of this choice as it stands: it holds the cost chosen to what new Crc32() allocates with the package loaded, under each framework, which is one package version per framework (10.0.15 on net10.0, 11.0.0 on net11.0). Red before this commit on net11.0 only (the previous commit); green after on both, all 39 of TestReadChargesAreUpperBounds on each. Mutants of ChecksumStateCostFor, through scripts/mutate.sh in serial mode after this commit, SDK 11.0.100, runtimes 10.0.14 and 11.0.0, MUTATION_FILTER 'FullyQualifiedName~TestReadChargesAreUpperBounds': | mutant | verdict | |---------------------------------------|----------------------------------| | 24 on both | killed, 16 tests on net11.0 | | 32 on both | killed, 1 test on net10.0 | | values swapped, ? 24 : 32 | killed, 16 on net11.0, 1 on | | | net10.0 | | threshold >= 12 | killed, 16 tests on net11.0 | | threshold >= 10 | killed, 1 test on net10.0 | | threshold > 11 | killed, 16 tests on net11.0 | | null clause flipped, is not null | killed, 1 test on net10.0 | | || -> && | killed, 16 tests on net11.0 | | null clause dropped, hashing!.Major | SURVIVED, all 39 on each passed | The one test on net10.0 is the exact pin: charging 32 where 24 is allocated is an overcharge, which every upper-bound check passes, and only the pin's equality sees it. The survivor is equivalent on CoreCLR: RuntimeAssembly.GetName sets Version from GetVersion, which always returns a new Version from the assembly's metadata (src/coreclr/System.Private.CoreLib/src/System/Reflection/ RuntimeAssembly.cs, GetName and GetVersion, the same at v10.0.14 and v11.0.0, read 2026-11-10), so typeof(Crc32).Assembly.GetName().Version is never null there. The clause stays as the conservative answer for a runtime whose GetName might leave it unset, which was not checked. The case the version is read for, measured by pointing the library's net10.0 reference at System.IO.Hashing 11.0.0 for one run (not committed), TestReadChargesAreUpperBounds on both frameworks: | cost chosen by | net10.0, 11.0.0 loaded | net11.0 | |--------------------------------|------------------------|---------| | the version loaded (this) | 39 of 39 pass | 39 / 39 | | the target framework, 24 or 32 | 16 fail, the pin with | 39 / 39 | | | "charged 24 bytes ... | | | | (System.IO.Hashing | | | | 11.0.0.0 loaded, on | | | | .NET 10.0.14)" | | Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK3MspnYsGe3E6AZW1Prra
… loaded The Unreleased entry "Every read is charged at least what it allocates" said a checksum's state is 24 bytes and is charged what it allocates. That is System.IO.Hashing 10's Crc32; 11.0.0's holds one field more and allocates 32, and the charge is now read from the version loaded (a8fb728). The entry says so in two places: the old small-object charge was 64 where the state is 24 with System.IO.Hashing 10, and the state is now charged what it allocates with the System.IO.Hashing loaded, 24 bytes with 10 and 32 with 11. The figures the entry gives as measured are left as they were. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK3MspnYsGe3E6AZW1Prra
Matt approved this change to CLAUDE.md for the .NET 11 PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK3MspnYsGe3E6AZW1Prra
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KK3MspqAcczxT45xCfLgyx
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.
Fixes #356.
The library now ships for .NET 10 and .NET 11 side by side:
net10.0;net11.0. That was Matt's choice ("Target both") once .NET 11.0.0 went GA on 2026-11-10. .NET 11 is STS and .NET 10 is LTS, and both end support on 2028-11-14, so keeping net10.0 costs .NET 10 users nothing.What changes
net10.0;net11.0.System.IO.Hashingis chosen by framework: 10.0.15 (the latest 10.0) for net10.0, 11.0.0 for net11.0. So .NET 10 users' dependencies don't change.Benchmarksstays onnet10.0. BenchmarkDotNet 0.15.8, the latest stable, can't run out of process on .NET 11; the project file says so.lib/net10.0andlib/net11.0.global.jsonmoves to 11.0.100, stilllatestFeature. SDK 11 builds net10.0 too.dotnet-version: 10.0.x), and run the suite for both frameworks on all five runners.LogFilePrefix, so each framework keeps its own.scripts/mutate.sh. It read only the last summary line, so with two frameworks, a mutant only one framework caught could be reported as surviving. Before the fix, 2 of 6 such mutants were misreported. It now reads every framework's summary and names where a mutant died.scripts/stryker-file.sh. It takes--framework, net10.0 by default, since Stryker otherwise picks one at random. Every recorded sweep ran on net10.0.dotnet restorebeforedotnet clean.Two runtime differences this surfaced
System.IO.Hashing11.0.0'sCrc32is 32 bytes, against 24 in 10.0.x.ParameterSetfield. It's the package that matters, not the runtime: the net10.0 build on runtime 11.0.0 still measures 24.TestReadChargesAreUpperBounds. Each large-form read was charged 8 bytes less than it allocated.PersistenceFormat.ChecksumStateCostis now chosen once, from theSystem.IO.Hashingversion actually loaded: 32 from major 11 on, 24 before, and 32 if the version can't be read.GetName()always sets a version. The table is ina8fb728's message..NET 11 moves macOS from the segments GC to regions (dotnet/runtime PR #125416).
NoGCRegion's remarks and TESTING.md now say so. ItsLargestcap is what segments give one region, so it holds on both.Verification
SDK 11.0.100, with runtimes 10.0.14 and 11.0.0. Clean build with
-warnaserror: exit 0, 0 warnings.9d7ad9d, on a loaded machineEvery failure was
TestAReadIsMeasuredExactlyWithABackgroundCollectionRunning's guard. It needs a background collection to overlap a large-formDpswSketchread, and none did: "counted 4,648,328 bytes at most with a background collection … and 4,648,328 quietly". It's filed as #357.Not done here
System.IO.Hashingreference to 11.x; its config is unchanged.🤖 Generated with Claude Code
https://claude.ai/code/session_01KK3MspnYsGe3E6AZW1Prra