Repository navigation
THRIFT-6382: Add net11 support - #3963
Merged
Merged
Conversation
4 tasks done
4 tasks done
Client: netstd ApacheThrift and ApacheThrift.AspNetCore also target net11.0 now, and the netstd generator gets a net11 option. Code generated for net10 now refuses to build for net11, as the code for each older version does for the next one. The unit, integration and fuzz tests, the benchmarks, the test suite and the tutorial move from net10 to net11. The new Thrift.Compile.net11 project joins the per-version ones, and Thrift.Compile.net10 stays, so make check now builds it explicitly. The benchmarks need BenchmarkDotNet 0.16.0-preview.2: 0.15.8, the latest release, cannot run them on net11 out of process. Older SDKs cannot build the net11.0 target. The lib-netstd job and the MSVC image therefore use the .NET 11 SDK, and each codegen leg installs it next to its own SDK. The codegen matrix gains net11. The cross-test job starts the netstd test client and server, now net11.0, with `dotnet run`, so it moves to the .NET 11 SDK as well. The ubuntu-jammy and ubuntu-noble build images install .NET 11 from ppa:dotnet/backports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 tasks done
Jens-G
marked this pull request as ready for review
November 11, 2026 09:04
Jens-G
added a commit
to birschick-bq/thrift
that referenced
this pull request
Nov 11, 2026
Client: netstd Brings the branch onto master 000cdb7, which now has apache#3963 (THRIFT-6382, net11) and apache#4168 (THRIFT-6383, net8 and net9 dropped). Conflicts, resolved this way: - Thrift.Compile.net8 and Thrift.Compile.net9 are gone on master, and their isolated lines go with them. Thrift.Compile.net11 gets the same three lines for IsolatedCall.thrift, IsolatedExceptionName.thrift and IsolatedNames.thrift that Thrift.Compile.net10 has, with net11. Thrift.Tests builds against Thrift.Compile.net11 now, and its new tests use the types generated from these files. - tutorial/netstd/Interfaces/Interfaces.csproj keeps master's net11 and adds the isolated option. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Adds net11 support to netstd, along the lines of THRIFT-5902 for net10. .NET 11 has been generally available since November 10, 2026 (SDK 11.0.100, runtime 11.0.0).
net11option (C# 15). Code generated fornet10now stops with#errorwhen built for net11, as the code for each older version does for the next one.ApacheThriftandApacheThrift.AspNetCoreaddnet11.0to their target frameworks.Thrift.Compile.net11, is a copy ofThrift.Compile.net10with the version names changed. The other per-version projects stay.Thrift.Testsnow referencesnet11, somake checkbuildsnet10explicitly.test/netstd);tutorial/netstd).net11.0target; 10.0.401 fails with NETSDK1045. The runners also build every codegen leg with their newest preinstalled SDK. So:lib-netstdsets up11.0.x;11.0.xnext to its own SDK, and the matrix gains 11;sdk:11.0-windowsservercore-ltsc2025;cross-test, which runs the netstd test client and server since THRIFT-5140, needs the .NET 11 runtime for thenet11.0build innetstd-precross, so it sets up11.0.xas well.build/docker/ubuntu-jammyandubuntu-nobleimages install the .NET 11 packages fromppa:dotnet/backports, which has carried them for both since GA.build/docker/README.mdfollows.The earlier version of this PR turned the SDK's telemetry off in
cross-test. With RC3, telemetry made everydotnet run2 s or more slower, and the netstd clients ran into their 10 s. That setting is gone again: with 11.0.100, telemetry costs about 0.1 s per run, and the cross test passes with it on, see below.Dropping net8 and net9 (end of support November 10, 2026) is THRIFT-6383, in #4168. Both PRs change the same lines: the target framework lists, the generator's version chain, the codegen matrix and the project lists. So whichever of them is merged second needs a rebase. I have prepared that rebase for both orders. Both give the same tree, and that tree is tested, see the end of the tests below.
Test, done locally with SDK 11.0.100 on this branch, rebased onto master (5d78ec1):
lib/netstd,test/netstdandtutorial/netstdhave no errors and no warnings.Thrift.Testspasses 221/221 andThrift.IntegrationTests57/57 on net11.0.run-NetStd-Codegen-Tests.ps1for net11, net10, net9 and net8 passes 251/251 each, with every warning an error (TreatWarningsAsErrors=true).lib-netstdjob pass in the build image, with the SDK's telemetry on as in CI:configure("Using dotnet version 11.0.100"),make,make checkforlib/netstd,test/netstdandtutorial/netstd, andmake precross.cross-testruns it (the--helpwarm-up,--retry-count 5 --skip-known-failures, 4 tests at a time): all 5 pass with telemetry on, json in 7.4 s and the others in 2.9 to 3.2 s. WithDOTNET_CLI_TELEMETRY_OPTOUT=1they take 7.1 s and 2.7 to 3.0 s.ubuntu-jammyandubuntu-noble, an image of its base and its .NET step, copied from the Dockerfile, installs SDK 11.0.100 and runtime 11.0.0 from the PPA and no older runtime. In it,Thrift.Testspasses 221/221 andThrift.IntegrationTests57/57, theThrift.Compileprojects build, and so dolib/netstd,test/netstdandtutorial/netstd, without warnings.--inProcess. 0.16.0-preview.2 builds without warnings and runs out of process (--job Dry).sdk:11.0-windowsservercore-ltsc2025andsdk:11.0.100-windowsservercore-ltsc2025, so the MSVC job builds with 11.0.100.--gen netstd:net8andnetstd:net9stop with "unknown option", andnet10andnet11generate code;lib/netstd,test/netstdandtutorial/netstdhave no errors and no warnings;Thrift.Testspasses 221/221 andThrift.IntegrationTests57/57 on net11.0;lib-netstdjob and the netstd-netstd cross test (5 of 5) pass in the build image.The RC1, RC2 and RC3 rounds are in the edit history of this description.
JIRA: THRIFT-6382
net10note above.🤖 Generated with Claude Code