Skip to content

THRIFT-6382: Add net11 support - #3963

Draft
Jens-G wants to merge 1 commit into
apache:masterfrom
Jens-G:THRIFT-6382
Draft

Jens-G wants to merge 1 commit into
apache:masterfrom
Jens-G:THRIFT-6382

Conversation

@Jens-G

@Jens-G Jens-G commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Adds net11 support to netstd, along the lines of THRIFT-5902 for net10. .NET 11 is due in November 2026. Its release candidates come with a go-live license: "Go-live releases are supported by Microsoft in production" (.NET support policy). RC1 came out on September 8 and RC2 on October 13. This PR stays a draft until .NET 11 is generally available.

  • The netstd generator gets a net11 option (C# 15). Code generated for net10 now stops with #error when built for net11, as net9 code does for net10.

  • ApacheThrift and ApacheThrift.AspNetCore add net11.0 to their target frameworks.

  • A new test project, Thrift.Compile.net11, is a copy of Thrift.Compile.net10 with the version names changed. Thrift.Compile.net8, net9 and net10 stay. Thrift.Tests now references net11, so make check builds net10 explicitly.

  • These move from net10 to net11:

    • the unit, integration and fuzz tests;
    • the test suite (test/netstd);
    • the tutorial (tutorial/netstd).
  • The benchmarks stay on net10 for now. BenchmarkDotNet 0.15.8, the current release, cannot run them on net11 (0.16.0 is in preview). THRIFT-6382 lists this as a follow-up.

  • CI: an older SDK cannot build the net11.0 target; 10.0.401 fails with NETSDK1045. The runners also build every codegen leg with their newest preinstalled SDK. So:

    • lib-netstd sets up 11.0.x;
    • each codegen leg installs 11.0.x next to its own SDK, and the matrix gains 11;
    • the MSVC image moves to sdk:11.0-windowsservercore-ltsc2025.

    actions/setup-dotnet hands 11.0.x to the install script as --channel 11.0, which resolves to the newest release candidate until GA, RC2 at the moment.

Not changed: the build/docker/ubuntu-* images install .NET from ppa:dotnet/backports, which has no .NET 11 yet. That, and rebuilding the hash-cached MSVC image once GA ships, are follow-ups listed on the ticket. Dropping net8 and net9 (end of support November 10, 2026) is THRIFT-6383.

Test, done locally with SDK 11.0.100-rc.1.26425.128:

  • Clean Release and Debug builds of lib/netstd, test/netstd and tutorial/netstd have no errors. The tutorial has no warnings. The other two show only the CS0114 warnings in generated exceptions that master has as well (THRIFT-4833).
  • Thrift.Tests passes 87/87 and Thrift.IntegrationTests 57/57 on net11.0. The 12 fuzzer variants build without warnings.
  • run-NetStd-Codegen-Tests.ps1 for net11, net10, net9 and net8 with SDK 11: 233/233 each. The environment turned every warning into an error except CS0114 and CS0108 (THRIFT-4833): TreatWarningsAsErrors=true, WarningsNotAsErrors=CS0114;CS0108. Master with SDK 10.0.401 passes the net10 leg the same way.

Repeated with SDK 11.0.100-rc.2.26504.105, on this branch merged onto master (a81db74):

  • The same builds, tests and fuzzer builds give the same results, with no new warnings.
  • The four codegen legs pass 239/239 each with the same settings. Master has six more IDL files than this branch's base.
  • The tutorial smoke test, which make check has run since THRIFT-6376, passes 7 of 7.

JIRA: THRIFT-6382

  • Apache Jira ticket: THRIFT-6382
  • PR title follows "THRIFT-NNNN: describe my issue"
  • Single commit
  • No breaking change to the library API. For generated code, see the net10 note above.
  • Code change, so the commit carries no CI-skip marker.

🤖 Generated with Claude Code

@Jens-G Jens-G self-assigned this Sep 27, 2026
@mergeable mergeable Bot added c# Pull requests that update C# code Pull requests that update .NET code compiler build and general CI cmake, automake and build system changes github_actions Pull requests that update GitHub Actions code labels Sep 27, 2026
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 net9 code does for net10.

The unit, integration and fuzz tests, 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 stay on net10 until a
BenchmarkDotNet release supports net11; 0.15.8 cannot run them there.

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.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build and general CI cmake, automake and build system changes c# Pull requests that update C# code Pull requests that update .NET code compiler github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant