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
11 changes: 7 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ jobs:
- name: Set up .NET SDK
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: "10.0.x"
dotnet-version: "11.0.x"

- name: Show .NET SDKs
run: dotnet --list-sdks
Expand Down Expand Up @@ -578,17 +578,20 @@ jobs:
timeout-minutes: 60
strategy:
matrix:
dotnet-version: [8, 9, 10]
dotnet-version: [8, 9, 10, 11]
fail-fast: false
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

# The library also targets net11.0, which only the .NET 11 SDK can build
- name: Set up .NET SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: "${{ matrix.dotnet-version }}.0.x"
dotnet-version: |
${{ matrix.dotnet-version }}.0.x
11.0.x

- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
Expand Down Expand Up @@ -1723,7 +1726,7 @@ jobs:
- name: Set up .NET SDK
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: "10.0.x"
dotnet-version: "11.0.x"

- name: Configure apt retries and timeouts
run: sudo cp .github/apt/99-ci-network /etc/apt/apt.conf.d/
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</td>
<!-- Language Levels -------><td colspan=2>.NET Standard 2.x, net8, net9, 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: 1 addition & 1 deletion build/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Last updated: May 2, 2026
| java | 17 | | |
| js | | | Node.js 16.20.2, npm 8.19.4 |
| lua | 5.2.4 | | Lua 5.3: see THRIFT-4386 |
| netstd | 9.0 | 9.0 | |
| netstd | 11.0 | 11.0 | |
| nodejs | 16.20.2 | | |
| ocaml | 4.13.1 | | |
| perl | 5.34.0 | | |
Expand Down
2 changes: 1 addition & 1 deletion build/docker/msvc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# a Build Tools component below, for the C++/CLI test project.
# Keep the SDK major in step with the highest TargetFramework in lib/netstd:
# an older SDK cannot build a newer target.
FROM mcr.microsoft.com/dotnet/sdk:10.0-windowsservercore-ltsc2025
FROM mcr.microsoft.com/dotnet/sdk:11.0-windowsservercore-ltsc2025

# Restore the default Windows shell for correct batch processing below.
SHELL ["cmd", "/S", "/C"]
Expand Down
8 changes: 4 additions & 4 deletions build/docker/ubuntu-jammy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ ENV PATH=/usr/lib/dart/bin:$PATH
RUN add-apt-repository ppa:dotnet/backports
RUN apt-get install -y --no-install-recommends \
`# dotnet core dependencies` \
dotnet-sdk-10.0 \
dotnet-runtime-10.0 \
aspnetcore-runtime-10.0 \
dotnet-apphost-pack-10.0
dotnet-sdk-11.0 \
dotnet-runtime-11.0 \
aspnetcore-runtime-11.0 \
dotnet-apphost-pack-11.0

# Erlang dependencies
ARG ERLANG_OTP_VERSION=25.3.2.9
Expand Down
8 changes: 4 additions & 4 deletions build/docker/ubuntu-noble/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ ENV PATH=/usr/lib/dart/bin:$PATH
RUN add-apt-repository ppa:dotnet/backports
RUN apt-get install -y --no-install-recommends \
`# dotnet core dependencies` \
dotnet-sdk-10.0 \
dotnet-runtime-10.0 \
aspnetcore-runtime-10.0 \
dotnet-apphost-pack-10.0
dotnet-sdk-11.0 \
dotnet-runtime-11.0 \
aspnetcore-runtime-11.0 \
dotnet-apphost-pack-11.0

# Erlang dependencies
ARG ERLANG_OTP_VERSION=25.3.2.9
Expand Down
1 change: 1 addition & 0 deletions build/veralign.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ FILES[lib/js/src/thrift.js]=simpleReplace
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
Expand Down
11 changes: 9 additions & 2 deletions compiler/cpp/src/thrift/generate/t_netstd_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ t_netstd_generator::t_netstd_generator(t_program* program, const map<string, str
else if (iter->first.compare("no_deepcopy") == 0) {
suppress_deepcopy = true;
}
else if (iter->first.compare("net11") == 0) {
target_net_version = 11;
}
else if (iter->first.compare("net10") == 0) {
target_net_version = 10;
}
Expand Down Expand Up @@ -212,9 +215,12 @@ void t_netstd_generator::reset_indent() {

void t_netstd_generator::pragmas_and_directives(ostream& out)
{
if( target_net_version >= 10) {
if( target_net_version >= 11) {
out << "// targeting net 11" << '\n';
out << "#if( !NET11_0_OR_GREATER)" << '\n';
} else if( target_net_version >= 10) {
out << "// targeting net 10" << '\n';
out << "#if( !NET10_0_OR_GREATER)" << '\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';
Expand Down Expand Up @@ -4343,6 +4349,7 @@ THRIFT_REGISTER_GENERATOR(
" 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"
" async_postfix: Append \"Async\" to all service methods (maintains compatibility with existing code).\n"
)
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<Version>0.26.0</Version>
<LangVersion>latestMajor</LangVersion>
<TieredCompilation>false</TieredCompilation>
Expand All @@ -29,7 +29,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.15.8" />
<!-- A preview, because 0.15.8, the latest release, cannot run benchmarks on net11.0 out of
process: it stops with "GetRuntimeVersion not implemented for NotRecognized". Move to
0.16.0 once it is released (follow-up listed on THRIFT-6382). -->
<PackageReference Include="BenchmarkDotNet" Version="0.16.0-preview.2" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions lib/netstd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ all-local:
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
$(DOTNETCORE) test Tests/Thrift.IntegrationTests/Thrift.IntegrationTests.csproj
Expand Down Expand Up @@ -58,6 +59,10 @@ clean-local:
$(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
$(RM) -r Tests/Thrift.Compile.Tests/Thrift.Compile.net11/obj
$(RM) -r Tests/Thrift.Compile.Tests/Thrift.Compile.netstd2/bin
$(RM) -r Tests/Thrift.Compile.Tests/Thrift.Compile.netstd2/obj
$(RM) -r Tests/Thrift.FuzzTests/bin
Expand Down
4 changes: 2 additions & 2 deletions lib/netstd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ additionally requires the SharpFuzz.CommandLine global tool and the

## Prerequisites

1. A .NET 10 SDK (same one used for the rest of `lib/netstd`).
1. A .NET 11 SDK (same one used for the rest of `lib/netstd`).

2. The SharpFuzz IL-rewriter CLI, installed as a .NET global tool:

Expand All @@ -103,7 +103,7 @@ additionally requires the SharpFuzz.CommandLine global tool and the
## A temporary note on `DOTNET_ROLL_FORWARD`

As of SharpFuzz.CommandLine 2.2.0, the global tool's `runtimeconfig.json` pins the
tool to .NET 9, which prevents it from running under a .NET 10-only host. Both
tool to .NET 9, which prevents it from running under a .NET 11-only host. Both
`buildfuzzers.sh` and `runfuzzer.sh` therefore export `DOTNET_ROLL_FORWARD=Major`
at the top of the script as a workaround. Upstream fix:
[SharpFuzz PR #72](https://github.com/Metalnem/sharpfuzz/pull/72) (merged, pending
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// 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.

using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Thrift5253;

namespace Thrift.Compile.net11.Impl.Thrift5253
{
class MyServiceImpl : MyService.IAsync
{
public Task<AsyncProcessor> AsyncProcessor_(AsyncProcessor? input, CancellationToken cancellationToken = default)
{
return Task.FromResult(new AsyncProcessor() { Foo = input?.Foo ?? 0 });
}

public Task<BrokenResult> Broken(BrokenArgs? input, CancellationToken cancellationToken = default)
{
return Task.FromResult(new BrokenResult() { Foo = input?.Foo ?? 0 });
}

public Task<Client> Client_(Client? input, CancellationToken cancellationToken = default)
{
_ = cancellationToken;
return Task.FromResult(new Client() { Foo = input?.Foo ?? 0 });
}

public Task<IAsync> IAsync_(IAsync? input, CancellationToken cancellationToken = default)
{
return Task.FromResult(new IAsync() { Foo = input?.Foo ?? 0 });
}

public Task<InternalStructs> InternalStructs_(InternalStructs? input, CancellationToken cancellationToken = default)
{
return Task.FromResult(new InternalStructs() { Foo = input?.Foo ?? 0 });
}

public Task TestAsync(CancellationToken cancellationToken = default)
{
return Task.CompletedTask;
}

public Task TestXsync(CancellationToken cancellationToken = default)
{
return Task.CompletedTask;
}

public Task<WorksRslt> Works(WorksArrrgs? input, CancellationToken cancellationToken = default)
{
return Task.FromResult(new WorksRslt() { Foo = input?.Foo ?? 0 });
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// 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.

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.

[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("The Apache Software Foundation")]
[assembly: AssemblyProduct("Thrift")]
[assembly: AssemblyCopyright("The Apache Software Foundation")]
[assembly: AssemblyTrademark("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.

[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM

[assembly: Guid("1b468b7a-a53b-46de-90da-5f9ad7707ef4")]
Loading
Loading