Skip to content

Commit 4a0875f

Browse files
authored
Merge pull request #18091 from michaelnebel/csharp/net9-3
C#: Bazel build should target .NET9 framework.
2 parents 80d466f + c6e936f commit 4a0875f

File tree

6 files changed

+30
-17
lines changed

6 files changed

+30
-17
lines changed

.github/workflows/csharp-qltest.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,22 @@ on:
55
paths:
66
- "csharp/**"
77
- "shared/**"
8+
- "misc/bazel/**"
89
- .github/actions/fetch-codeql/action.yml
910
- codeql-workspace.yml
11+
- "MODULE.bazel"
1012
branches:
1113
- main
1214
- "rc/*"
1315
pull_request:
1416
paths:
1517
- "csharp/**"
1618
- "shared/**"
19+
- "misc/bazel/**"
1720
- .github/workflows/csharp-qltest.yml
1821
- .github/actions/fetch-codeql/action.yml
1922
- codeql-workspace.yml
23+
- "MODULE.bazel"
2024
branches:
2125
- main
2226
- "rc/*"
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
| Assembly1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | no compilation |
22
| Locations, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | has compilation |
33
| System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | no compilation |
4-
| System.Console, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | no compilation |
4+
| System.Console, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | no compilation |
55
| System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | no compilation |
6-
| System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e | no compilation |
7-
| System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | no compilation |
8-
| System.Runtime.Extensions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | no compilation |
6+
| System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e | no compilation |
7+
| System.Runtime, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | no compilation |
8+
| System.Runtime.Extensions, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | no compilation |
99
| mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | no compilation |

csharp/ql/test/library-tests/frameworks/format/StringFormatItemParameter.expected

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
| Console | Write(string, ReadOnlySpan<object>) | arg |
12
| Console | Write(string, object) | arg0 |
23
| Console | Write(string, object, object) | arg0 |
34
| Console | Write(string, object, object) | arg1 |
45
| Console | Write(string, object, object, object) | arg0 |
56
| Console | Write(string, object, object, object) | arg1 |
67
| Console | Write(string, object, object, object) | arg2 |
78
| Console | Write(string, params Object[]) | arg |
9+
| Console | WriteLine(string, ReadOnlySpan<object>) | arg |
810
| Console | WriteLine(string, object) | arg0 |
911
| Console | WriteLine(string, object, object) | arg0 |
1012
| Console | WriteLine(string, object, object) | arg1 |
@@ -15,13 +17,15 @@
1517
| Debug | Assert(bool, string, string, params Object[]) | args |
1618
| Debug | Print(string, params Object[]) | args |
1719
| Debug | WriteLine(string, params Object[]) | args |
20+
| StringBuilder | AppendFormat(IFormatProvider, string, ReadOnlySpan<object>) | args |
1821
| StringBuilder | AppendFormat(IFormatProvider, string, object) | arg0 |
1922
| StringBuilder | AppendFormat(IFormatProvider, string, object, object) | arg0 |
2023
| StringBuilder | AppendFormat(IFormatProvider, string, object, object) | arg1 |
2124
| StringBuilder | AppendFormat(IFormatProvider, string, object, object, object) | arg0 |
2225
| StringBuilder | AppendFormat(IFormatProvider, string, object, object, object) | arg1 |
2326
| StringBuilder | AppendFormat(IFormatProvider, string, object, object, object) | arg2 |
2427
| StringBuilder | AppendFormat(IFormatProvider, string, params Object[]) | args |
28+
| StringBuilder | AppendFormat(string, ReadOnlySpan<object>) | args |
2529
| StringBuilder | AppendFormat(string, object) | arg0 |
2630
| StringBuilder | AppendFormat(string, object, object) | arg0 |
2731
| StringBuilder | AppendFormat(string, object, object) | arg1 |
@@ -30,27 +34,31 @@
3034
| StringBuilder | AppendFormat(string, object, object, object) | arg2 |
3135
| StringBuilder | AppendFormat(string, params Object[]) | args |
3236
| Strings | MyStringFormat(string, params Object[]) | args |
37+
| TextWriter | Write(string, ReadOnlySpan<object>) | arg |
3338
| TextWriter | Write(string, object) | arg0 |
3439
| TextWriter | Write(string, object, object) | arg0 |
3540
| TextWriter | Write(string, object, object) | arg1 |
3641
| TextWriter | Write(string, object, object, object) | arg0 |
3742
| TextWriter | Write(string, object, object, object) | arg1 |
3843
| TextWriter | Write(string, object, object, object) | arg2 |
3944
| TextWriter | Write(string, params Object[]) | arg |
45+
| TextWriter | WriteLine(string, ReadOnlySpan<object>) | arg |
4046
| TextWriter | WriteLine(string, object) | arg0 |
4147
| TextWriter | WriteLine(string, object, object) | arg0 |
4248
| TextWriter | WriteLine(string, object, object) | arg1 |
4349
| TextWriter | WriteLine(string, object, object, object) | arg0 |
4450
| TextWriter | WriteLine(string, object, object, object) | arg1 |
4551
| TextWriter | WriteLine(string, object, object, object) | arg2 |
4652
| TextWriter | WriteLine(string, params Object[]) | arg |
53+
| string | Format(IFormatProvider, string, ReadOnlySpan<object>) | args |
4754
| string | Format(IFormatProvider, string, object) | arg0 |
4855
| string | Format(IFormatProvider, string, object, object) | arg0 |
4956
| string | Format(IFormatProvider, string, object, object) | arg1 |
5057
| string | Format(IFormatProvider, string, object, object, object) | arg0 |
5158
| string | Format(IFormatProvider, string, object, object, object) | arg1 |
5259
| string | Format(IFormatProvider, string, object, object, object) | arg2 |
5360
| string | Format(IFormatProvider, string, params Object[]) | args |
61+
| string | Format(string, ReadOnlySpan<object>) | args |
5462
| string | Format(string, object) | arg0 |
5563
| string | Format(string, object, object) | arg0 |
5664
| string | Format(string, object, object) | arg1 |

csharp/ql/test/library-tests/generics/Generics.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ query predicate test26(ConstructedGeneric cg, string s) {
223223
}
224224

225225
query predicate test27(ConstructedType ct, UnboundGenericType ugt, UnboundGenericType sourceDecl) {
226+
ct.fromSource() and
226227
ct instanceof NestedType and
227228
ugt = ct.getUnboundGeneric() and
228229
sourceDecl = ct.getUnboundDeclaration() and
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
| NonPublicClass.cs:9:9:9:31 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 8.0.0.0 | neutral | source |
2-
| PublicClass.cs:9:9:9:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 8.0.0.0 | neutral | source |
3-
| PublicClass.cs:14:9:14:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 8.0.0.0 | neutral | source |
4-
| PublicClass.cs:19:9:19:51 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 8.0.0.0 | neutral | source |
5-
| PublicClass.cs:19:33:19:50 | call to method ReadLine | System | Console | ReadLine | () | true | System.Console | 8.0.0.0 | neutral | source |
6-
| PublicClass.cs:19:33:19:50 | call to method ReadLine | System | Console | ReadLine | () | true | System.Console | 8.0.0.0 | source | source |
7-
| PublicClass.cs:24:9:24:46 | call to method Write | System | Console | Write | (System.Object) | true | System.Console | 8.0.0.0 | neutral | source |
8-
| PublicClass.cs:30:9:30:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 8.0.0.0 | neutral | source |
9-
| PublicGenericClass.cs:9:9:9:30 | call to method WriteLine | System | Console | WriteLine | (System.Object) | true | System.Console | 8.0.0.0 | neutral | source |
10-
| PublicGenericClass.cs:14:9:14:30 | call to method WriteLine | System | Console | WriteLine | (System.Object) | true | System.Console | 8.0.0.0 | neutral | source |
11-
| PublicGenericInterface.cs:13:9:13:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 8.0.0.0 | neutral | source |
12-
| PublicInterface.cs:13:9:13:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 8.0.0.0 | neutral | source |
1+
| NonPublicClass.cs:9:9:9:31 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 9.0.0.0 | neutral | source |
2+
| PublicClass.cs:9:9:9:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 9.0.0.0 | neutral | source |
3+
| PublicClass.cs:14:9:14:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 9.0.0.0 | neutral | source |
4+
| PublicClass.cs:19:9:19:51 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 9.0.0.0 | neutral | source |
5+
| PublicClass.cs:19:33:19:50 | call to method ReadLine | System | Console | ReadLine | () | true | System.Console | 9.0.0.0 | neutral | source |
6+
| PublicClass.cs:19:33:19:50 | call to method ReadLine | System | Console | ReadLine | () | true | System.Console | 9.0.0.0 | source | source |
7+
| PublicClass.cs:24:9:24:46 | call to method Write | System | Console | Write | (System.Object) | true | System.Console | 9.0.0.0 | neutral | source |
8+
| PublicClass.cs:30:9:30:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 9.0.0.0 | neutral | source |
9+
| PublicGenericClass.cs:9:9:9:30 | call to method WriteLine | System | Console | WriteLine | (System.Object) | true | System.Console | 9.0.0.0 | neutral | source |
10+
| PublicGenericClass.cs:14:9:14:30 | call to method WriteLine | System | Console | WriteLine | (System.Object) | true | System.Console | 9.0.0.0 | neutral | source |
11+
| PublicGenericInterface.cs:13:9:13:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 9.0.0.0 | neutral | source |
12+
| PublicInterface.cs:13:9:13:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 9.0.0.0 | neutral | source |

misc/bazel/csharp.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ load("@rules_dotnet//dotnet:defs.bzl", "csharp_binary", "csharp_library", "cshar
22
load("@rules_pkg//pkg:mappings.bzl", "strip_prefix")
33
load("//misc/bazel:pkg.bzl", "codeql_pkg_files")
44

5-
TARGET_FRAMEWORK = "net8.0"
5+
TARGET_FRAMEWORK = "net9.0"
66

77
def _gen_assembly_info(name):
88
assembly_info_gen = name + "-assembly-info"

0 commit comments

Comments
 (0)