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: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@
/csharp/paket.lock linguist-generated=true
# needs eol=crlf, as `paket` touches this file and saves it as crlf
/csharp/.paket/Paket.Restore.targets linguist-generated=true eol=crlf
/csharp/paket.main.bzl linguist-generated=true
/csharp/paket.main_extension.bzl linguist-generated=true

# swift prebuilt resources
/swift/third_party/resources/*.zip filter=lfs diff=lfs merge=lfs -text
Expand Down
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
23 changes: 19 additions & 4 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,17 @@ bazel_dep(name = "zstd", version = "1.5.7.bcr.3")

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

# Consider using a released version of rules_dotnet, when possible.
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,13 +233,17 @@ 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")

csharp_main_extension = use_extension("//csharp:paket.main_extension.bzl", "main_extension")
use_repo(csharp_main_extension, "paket.main")
paket = use_extension("@rules_dotnet//dotnet:paket.bzl", "paket")
paket.parse(
dependencies = "//csharp:paket.dependencies",
lock = "//csharp:paket.lock",
)
use_repo(paket, "paket.main")

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
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.

5 changes: 5 additions & 0 deletions csharp/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ load("//misc/bazel:pkg.bzl", "codeql_pack", "codeql_pkg_files_overlay")

package(default_visibility = ["//visibility:public"])

exports_files([
"paket.dependencies",
"paket.lock",
])

alias(
name = "dbscheme",
actual = "//csharp/ql/lib:dbscheme",
Expand Down
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.

Loading
Loading