Skip to content
Draft
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/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.201
dotnet-version: 11.0.100

- name: Checkout repository
uses: actions/checkout@v5
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/csharp-qltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.201
dotnet-version: 11.0.100
- name: Extractor unit tests
run: |
dotnet tool restore
dotnet test -p:RuntimeFrameworkVersion=10.0.5 extractor/Semmle.Util.Tests
dotnet test -p:RuntimeFrameworkVersion=10.0.5 extractor/Semmle.Extraction.Tests
dotnet test -p:RuntimeFrameworkVersion=10.0.5 autobuilder/Semmle.Autobuild.CSharp.Tests
dotnet test -p:RuntimeFrameworkVersion=10.0.5 autobuilder/Semmle.Autobuild.Cpp.Tests
dotnet test -p:RuntimeFrameworkVersion=11.0.0 extractor/Semmle.Util.Tests
dotnet test -p:RuntimeFrameworkVersion=11.0.0 extractor/Semmle.Extraction.Tests
dotnet test -p:RuntimeFrameworkVersion=11.0.0 autobuilder/Semmle.Autobuild.CSharp.Tests
dotnet test -p:RuntimeFrameworkVersion=11.0.0 autobuilder/Semmle.Autobuild.Cpp.Tests
shell: bash
stubgentest:
runs-on: ubuntu-latest
Expand Down
16 changes: 14 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ bazel_dep(name = "nlohmann_json", version = "3.12.0.bcr.2", repo_name = "json")
bazel_dep(name = "fmt", version = "12.2.0.bcr.1-codeql.1")
bazel_dep(name = "rules_kotlin", version = "2.4.21-codeql.1")
bazel_dep(name = "gazelle", version = "0.54.0")
bazel_dep(name = "rules_dotnet", version = "0.22.2-codeql.1")
bazel_dep(name = "rules_dotnet")
bazel_dep(name = "googletest", version = "1.18.0.bcr.1")
bazel_dep(name = "rules_rust", version = "0.75.0")
bazel_dep(name = "rules_swift", version = "4.2.2-codeql.1")
Expand All @@ -37,6 +37,18 @@ bazel_dep(name = "zstd", version = "1.5.7.bcr.3")

bazel_dep(name = "buildifier_prebuilt", version = "10.1.0", dev_dependency = True)

# TODO: Cleanup our own codeql version of rules_dotnet.
# Remember that we need to delete the old patch.
git_override(
module_name = "rules_dotnet",
commit = "8db43484722080564c2abd04bc09f43f61bf6c65",
patch_strip = 1,
# Keep the patch in a separate package so it can load when the enclosing build
# marks misc/bazel as deleted.
patches = ["//misc/bazel/patches:rules_dotnet_nuget_archive.patch"],
remote = "https://github.com/bazel-contrib/rules_dotnet.git",
)

# Pin the compiler to support the Kotlin 1.8 and 1.9 language versions required by older extractors.
kotlin = use_extension("@rules_kotlin//src/main/starlark/core/repositories:bzlmod_setup.bzl", "rules_kotlin_extensions")
kotlin.kotlinc_version(
Expand Down Expand Up @@ -222,7 +234,7 @@ http_archive(
)

dotnet = use_extension("@rules_dotnet//dotnet:extensions.bzl", "dotnet")
dotnet.toolchain(dotnet_version = "10.0.201")
dotnet.toolchain(dotnet_version = "11.0.100")
use_repo(dotnet, "dotnet_toolchains")

register_toolchains("@dotnet_toolchains//:all")
Expand Down
2 changes: 1 addition & 1 deletion csharp/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"paket": {
"version": "10.3.1",
"version": "12.0.0",
"commands": [
"paket"
]
Expand Down
132 changes: 83 additions & 49 deletions csharp/.paket/Paket.Restore.targets

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion csharp/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
2 changes: 1 addition & 1 deletion csharp/actions/create-extractor-pack/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ runs:
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 10.0.201
dotnet-version: 11.0.100
- name: Build Extractor
shell: bash
run: scripts/create-extractor-pack.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public IList<string> GetNugetFeedsFromFolder(string folderPath)
}

// The version number should be kept in sync with the version .NET version used for building the application.
public const string LatestDotNetSdkVersion = "10.0.201";
public const string LatestDotNetSdkVersion = "11.0.100";

public static ReadOnlyDictionary<string, string> MinimalEnvironment => IDotNetCliInvoker.MinimalEnvironment;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<TargetFramework>net11.0</TargetFramework>
<AssemblyName>Semmle.Extraction.CSharp.DependencyStubGenerator</AssemblyName>
<RootNamespace>Semmle.Extraction.CSharp.DependencyStubGenerator</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
2 changes: 1 addition & 1 deletion csharp/paket.dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
framework: net10.0
framework: net11.0
storage: none
source https://api.nuget.org/v3/index.json
# behave like nuget in choosing transitive dependency versions
Expand Down
5 changes: 1 addition & 4 deletions csharp/paket.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion csharp/scripts/create-extractor-pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ mkdir -p extractor-pack
mkdir -p extractor-pack/tools/${platform}

function dotnet_publish {
dotnet publish --self-contained --configuration Release --runtime ${dotnet_platform} -p:RuntimeFrameworkVersion=10.0.5 $1 --output extractor-pack/tools/${platform}
dotnet publish --self-contained --configuration Release --runtime ${dotnet_platform} -p:RuntimeFrameworkVersion=11.0.0 $1 --output extractor-pack/tools/${platform}
}

dotnet tool restore
Expand Down
2 changes: 1 addition & 1 deletion csharp/scripts/gen-assembly-info.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def options():
[assembly: AssemblyCompany("GitHub")]
[assembly: AssemblyCopyright("Copyright © 2024 GitHub")]

[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v10.0", FrameworkDisplayName = ".NET 10.0")]
[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v11.0", FrameworkDisplayName = ".NET 11.0")]

"""
output_file.write_text(output_file_contents)
2 changes: 1 addition & 1 deletion misc/bazel/csharp.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ load("@rules_dotnet//dotnet:defs.bzl", "csharp_binary", "csharp_library", "cshar
load("@rules_pkg//pkg:mappings.bzl", "strip_prefix")
load("//misc/bazel:pkg.bzl", "codeql_pkg_files")

TARGET_FRAMEWORK = "net10.0"
TARGET_FRAMEWORK = "net11.0"

def _gen_assembly_info(name):
assembly_info_gen = name + "-assembly-info"
Expand Down
1 change: 1 addition & 0 deletions misc/bazel/patches/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
exports_files(["rules_dotnet_nuget_archive.patch"])
13 changes: 13 additions & 0 deletions misc/bazel/patches/rules_dotnet_nuget_archive.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--- a/dotnet/private/rules/nuget/nuget_archive.bzl
+++ b/dotnet/private/rules/nuget/nuget_archive.bzl
@@ -219,6 +219,9 @@ def _process_group_with_tfm(groups, group_name, file):
groups["unsupported_tfms"][folder] = True
return
-
+
+ if len(parts) > 3:
+ return
+
# Registered before the file is looked at, so that a `_._` placeholder still
# claims the framework: it says the package brings nothing for it, not that
# it does not support it.
Loading