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
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
if: matrix.jdk == 17 && runner.os != 'macOS'
uses: actions/setup-dotnet@v6
with:
dotnet-version: '8.0.x'
dotnet-version: '10.0.x'

- name: Set up Node for the TypeScript targets
if: matrix.jdk == 17 && runner.os != 'macOS'
Expand Down
2 changes: 1 addition & 1 deletion conformance/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Native C# conformance

Run the C# suite from the repository root with the Gradle wrapper and a .NET
SDK that can build and run .NET 8.
SDK that can build and run .NET 10.

```shell
./gradlew :vmf:verifyCSharpConformance
Expand Down
2 changes: 1 addition & 1 deletion conformance/csharp/Vmf.CSharp.Conformance.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down
20 changes: 2 additions & 18 deletions conformance/csharp/packages.lock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"dependencies": {
"net8.0": {
"net10.0": {
"Microsoft.NET.Test.Sdk": {
"type": "Direct",
"requested": "[17.14.1, )",
Expand Down Expand Up @@ -37,10 +37,7 @@
"Microsoft.TestPlatform.ObjectModel": {
"type": "Transitive",
"resolved": "17.14.1",
"contentHash": "xTP1W6Mi6SWmuxd3a+jj9G9UoC850WGwZUps1Wah9r1ZxgXhdJfj1QqDLJkFjHDCvN42qDL2Ps5KjQYWUU0zcQ==",
"dependencies": {
"System.Reflection.Metadata": "8.0.0"
}
"contentHash": "xTP1W6Mi6SWmuxd3a+jj9G9UoC850WGwZUps1Wah9r1ZxgXhdJfj1QqDLJkFjHDCvN42qDL2Ps5KjQYWUU0zcQ=="
},
"Microsoft.TestPlatform.TestHost": {
"type": "Transitive",
Expand All @@ -56,19 +53,6 @@
"resolved": "13.0.3",
"contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"System.Collections.Immutable": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg=="
},
"System.Reflection.Metadata": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "ptvgrFh7PvWI8bcVqG5rsA/weWM09EnthFHR5SCnS6IN+P4mj6rE1lBDC4U8HL9/57htKAqy4KQ3bBj84cfYyQ==",
"dependencies": {
"System.Collections.Immutable": "8.0.0"
}
},
"xunit.abstractions": {
"type": "Transitive",
"resolved": "2.0.3",
Expand Down
2 changes: 1 addition & 1 deletion conformance/portable/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ conformance/portable/

```
./gradlew :vmf:runPortableJava # Java
./gradlew :vmf:runPortableCSharp # C# (.NET 8)
./gradlew :vmf:runPortableCSharp # C# (.NET 10)
./gradlew :vmf:runPortableTypeScript # TypeScript (Node.js 22 or newer)
./gradlew :vmf:verifyPortableContract # all three
./gradlew :vmf:runPortableJava -PportableFilter=containment/ # only matching scenario ids
Expand Down
2 changes: 1 addition & 1 deletion conformance/portable/csharp/PortableRunner.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down
2 changes: 1 addition & 1 deletion csharp-runtime/ModelReflection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ internal ModelProperty(ModelReflectionRegistry.ModelBinding model, ModelReflecti
public bool IsContainer => property.Field.InverseType is not null;
public bool IsContainment => property.Snapshot?.IsContainment == true;
public bool IsReference => property.Snapshot?.IsReference == true;
public bool IsCollection => property.Snapshot is { } field && (field.IsCollection || field.IsMap);
public bool IsCollection => property.Snapshot is { } snapshot && (snapshot.IsCollection || snapshot.IsMap);
public bool IsOrdered => property.Field.Ordered;
public bool IsUnique => property.Field.Unique;
public int LowerBound => property.Field.LowerBound;
Expand Down
2 changes: 1 addition & 1 deletion csharp-runtime/Vmf.Runtime.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
Expand Down
2 changes: 1 addition & 1 deletion csharp-runtime/packages.lock.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"dependencies": {
"net8.0": {
"net10.0": {
"YamlDotNet": {
"type": "Direct",
"requested": "[18.1.0, )",
Expand Down
2 changes: 1 addition & 1 deletion docs/targets/csharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ sourceFiles...)` does the same. Each model namespace becomes one `Model.g.cs`: `
becomes the namespace `Eu.Mihosoft.Vmf.Portable.Tree` in `Eu/Mihosoft/Vmf/Portable/Tree/Model.g.cs`. Each
namespace has a static `ModelSnapshot` class for documents, reflection and copies.

Generated code targets .NET 8 and depends on the `Vmf.Runtime` library (`csharp-runtime/`).
Generated code targets .NET 10 and depends on the `Vmf.Runtime` library (`csharp-runtime/`).
`./gradlew :vmf:packCSharpRuntime` packs it as `core/build/target-runtimes/Vmf.Runtime.<version>.nupkg`; it is
not published to nuget.org yet.

Expand Down
4 changes: 2 additions & 2 deletions examples/csharp-workshop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The example generates all three targets from [Workshop and Station](src/main/vmf
[Catalog](src/main/vmf/eu/mihosoft/vmf/example/workshops/vmfmodel/Catalog.java),
and [ExternalInventory](src/main/vmf/eu/mihosoft/vmf/example/workshops/vmfmodel/ExternalInventory.java).
Use the repository Gradle wrapper with the VMF Java toolchains, a .NET SDK
that can build and run .NET 8, and Node.js 20 or newer with npm. The TypeScript
that can build and run .NET 10, and Node.js 20 or newer with npm. The TypeScript
check installs the compiler from its lockfile. The TypeScript runtime has no
runtime package dependencies.

Expand Down Expand Up @@ -84,7 +84,7 @@ The generator CLI accepts the target, output directory, and Java source paths.

The TypeScript files import the [local runtime package](../../typescript-runtime)
as `@vmf/runtime`. The [example package](typescript/package.json) shows how to
link it. Compile the C# output into a .NET 8 project that references
link it. Compile the C# output into a .NET 10 project that references
[csharp-runtime/Vmf.Runtime.csproj](../../csharp-runtime/Vmf.Runtime.csproj).

Generated Java and C# files are under `build/generated` in this example.
Expand Down
2 changes: 1 addition & 1 deletion examples/csharp-workshop/WorkshopSmoke.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<DefaultItemExcludes>$(DefaultItemExcludes);build/**</DefaultItemExcludes>
Expand Down
2 changes: 1 addition & 1 deletion test-suite/PERFORMANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The tasks above measure the Java runtime. The C# and the TypeScript runtime have
| Reports in `build/reports/performance` | `<mode>.json` | `csharp/<mode>.json` | `typescript/<mode>.json` |
| Cases in `test-suite/src/performance` | `java/perf/ModelScenarios.java` | `csharp/ModelScenarios.cs` | `typescript/model-scenarios.ts` |

`performanceBaselineAllTargets`, `performanceTestAllTargets` and `performanceReportAllTargets` run the three lanes one after the other. The C# lane needs the .NET 8 SDK, the TypeScript lane Node.js with npm. The C# worker runs with workstation garbage collection and four processors, as the Java lane limits its JVMs; the TypeScript worker runs with Node's defaults. A baseline records the version of the language runtime and is rejected on another one.
`performanceBaselineAllTargets`, `performanceTestAllTargets` and `performanceReportAllTargets` run the three lanes one after the other. The C# lane needs the .NET 10 SDK, the TypeScript lane Node.js with npm. The C# worker runs with workstation garbage collection and four processors, as the Java lane limits its JVMs; the TypeScript worker runs with Node's defaults. A baseline records the version of the language runtime and is rejected on another one.

A case has the same name, graph and operation count in every lane that has it, so the lanes can be read side by side. The lanes differ where the languages do:

Expand Down
2 changes: 1 addition & 1 deletion test-suite/performance.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def buildPerformanceCSharp = tasks.register('buildPerformanceCSharp', Exec) {
}
// Four processors and workstation garbage collection, as the Java lane limits its JVMs.
performanceLane('CSharp', 'csharp',
['dotnet', new File(csharpLane, 'bin/Release/net8.0/VmfPerformance.dll').absolutePath],
['dotnet', new File(csharpLane, 'bin/Release/net10.0/VmfPerformance.dll').absolutePath],
[DOTNET_PROCESSOR_COUNT: '4', DOTNET_gcServer: '0'], buildPerformanceCSharp)

def typescriptLane = file("${performanceDir}/typescript")
Expand Down
2 changes: 1 addition & 1 deletion test-suite/src/performance/csharp/VmfPerformance.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down
Loading