Skip to content

Commit

Permalink
Merge pull request #18091 from michaelnebel/csharp/net9-3
Browse files Browse the repository at this point in the history
C#: Bazel build should target .NET9 framework.
  • Loading branch information
michaelnebel authored Dec 4, 2024
2 parents 80d466f + c6e936f commit 4a0875f
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 17 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/csharp-qltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,22 @@ on:
paths:
- "csharp/**"
- "shared/**"
- "misc/bazel/**"
- .github/actions/fetch-codeql/action.yml
- codeql-workspace.yml
- "MODULE.bazel"
branches:
- main
- "rc/*"
pull_request:
paths:
- "csharp/**"
- "shared/**"
- "misc/bazel/**"
- .github/workflows/csharp-qltest.yml
- .github/actions/fetch-codeql/action.yml
- codeql-workspace.yml
- "MODULE.bazel"
branches:
- main
- "rc/*"
Expand Down
8 changes: 4 additions & 4 deletions csharp/ql/test/library-tests/assemblies/compilation.expected
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
| Assembly1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | no compilation |
| Locations, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | has compilation |
| System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | no compilation |
| System.Console, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | no compilation |
| System.Console, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | no compilation |
| System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | no compilation |
| System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e | no compilation |
| System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | no compilation |
| System.Runtime.Extensions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | no compilation |
| System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e | no compilation |
| System.Runtime, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | no compilation |
| System.Runtime.Extensions, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | no compilation |
| mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | no compilation |
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
| Console | Write(string, ReadOnlySpan<object>) | arg |
| Console | Write(string, object) | arg0 |
| Console | Write(string, object, object) | arg0 |
| Console | Write(string, object, object) | arg1 |
| Console | Write(string, object, object, object) | arg0 |
| Console | Write(string, object, object, object) | arg1 |
| Console | Write(string, object, object, object) | arg2 |
| Console | Write(string, params Object[]) | arg |
| Console | WriteLine(string, ReadOnlySpan<object>) | arg |
| Console | WriteLine(string, object) | arg0 |
| Console | WriteLine(string, object, object) | arg0 |
| Console | WriteLine(string, object, object) | arg1 |
Expand All @@ -15,13 +17,15 @@
| Debug | Assert(bool, string, string, params Object[]) | args |
| Debug | Print(string, params Object[]) | args |
| Debug | WriteLine(string, params Object[]) | args |
| StringBuilder | AppendFormat(IFormatProvider, string, ReadOnlySpan<object>) | args |
| StringBuilder | AppendFormat(IFormatProvider, string, object) | arg0 |
| StringBuilder | AppendFormat(IFormatProvider, string, object, object) | arg0 |
| StringBuilder | AppendFormat(IFormatProvider, string, object, object) | arg1 |
| StringBuilder | AppendFormat(IFormatProvider, string, object, object, object) | arg0 |
| StringBuilder | AppendFormat(IFormatProvider, string, object, object, object) | arg1 |
| StringBuilder | AppendFormat(IFormatProvider, string, object, object, object) | arg2 |
| StringBuilder | AppendFormat(IFormatProvider, string, params Object[]) | args |
| StringBuilder | AppendFormat(string, ReadOnlySpan<object>) | args |
| StringBuilder | AppendFormat(string, object) | arg0 |
| StringBuilder | AppendFormat(string, object, object) | arg0 |
| StringBuilder | AppendFormat(string, object, object) | arg1 |
Expand All @@ -30,27 +34,31 @@
| StringBuilder | AppendFormat(string, object, object, object) | arg2 |
| StringBuilder | AppendFormat(string, params Object[]) | args |
| Strings | MyStringFormat(string, params Object[]) | args |
| TextWriter | Write(string, ReadOnlySpan<object>) | arg |
| TextWriter | Write(string, object) | arg0 |
| TextWriter | Write(string, object, object) | arg0 |
| TextWriter | Write(string, object, object) | arg1 |
| TextWriter | Write(string, object, object, object) | arg0 |
| TextWriter | Write(string, object, object, object) | arg1 |
| TextWriter | Write(string, object, object, object) | arg2 |
| TextWriter | Write(string, params Object[]) | arg |
| TextWriter | WriteLine(string, ReadOnlySpan<object>) | arg |
| TextWriter | WriteLine(string, object) | arg0 |
| TextWriter | WriteLine(string, object, object) | arg0 |
| TextWriter | WriteLine(string, object, object) | arg1 |
| TextWriter | WriteLine(string, object, object, object) | arg0 |
| TextWriter | WriteLine(string, object, object, object) | arg1 |
| TextWriter | WriteLine(string, object, object, object) | arg2 |
| TextWriter | WriteLine(string, params Object[]) | arg |
| string | Format(IFormatProvider, string, ReadOnlySpan<object>) | args |
| string | Format(IFormatProvider, string, object) | arg0 |
| string | Format(IFormatProvider, string, object, object) | arg0 |
| string | Format(IFormatProvider, string, object, object) | arg1 |
| string | Format(IFormatProvider, string, object, object, object) | arg0 |
| string | Format(IFormatProvider, string, object, object, object) | arg1 |
| string | Format(IFormatProvider, string, object, object, object) | arg2 |
| string | Format(IFormatProvider, string, params Object[]) | args |
| string | Format(string, ReadOnlySpan<object>) | args |
| string | Format(string, object) | arg0 |
| string | Format(string, object, object) | arg0 |
| string | Format(string, object, object) | arg1 |
Expand Down
1 change: 1 addition & 0 deletions csharp/ql/test/library-tests/generics/Generics.ql
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ query predicate test26(ConstructedGeneric cg, string s) {
}

query predicate test27(ConstructedType ct, UnboundGenericType ugt, UnboundGenericType sourceDecl) {
ct.fromSource() and
ct instanceof NestedType and
ugt = ct.getUnboundGeneric() and
sourceDecl = ct.getUnboundDeclaration() and
Expand Down
24 changes: 12 additions & 12 deletions csharp/ql/test/utils/modeleditor/ApplicationModeEndpoints.expected
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
| NonPublicClass.cs:9:9:9:31 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 8.0.0.0 | neutral | source |
| PublicClass.cs:9:9:9:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 8.0.0.0 | neutral | source |
| PublicClass.cs:14:9:14:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 8.0.0.0 | neutral | source |
| PublicClass.cs:19:9:19:51 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 8.0.0.0 | neutral | source |
| PublicClass.cs:19:33:19:50 | call to method ReadLine | System | Console | ReadLine | () | true | System.Console | 8.0.0.0 | neutral | source |
| PublicClass.cs:19:33:19:50 | call to method ReadLine | System | Console | ReadLine | () | true | System.Console | 8.0.0.0 | source | source |
| PublicClass.cs:24:9:24:46 | call to method Write | System | Console | Write | (System.Object) | true | System.Console | 8.0.0.0 | neutral | source |
| PublicClass.cs:30:9:30:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 8.0.0.0 | neutral | source |
| PublicGenericClass.cs:9:9:9:30 | call to method WriteLine | System | Console | WriteLine | (System.Object) | true | System.Console | 8.0.0.0 | neutral | source |
| PublicGenericClass.cs:14:9:14:30 | call to method WriteLine | System | Console | WriteLine | (System.Object) | true | System.Console | 8.0.0.0 | neutral | source |
| PublicGenericInterface.cs:13:9:13:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 8.0.0.0 | neutral | source |
| PublicInterface.cs:13:9:13:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 8.0.0.0 | neutral | source |
| NonPublicClass.cs:9:9:9:31 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 9.0.0.0 | neutral | source |
| PublicClass.cs:9:9:9:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 9.0.0.0 | neutral | source |
| PublicClass.cs:14:9:14:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 9.0.0.0 | neutral | source |
| PublicClass.cs:19:9:19:51 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 9.0.0.0 | neutral | source |
| PublicClass.cs:19:33:19:50 | call to method ReadLine | System | Console | ReadLine | () | true | System.Console | 9.0.0.0 | neutral | source |
| PublicClass.cs:19:33:19:50 | call to method ReadLine | System | Console | ReadLine | () | true | System.Console | 9.0.0.0 | source | source |
| PublicClass.cs:24:9:24:46 | call to method Write | System | Console | Write | (System.Object) | true | System.Console | 9.0.0.0 | neutral | source |
| PublicClass.cs:30:9:30:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 9.0.0.0 | neutral | source |
| PublicGenericClass.cs:9:9:9:30 | call to method WriteLine | System | Console | WriteLine | (System.Object) | true | System.Console | 9.0.0.0 | neutral | source |
| PublicGenericClass.cs:14:9:14:30 | call to method WriteLine | System | Console | WriteLine | (System.Object) | true | System.Console | 9.0.0.0 | neutral | source |
| PublicGenericInterface.cs:13:9:13:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 9.0.0.0 | neutral | source |
| PublicInterface.cs:13:9:13:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 9.0.0.0 | neutral | source |
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 = "net8.0"
TARGET_FRAMEWORK = "net9.0"

def _gen_assembly_info(name):
assembly_info_gen = name + "-assembly-info"
Expand Down

0 comments on commit 4a0875f

Please sign in to comment.