Skip to content

Commit e755c50

Browse files
authored
Update to .Net 10.0 (#384)
* Add support for JetBrains Rider * Minor dotnet format cleanups * Update CSharpier to 1.2.6 * Update target framework to .NET 10 and packages to latest * Update to NUnit 4.4 * Update McMaster.Extensions.CommandLineUtils * Fix build on newer versions of cmake * Update CI GHA
1 parent 84be71d commit e755c50

File tree

176 files changed

+4137
-3967
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+4137
-3967
lines changed

.config/dotnet-tools.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
"isRoot": true,
44
"tools": {
55
"csharpier": {
6-
"version": "0.27.2",
6+
"version": "1.2.6",
77
"commands": [
8-
"dotnet-csharpier"
9-
]
8+
"csharpier"
9+
],
10+
"rollForward": false
1011
}
1112
}
1213
}

.csharpierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.config
2+
*.csproj
3+
*.props
4+
*.targets
5+
*.xml

.github/workflows/ci.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ jobs:
2626
cmake-args: "-A x64"
2727

2828
steps:
29-
- uses: actions/checkout@v4
30-
- uses: lukka/get-cmake@v3.31.6
29+
- uses: actions/checkout@v6
30+
- uses: lukka/get-cmake@v4.2.3
3131

3232
- name: Setup .NET
33-
uses: actions/setup-dotnet@v4
33+
uses: actions/setup-dotnet@v5
3434
with:
3535
dotnet-version: |
36-
8.0.x
36+
10.0.x
3737
3838
- name: Restore dotnet tools
3939
run: dotnet tool restore
@@ -51,21 +51,21 @@ jobs:
5151
cmake --build ${{ github.workspace }}/src/sentencepiece4c/build --config Release --target sentencepiece4c
5252
5353
- name: Upload sentencepiece4c artifact
54-
uses: actions/upload-artifact@v4
54+
uses: actions/upload-artifact@v6
5555
with:
5656
name: ${{ matrix.sentencepiece4c-artifact }}
5757
path: ${{ github.workspace }}/src/sentencepiece4c/bin/${{ matrix.sentencepiece4c-dll }}
5858

5959
- name: Restore dependencies
6060
run: dotnet restore
6161
- name: Check formatting
62-
run: dotnet csharpier --check .
62+
run: dotnet csharpier check .
6363
- name: Build
6464
run: dotnet build --no-restore -c Release
6565
- name: Test
6666
run: dotnet test --verbosity normal --collect:"Xplat Code Coverage"
6767
- name: Upload coverage reports to Codecov
68-
uses: codecov/codecov-action@v4
68+
uses: codecov/codecov-action@v5
6969
env:
7070
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
7171

@@ -75,20 +75,20 @@ jobs:
7575
runs-on: windows-latest
7676

7777
steps:
78-
- uses: actions/checkout@v4
78+
- uses: actions/checkout@v6
7979

8080
- name: Setup .NET
81-
uses: actions/setup-dotnet@v4
81+
uses: actions/setup-dotnet@v5
8282
with:
8383
dotnet-version: |
84-
8.0.x
84+
10.0.x
8585
86-
- uses: actions/download-artifact@v4
86+
- uses: actions/download-artifact@v7
8787
with:
8888
name: sp4c-linux-x64
8989
path: ${{ github.workspace }}/src/sentencepiece4c/bin
9090

91-
- uses: actions/download-artifact@v4
91+
- uses: actions/download-artifact@v7
9292
with:
9393
name: sp4c-win-x64
9494
path: ${{ github.workspace }}/src/sentencepiece4c/bin
@@ -105,7 +105,7 @@ jobs:
105105
dotnet pack src\SIL.Machine.Translation.TensorFlow\SIL.Machine.Translation.TensorFlow.csproj -c Release -o artifacts
106106
107107
- name: Upload package
108-
uses: actions/upload-artifact@v4
108+
uses: actions/upload-artifact@v6
109109
with:
110110
name: nuget-package
111111
path: artifacts/*.nupkg

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,4 @@ tests/SIL.Machine.Tests/Corpora/TestData/usfm/source/*
5454
tests/SIL.Machine.Tests/Corpora/TestData/usfm/target/*
5555
tests/SIL.Machine.Tests/Corpora/TestData/project/*
5656
tests/SIL.Machine.Tests/Corpora/TestData/pretranslations.json
57+
.idea

local_check.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
dotnet tool restore
33
dotnet restore
4-
dotnet csharpier --check .
4+
dotnet csharpier check .
55
if [ $? -ne 0 ]; then
66
exit 1
77
fi

src/SIL.Machine.Morphology.HermitCrab.Tool/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static int Main(string[] args)
3131
"continues when an error occurs while loading the configuration",
3232
value => quitOnError = value == null
3333
},
34-
{ "h|help", "show this help message and exit", value => showHelp = value != null }
34+
{ "h|help", "show this help message and exit", value => showHelp = value != null },
3535
};
3636

3737
try
@@ -91,7 +91,7 @@ public static int Main(string[] args)
9191
new ParseCommand(context),
9292
new TracingCommand(context),
9393
new TestCommand(context),
94-
new StatsCommand(context)
94+
new StatsCommand(context),
9595
};
9696

9797
string input;

src/SIL.Machine.Morphology.HermitCrab.Tool/SIL.Machine.Morphology.HermitCrab.Tool.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<RootNamespace>SIL.Machine.Morphology.HermitCrab</RootNamespace>
77
<PackAsTool>true</PackAsTool>
88
<ToolCommandName>hc</ToolCommandName>

src/SIL.Machine.Morphology.HermitCrab/AllomorphEnvironment.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Pattern<Word, ShapeNode> rightEnv
3838
Filter = ann =>
3939
ann.Type()
4040
.IsOneOf(HCFeatureSystem.Segment, HCFeatureSystem.Boundary, HCFeatureSystem.Anchor)
41-
&& !ann.IsDeleted()
41+
&& !ann.IsDeleted(),
4242
}
4343
);
4444
}
@@ -55,7 +55,7 @@ Pattern<Word, ShapeNode> rightEnv
5555
Filter = ann =>
5656
ann.Type()
5757
.IsOneOf(HCFeatureSystem.Segment, HCFeatureSystem.Boundary, HCFeatureSystem.Anchor)
58-
&& !ann.IsDeleted()
58+
&& !ann.IsDeleted(),
5959
}
6060
);
6161
}

src/SIL.Machine.Morphology.HermitCrab/CompileException.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
using System;
2-
using System.Collections.Generic;
3-
using System.Text;
42

53
namespace SIL.Machine.Morphology.HermitCrab
64
{

src/SIL.Machine.Morphology.HermitCrab/ConstraintType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
public enum ConstraintType
44
{
55
Require,
6-
Exclude
6+
Exclude,
77
}
88
}

0 commit comments

Comments
 (0)