Repository navigation
THRIFT-6383: Drop net8 and net9 support - #4168
Merged
Merged
Conversation
5 tasks done
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
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>
4 tasks done
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.
.NET 8 and .NET 9 reached the end of their support on November 10, 2026 (.NET support policy). This drops them from netstd:
ApacheThrifttargetsnetstandard2.0,netstandard2.1,net10.0andnet11.0, andApacheThrift.AspNetCoretargetsnet10.0andnet11.0.ApacheThrift.AspNetCoreno longer referencesMicrosoft.Extensions.Logging.Abstractionsitself. The ASP.NET Core shared framework provides it, and once no target belownet10.0is left, NuGet flags the reference with NU1510 ("This package is automatically available and does not need to be referenced explicitly").net8andnet9options: their parsing, their lines in the help text, and their branches of the target platform check that it writes into every file.--gen netstd:net8andnetstd:net9now stop with "unknown option netstd:net8" or "…net9".net10,net11and the default for .NET Standard stay. Code generated withnet8ornet9has to be generated again, withnet10,net11or without a version option.Thrift.Compile.net8andThrift.Compile.net9go, together with their entries inlib/netstd/Thrift.slnx,test/netstd/ThriftTest.slnx,lib/netstd/Makefile.am,build/veralign.shanddebian/copyright.lib-netstd-codegenkeeps its net10 and net11 legs, andrun-NetStd-Codegen-Tests.ps1lists net10 and net11.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.ps1expects thenet10.0folder now,build/windows/README.mdfollows, and the publish job ofdotnet-tool.ymlsets up the .NET 10 SDK instead of .NET 8.LANGUAGES.mdlists .NET Standard 2.x, net10 and net11.Left as they are, on purpose:
README.mdkeeps its advice for whenthriftasks for .NET 8. That is the published 0.25.0 tool package: it targets .NET 8 without roll-forward, which came with THRIFT-6440.build/dockerimages install no .NET 8 or 9 packages, so they need no change here.#if NET9_0_OR_GREATERinTTlsSocketTransport.csstill tells net10.0 apart from .NET Standard. The// net8remarks next to the pragmas name the SDK that brought the analyzer rule.configure.acstill accepts dotnet 7.0.0 and later, as before. Since THRIFT-6382: Add net11 support #3963, building needs SDK 11 fornet11.0anyway, 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.lockchange that master gained in between.#4065 (THRIFT-5830) changes
Thrift.Compile.net8andThrift.Compile.net9as 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:
--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.Before the rebase, on master 5d78ec1 with Microsoft's SDK 10.0.404, which
lib-netstdset up on master before #3963:compiler/cpp/tests/netstd/t_netstd_generator_options_tests.cc, built and run the waycmake.ymldoes. On master it fails: no exception fornet8. With this change all 42 test cases pass (538 assertions).--gen netstd:net8andnetstd:net9exit with 1 and "Error: unknown option netstd:net8" or "…net9".netstd:net10generates code as before.lib/netstd,test/netstdandtutorial/netstdhave no errors and no warnings. Without the change toThrift.AspNetCore.csproj, each of them shows NU1510.Thrift.Testspasses 221/221 andThrift.IntegrationTests57/57 on net10.0.run-NetStd-Codegen-Tests.ps1for net10 passes 251/251, with every warning an error (TreatWarningsAsErrors=true).lib-netstdjob pass in the build image:configure,make,make checkforlib/netstd,test/netstdandtutorial/netstd, andmake precross. The netstd-netstd cross test, run the waycross-testruns it, passes 5 of 5.build-dotnet-tool.ps1and checked withtest-dotnet-tool.ps1on Linux: 19 of 19 checks pass. The launcher sits intools/net10.0/any, and its runtimeconfig saysnet10.0androllForwardMajor. The package from master fails 8 of these checks, because the script now expects thenet10.0folder. The run on Windows is the.NET toolworkflow, which this PR starts.JIRA: THRIFT-6383
net8andnet9are gone, and the packages carry nonet8.0andnet9.0builds anymore. THRIFT-6383 has the Breaking-Change label.🤖 Generated with Claude Code