Skip to content

THRIFT-6383: Drop net8 and net9 support - #4168

Merged
Jens-G merged 1 commit into
apache:masterfrom
Jens-G:THRIFT-6383
Nov 11, 2026
Merged

Jens-G merged 1 commit into
apache:masterfrom
Jens-G:THRIFT-6383

Conversation

@Jens-G

@Jens-G Jens-G commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

.NET 8 and .NET 9 reached the end of their support on November 10, 2026 (.NET support policy). This drops them from netstd:

  • ApacheThrift targets netstandard2.0, netstandard2.1, net10.0 and net11.0, and ApacheThrift.AspNetCore targets net10.0 and net11.0.
  • ApacheThrift.AspNetCore no longer references Microsoft.Extensions.Logging.Abstractions itself. The ASP.NET Core shared framework provides it, and once no target below net10.0 is left, NuGet flags the reference with NU1510 ("This package is automatically available and does not need to be referenced explicitly").
  • The netstd generator drops its net8 and net9 options: their parsing, their lines in the help text, and their branches of the target platform check that it writes into every file. --gen netstd:net8 and netstd:net9 now stop with "unknown option netstd:net8" or "…net9". net10, net11 and the default for .NET Standard stay. Code generated with net8 or net9 has to be generated again, with net10, net11 or without a version option.
  • The test projects Thrift.Compile.net8 and Thrift.Compile.net9 go, together with their entries in lib/netstd/Thrift.slnx, test/netstd/ThriftTest.slnx, lib/netstd/Makefile.am, build/veralign.sh and debian/copyright.
  • CI: lib-netstd-codegen keeps its net10 and net11 legs, and run-NetStd-Codegen-Tests.ps1 lists net10 and net11.
  • The .NET tool (build/windows/dotnet-tool) targets .NET 10, the oldest version still supported, instead of .NET 8. It still rolls forward to a newer major version. test-dotnet-tool.ps1 expects the net10.0 folder now, build/windows/README.md follows, and the publish job of dotnet-tool.yml sets up the .NET 10 SDK instead of .NET 8.
  • LANGUAGES.md lists .NET Standard 2.x, net10 and net11.

Left as they are, on purpose:

  • README.md keeps its advice for when thrift asks for .NET 8. That is the published 0.25.0 tool package: it targets .NET 8 without roll-forward, which came with THRIFT-6440.
  • The build/docker images install no .NET 8 or 9 packages, so they need no change here.
  • #if NET9_0_OR_GREATER in TTlsSocketTransport.cs still tells net10.0 apart from .NET Standard. The // net8 remarks next to the pragmas name the SDK that brought the analyzer rule.
  • configure.ac still accepts dotnet 7.0.0 and later, as before. Since THRIFT-6382: Add net11 support #3963, building needs SDK 11 for net11.0 anyway, and this change does not alter that.

This PR is rebased onto master now that #3963 (THRIFT-6382, net11) is merged. Both changed the same lines: the target framework lists, the generator's version chain, the codegen matrix and the project lists. The rebase keeps net10 and net11 in each of them. The rebased commit has the tree I had tested beforehand as the state after both PRs, plus the lib/rb/Gemfile.lock change that master gained in between.

#4065 (THRIFT-5830) changes Thrift.Compile.net8 and Thrift.Compile.net9 as well. Whichever of #4065 and this PR is merged later resolves that by deleting the two projects.

Test, done locally on that tree with SDK 11.0.100:

  • the compiler unit tests pass, 42 test cases;
  • --gen netstd:net8 and netstd:net9 stop with "unknown option", and net10 and net11 generate code;
  • clean Release and Debug builds of lib/netstd, test/netstd and tutorial/netstd have no errors and no warnings;
  • Thrift.Tests passes 221/221 and Thrift.IntegrationTests 57/57 on net11.0;
  • the net10 and net11 codegen legs pass 251/251 each, with every warning an error;
  • the steps of the lib-netstd job and the netstd-netstd cross test (5 of 5) pass in the build image.

Before the rebase, on master 5d78ec1 with Microsoft's SDK 10.0.404, which lib-netstd set up on master before #3963:

  • A new compiler unit test, compiler/cpp/tests/netstd/t_netstd_generator_options_tests.cc, built and run the way cmake.yml does. On master it fails: no exception for net8. With this change all 42 test cases pass (538 assertions).
  • The compiler built from this branch: --gen netstd:net8 and netstd:net9 exit with 1 and "Error: unknown option netstd:net8" or "…net9". netstd:net10 generates code as before.
  • Clean Release and Debug builds of lib/netstd, test/netstd and tutorial/netstd have no errors and no warnings. Without the change to Thrift.AspNetCore.csproj, each of them shows NU1510.
  • Thrift.Tests passes 221/221 and Thrift.IntegrationTests 57/57 on net10.0.
  • run-NetStd-Codegen-Tests.ps1 for net10 passes 251/251, with every warning an error (TreatWarningsAsErrors=true).
  • The steps of the lib-netstd job pass in the build image: configure, make, make check for lib/netstd, test/netstd and tutorial/netstd, and make precross. The netstd-netstd cross test, run the way cross-test runs it, passes 5 of 5.
  • The .NET tool, packed with build-dotnet-tool.ps1 and checked with test-dotnet-tool.ps1 on Linux: 19 of 19 checks pass. The launcher sits in tools/net10.0/any, and its runtimeconfig says net10.0 and rollForward Major. The package from master fails 8 of these checks, because the script now expects the net10.0 folder. The run on Windows is the .NET tool workflow, which this PR starts.

JIRA: THRIFT-6383

  • Apache Jira ticket: THRIFT-6383
  • PR title follows "THRIFT-NNNN: describe my issue"
  • Single commit
  • Breaking change, as intended: the generator options net8 and net9 are gone, and the packages carry no net8.0 and net9.0 builds anymore. THRIFT-6383 has the Breaking-Change label.
  • Code change, so the commit carries no CI-skip marker.

🤖 Generated with Claude Code

@Jens-G Jens-G self-assigned this Nov 11, 2026
@Jens-G Jens-G mentioned this pull request Nov 11, 2026
5 tasks done
@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 Nov 11, 2026
Client: netstd,build

.NET 8 and .NET 9 reached the end of their support on November 10,
2026. ApacheThrift now targets netstandard2.0, netstandard2.1, net10.0
and net11.0, and ApacheThrift.AspNetCore targets net10.0 and net11.0.
The latter no longer references Microsoft.Extensions.Logging.Abstractions
itself: the ASP.NET Core shared framework provides it, and without a
target below net10.0, NuGet flags the reference with NU1510.

The netstd generator drops its net8 and net9 options, so
`--gen netstd:net8` and `netstd:net9` now stop with "unknown option".
`net10`, `net11` and the default for .NET Standard stay. A new compiler
unit test checks both. The Thrift.Compile.net8 and Thrift.Compile.net9
test projects go, and so do the net8 and net9 legs of
lib-netstd-codegen.

The .NET tool now targets .NET 10, the oldest version still supported,
and still rolls forward to a newer one. Its publish job sets up the
.NET 10 SDK instead of .NET 8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jens-G
Jens-G merged commit dd704bf into apache:master Nov 11, 2026
99 of 100 checks passed
@Jens-G
Jens-G deleted the THRIFT-6383 branch November 11, 2026 17:17
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>
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