Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ jobs:
timeout-minutes: 60
strategy:
matrix:
dotnet-version: [8, 9, 10, 11]
dotnet-version: [10, 11]
fail-fast: false
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ jobs:
- name: Set up .NET
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: "8.0"
dotnet-version: "10.0"

# Trusted publishing, as for PyPI in pypi.yml and crates.io in
# release_rust.yml: nuget.org hands back a short lived key in exchange
Expand Down
2 changes: 1 addition & 1 deletion LANGUAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ language; it is the effective minimum the project stands behind for that release
<td align=left><a href="https://github.com/apache/thrift/blob/master/lib/netstd/README.md">.NET</a></td>
<!-- Since -----------------><td>0.13.0</td>
<!-- Build Systems ---------><td><img src="/doc/images/cgrn.png" alt="Yes"/></td><td><img src="/doc/images/cred.png" alt=""/></td>
<!-- Language Levels -------><td colspan=2>.NET Standard 2.x, net8, net9, net10, net11</td>
<!-- Language Levels -------><td colspan=2>.NET Standard 2.x, net10, net11</td>
<!-- Field types -----------><td><img src="/doc/images/cgrn.png" alt="Yes"/></td>
<!-- Low-Level Transports --><td><img src="/doc/images/cred.png" alt=""/></td><td><img src="/doc/images/cred.png" alt=""/></td><td><img src="/doc/images/cgrn.png" alt="Yes"/></td><td><img src="/doc/images/cgrn.png" alt="Yes"/></td><td><img src="/doc/images/cgrn.png" alt="Yes"/></td><td><img src="/doc/images/cgrn.png" alt="Yes"/></td>
<!-- Transport Wrappers ----><td><img src="/doc/images/cgrn.png" alt="Yes"/></td><td><img src="/doc/images/cred.png" alt=""/></td><td><img src="/doc/images/cgrn.png" alt="Yes"/></td><td><img src="/doc/images/cred.png" alt=""/></td>
Expand Down
2 changes: 0 additions & 2 deletions build/veralign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ FILES[lib/lua/Thrift.lua]=simpleReplace
FILES[lib/netstd/Benchmarks/Thrift.Benchmarks/Thrift.Benchmarks.csproj]=simpleReplace
FILES[lib/netstd/Tests/Thrift.Compile.Tests/Thrift.Compile.net10/Thrift.Compile.net10.csproj]=simpleReplace
FILES[lib/netstd/Tests/Thrift.Compile.Tests/Thrift.Compile.net11/Thrift.Compile.net11.csproj]=simpleReplace
FILES[lib/netstd/Tests/Thrift.Compile.Tests/Thrift.Compile.net8/Thrift.Compile.net8.csproj]=simpleReplace
FILES[lib/netstd/Tests/Thrift.Compile.Tests/Thrift.Compile.net9/Thrift.Compile.net9.csproj]=simpleReplace
FILES[lib/netstd/Tests/Thrift.Compile.Tests/Thrift.Compile.netstd2/Thrift.Compile.netstd2.csproj]=simpleReplace
FILES[lib/netstd/Tests/Thrift.IntegrationTests/Thrift.IntegrationTests.csproj]=simpleReplace
FILES[lib/netstd/Tests/Thrift.Tests/Thrift.Tests.csproj]=simpleReplace
Expand Down
11 changes: 5 additions & 6 deletions build/windows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,12 @@ to it - arguments, the standard streams and the exit code all pass straight
through.

.NET 10 can declare a native executable as the entry point directly, with no
managed code, but a package built that way cannot be installed by the .NET 8 or
.NET 9 SDK at all, and the MSBuild properties involved are undocumented. The
managed code, but the MSBuild properties involved are undocumented. The
launcher costs one small assembly and works everywhere.

The launcher targets .NET 8 and rolls forward to a newer major version when
.NET 8 is not installed. Otherwise a machine with only .NET 9 or later would
install the tool and then refuse to start it, asking for .NET 8.
The launcher targets .NET 10 and rolls forward to a newer major version when
.NET 10 is not installed. Otherwise a machine with only .NET 11 or later would
install the tool and then refuse to start it, asking for .NET 10.

The package carries the Windows compiler only. NuGet installs a tool package on
any platform, so the launcher checks and reports that rather than failing to
Expand All @@ -212,7 +211,7 @@ the layout can be such that the tool installs but does not run. So the test
checks the package contents - including that `LICENSE` and `NOTICE` really are
in there and are not empty - and then proves the installed command works.
It also checks that the launcher may roll forward to a newer .NET, because
running the tool on a machine that has .NET 8 as well cannot show that.
running the tool on a machine that has .NET 10 as well cannot show that.

It runs anywhere PowerShell and the .NET SDK do. Off Windows it checks the
launcher's refusal instead of the compiler's output, which is the behaviour that
Expand Down
8 changes: 4 additions & 4 deletions build/windows/dotnet-tool/Apache.Thrift.Compiler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- The lowest SDK the tool has to install on. -->
<TargetFramework>net8.0</TargetFramework>
<!-- Run on a newer .NET when .NET 8 is not there. Without this, a machine
with only .NET 9 or later installs the tool and then refuses to start
it, asking for .NET 8. -->
<TargetFramework>net10.0</TargetFramework>
<!-- Run on a newer .NET when .NET 10 is not there. Without this, a machine
with only .NET 11 or later installs the tool and then refuses to start
it, asking for .NET 10. -->
<RollForward>Major</RollForward>
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
Expand Down
8 changes: 4 additions & 4 deletions build/windows/dotnet-tool/test-dotnet-tool.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ param(
$ErrorActionPreference = 'Stop'

$PackageId = 'Apache.Thrift.Compiler'
$Tfm = 'net8.0'
$Tfm = 'net10.0'

$failures = [System.Collections.Generic.List[string]]::new()
$passed = 0
Expand Down Expand Up @@ -156,9 +156,9 @@ try {
($settings -match "EntryPoint\s*=\s*`"$([regex]::Escape($PackageId)).dll`"") $settings

# The launcher targets the oldest .NET the tool has to install on. Unless it
# may roll forward to a newer major version, a machine with only .NET 9 or
# later installs the tool and then refuses to start it, asking for .NET 8.
# Runners that also have .NET 8 never show that, so check the setting.
# may roll forward to a newer major version, a machine with only .NET 11 or
# later installs the tool and then refuses to start it, asking for .NET 10.
# Runners that also have .NET 10 never show that, so check the setting.
$runtimeConfig = Read-Entry "$toolDir/$PackageId.runtimeconfig.json"
$rollForward = ''
if ($runtimeConfig) {
Expand Down
14 changes: 0 additions & 14 deletions compiler/cpp/src/thrift/generate/t_netstd_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ t_netstd_generator::t_netstd_generator(t_program* program, const map<string, str
else if (iter->first.compare("net10") == 0) {
target_net_version = 10;
}
else if (iter->first.compare("net9") == 0) {
target_net_version = 9;
}
else if (iter->first.compare("net8") == 0) {
target_net_version = 8;
}
else if (iter->first.compare("async_postfix") == 0) {
add_async_postfix = true;
}
Expand Down Expand Up @@ -221,12 +215,6 @@ void t_netstd_generator::pragmas_and_directives(ostream& out)
} else if( target_net_version >= 10) {
out << "// targeting net 10" << '\n';
out << "#if( NET11_0_OR_GREATER || !NET10_0_OR_GREATER)" << '\n';
} else if( target_net_version >= 9) {
out << "// targeting net 9" << '\n';
out << "#if( NET10_0_OR_GREATER || !NET9_0_OR_GREATER)" << '\n';
} else if( target_net_version >= 8) {
out << "// targeting net 8" << '\n';
out << "#if( NET9_0_OR_GREATER || !NET8_0_OR_GREATER)" << '\n';
} else {
out << "// targeting netstandard 2.x" << '\n';
out << "#if(! NETSTANDARD2_0_OR_GREATER)" << '\n';
Expand Down Expand Up @@ -4346,8 +4334,6 @@ THRIFT_REGISTER_GENERATOR(
" serial: Add serialization support to generated classes.\n"
" union: Use new union typing, which includes a static read function for union types.\n"
" pascal: Generate Pascal Case property names according to Microsoft naming convention.\n"
" net8: Enable features that require net8 and C# 12 or higher.\n"
" net9: Enable features that require net9 and C# 13 or higher.\n"
" net10: Enable features that require net10 and C# 14 or higher.\n"
" net11: Enable features that require net11 and C# 15 or higher.\n"
" no_deepcopy: Suppress generation of " + DEEP_COPY_METHOD_NAME + "() method.\n"
Expand Down
55 changes: 55 additions & 0 deletions compiler/cpp/tests/netstd/t_netstd_generator_options_tests.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Licensed to the Apache Software Foundation(ASF) under one
// or more contributor license agreements.See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

#include "../catch/catch.hpp"
#include <thrift/parse/t_program.h>
#include <thrift/generate/t_generator.h>
#include <thrift/generate/t_generator_registry.h>

#include <memory>
#include <string>

using std::string;

// The options are passed the way "--gen netstd:<option>" passes them.
static t_generator* make_netstd_generator(t_program* program, const string& option) {
return t_generator_registry::get_generator(program, "netstd:" + option);
}

// THRIFT-6383: .NET 8 and .NET 9 reached end of support, and the netstd generator dropped the
// options that targeted them
TEST_CASE("t_netstd_generator rejects the net8 and net9 options", "[initialization]")
{
std::unique_ptr<t_program> program(new t_program("test_netstd_options.thrift", "test_netstd_options"));

for (const string option : { "net8", "net9" }) {
std::unique_ptr<t_generator> gen;
REQUIRE_THROWS_WITH(gen.reset(make_netstd_generator(program.get(), option)),
"unknown option netstd:" + option);
}
}

TEST_CASE("t_netstd_generator accepts the net10 and net11 options", "[initialization]")
{
std::unique_ptr<t_program> program(new t_program("test_netstd_options.thrift", "test_netstd_options"));

for (const string option : { "net10", "net11" }) {
std::unique_ptr<t_generator> gen;
REQUIRE_NOTHROW(gen.reset(make_netstd_generator(program.get(), option)));
REQUIRE(gen != nullptr);
}
}
4 changes: 0 additions & 4 deletions debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ under the Apache 2.0 License:
lib/netstd/Thrift/Transport/TTransportFactory.cs
lib/netstd/Tests/Thrift.Compile.Tests/Thrift.Compile.netstd2/Properties/AssemblyInfo.cs
lib/netstd/Tests/Thrift.Compile.Tests/Thrift.Compile.netstd2/Thrift.Compile.netstd2.csproj
lib/netstd/Tests/Thrift.Compile.Tests/Thrift.Compile.net8/Properties/AssemblyInfo.cs
lib/netstd/Tests/Thrift.Compile.Tests/Thrift.Compile.net8/Thrift.Compile.net8.csproj
lib/netstd/Tests/Thrift.Compile.Tests/Thrift.Compile.net9/Properties/AssemblyInfo.cs
lib/netstd/Tests/Thrift.Compile.Tests/Thrift.Compile.net9/Thrift.Compile.net9.csproj
lib/st/README.md
lib/st/thrift.st
lib/cpp/test/OptionalRequiredTest.cpp
Expand Down
8 changes: 0 additions & 8 deletions lib/netstd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ all-local:
$(DOTNETCORE) build -c Release

check-local: precompile-fuzzers
$(DOTNETCORE) test Tests/Thrift.Compile.Tests/Thrift.Compile.net8/Thrift.Compile.net8.csproj
$(DOTNETCORE) test Tests/Thrift.Compile.Tests/Thrift.Compile.net9/Thrift.Compile.net9.csproj
$(DOTNETCORE) test Tests/Thrift.Compile.Tests/Thrift.Compile.net10/Thrift.Compile.net10.csproj
$(DOTNETCORE) test Tests/Thrift.Compile.Tests/Thrift.Compile.netstd2/Thrift.Compile.netstd2.csproj
$(DOTNETCORE) test Tests/Thrift.Tests/Thrift.Tests.csproj
Expand Down Expand Up @@ -55,10 +53,6 @@ clean-local:
$(RM) -r Tests/Thrift.Tests/obj
$(RM) -r Tests/Thrift.IntegrationTests/bin
$(RM) -r Tests/Thrift.IntegrationTests/obj
$(RM) -r Tests/Thrift.Compile.Tests/Thrift.Compile.net8/bin
$(RM) -r Tests/Thrift.Compile.Tests/Thrift.Compile.net8/obj
$(RM) -r Tests/Thrift.Compile.Tests/Thrift.Compile.net9/bin
$(RM) -r Tests/Thrift.Compile.Tests/Thrift.Compile.net9/obj
$(RM) -r Tests/Thrift.Compile.Tests/Thrift.Compile.net10/bin
$(RM) -r Tests/Thrift.Compile.Tests/Thrift.Compile.net10/obj
$(RM) -r Tests/Thrift.Compile.Tests/Thrift.Compile.net11/bin
Expand Down Expand Up @@ -87,8 +81,6 @@ EXTRA_DIST = \
Tests/Thrift.Compile.Tests \
Tests/Thrift.Compile.Tests/CassandraTest.thrift \
Tests/Thrift.Compile.Tests/optional_required_default.thrift \
Tests/Thrift.Compile.Tests/Thrift.Compile.net8/Thrift.Compile.net8.csproj \
Tests/Thrift.Compile.Tests/Thrift.Compile.net9/Thrift.Compile.net9.csproj \
Tests/Thrift.Compile.Tests/Thrift.Compile.netstd2/Thrift.Compile.netstd2.csproj \
Tests/Thrift.FuzzTests \
Tests/Thrift.Tests/Collections \
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading