Skip to content

Commit 47f574c

Browse files
authored
Update to .NET 10, C# 14 & update copyright year to 2026 (#1269)
* Update to .NET 10 and C# 14 Signed-off-by: AnErrupTion <anerruption@disroot.org> * Fix compilation issue .NET 10 introduces a way to get the compiler-backed field in a property, which is called "field", but some code was conflicting with this addition due to a field being named "field". Signed-off-by: AnErrupTion <anerruption@disroot.org> * Update copyright year to 2026 Signed-off-by: AnErrupTion <anerruption@disroot.org> --------- Signed-off-by: AnErrupTion <anerruption@disroot.org>
1 parent d8d8231 commit 47f574c

File tree

18 files changed

+192
-179
lines changed

18 files changed

+192
-179
lines changed

.github/workflows/builds.yml

Lines changed: 52 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: Builds
33
on:
44
push:
55
paths-ignore:
6-
- 'Source/Docs/**'
6+
- "Source/Docs/**"
77
pull_request:
88
paths-ignore:
9-
- 'Source/Docs/**'
9+
- "Source/Docs/**"
1010

1111
permissions:
1212
contents: write
@@ -15,18 +15,17 @@ env:
1515
BUILD_VERSION: 2.6.0.${{ github.run_number }}
1616

1717
jobs:
18-
1918
windows-build:
2019
name: Windows Build
2120
runs-on: windows-latest
2221
timeout-minutes: 15
2322
env:
2423
NUGET_ENABLE_LEGACY_CSPROJ_PACK: true
2524
steps:
26-
- name: Set net9.0
25+
- name: Set net10.0
2726
uses: actions/setup-dotnet@v4
2827
with:
29-
dotnet-version: '9.0.x'
28+
dotnet-version: "9.0.x"
3029
- name: View Build Version
3130
run: echo ${{ env.BUILD_VERSION }}
3231
- name: View Github Info
@@ -45,7 +44,7 @@ jobs:
4544
run: dotnet build Source/Mosa.sln /p:Version=${{ env.BUILD_VERSION }}
4645
- name: Unit Test
4746
run: dotnet test Source/Mosa.sln
48-
- name: Cleanup
47+
- name: Cleanup
4948
run: cmd.exe /C "rmdir /s /q bin\reko bin\cs bin\de bin\es bin\fr bin\it bin\ja bin\ko bin\pl bin\pt-BR bin\ru bin\tr bin\zh-Hans bin\zh-Hant"
5049
- name: Store Build Artifact
5150
uses: actions/upload-artifact@v4
@@ -75,17 +74,28 @@ jobs:
7574

7675
windows-build-packaging:
7776
name: Build Windows Packaging
78-
needs: [windows-build, linux-build, macos-build, windows-unit-testing, linux-unit-testing, macos-unit-testing, windows-demo-testing, linux-demo-testing, macos-demo-testing]
77+
needs:
78+
[
79+
windows-build,
80+
linux-build,
81+
macos-build,
82+
windows-unit-testing,
83+
linux-unit-testing,
84+
macos-unit-testing,
85+
windows-demo-testing,
86+
linux-demo-testing,
87+
macos-demo-testing,
88+
]
7989
runs-on: windows-latest
8090
timeout-minutes: 15
8191
if: github.event_name == 'push' && github.repository == 'mosa/MOSA-Project' && github.ref == 'refs/heads/master'
8292
env:
8393
NUGET_ENABLE_LEGACY_CSPROJ_PACK: true
8494
steps:
85-
- name: Set net9.0
95+
- name: Set net10.0
8696
uses: actions/setup-dotnet@v4
8797
with:
88-
dotnet-version: '9.0.x'
98+
dotnet-version: "9.0.x"
8999
- name: View Build Version
90100
run: echo ${{ env.BUILD_VERSION }}
91101
- name: View Github Info
@@ -117,10 +127,10 @@ jobs:
117127
runs-on: ubuntu-latest
118128
timeout-minutes: 15
119129
steps:
120-
- name: Set net9.0
130+
- name: Set net10.0
121131
uses: actions/setup-dotnet@v4
122132
with:
123-
dotnet-version: '9.0.x'
133+
dotnet-version: "9.0.x"
124134
- name: View Build Version
125135
run: echo ${{ env.BUILD_VERSION }}
126136
- name: View Github Info
@@ -141,16 +151,16 @@ jobs:
141151
name: linux-build-artifact
142152
path: bin
143153
compression-level: 9
144-
154+
145155
macos-build:
146156
name: MacOS Build
147157
runs-on: macos-26
148158
timeout-minutes: 15
149159
steps:
150-
- name: Set net9.0
160+
- name: Set net10.0
151161
uses: actions/setup-dotnet@v4
152162
with:
153-
dotnet-version: '9.0.x'
163+
dotnet-version: "9.0.x"
154164
- name: View Build Version
155165
run: echo ${{ env.BUILD_VERSION }}
156166
- name: View Github Info
@@ -175,7 +185,7 @@ jobs:
175185
windows-unit-testing:
176186
strategy:
177187
matrix:
178-
optimization: [0,1,2,3,4,5,6,7,8,9]
188+
optimization: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
179189
fail-fast: false
180190
name: Windows - Unit Test -o${{ matrix.optimization }}
181191
runs-on: windows-latest
@@ -205,17 +215,17 @@ jobs:
205215
linux-unit-testing:
206216
strategy:
207217
matrix:
208-
optimization: [0,1,2,3,4,5,6,7,8,9]
218+
optimization: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
209219
fail-fast: false
210220
name: Linux - Unit Test -o${{ matrix.optimization }}
211221
runs-on: ubuntu-latest
212222
timeout-minutes: 15
213223
needs: linux-build
214224
steps:
215-
- name: Set net9.0
225+
- name: Set net10.0
216226
uses: actions/setup-dotnet@v4
217227
with:
218-
dotnet-version: '9.0.x'
228+
dotnet-version: "9.0.x"
219229
- name: Checkout
220230
uses: actions/checkout@v4
221231
with:
@@ -239,21 +249,21 @@ jobs:
239249
name: counters-linux-unittests-o${{ matrix.optimization }}
240250
path: artifact
241251
retention-days: 2
242-
252+
243253
macos-unit-testing:
244254
strategy:
245255
matrix:
246-
optimization: [0,1,2,3,4,5,6,7,8,9]
256+
optimization: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
247257
fail-fast: false
248258
name: MacOS - Unit Test -o${{ matrix.optimization }}
249259
runs-on: macos-26
250260
timeout-minutes: 15
251261
needs: macos-build
252262
steps:
253-
- name: Set net9.0
263+
- name: Set net10.0
254264
uses: actions/setup-dotnet@v4
255265
with:
256-
dotnet-version: '9.0.x'
266+
dotnet-version: "9.0.x"
257267
- name: Checkout
258268
uses: actions/checkout@v4
259269
with:
@@ -267,7 +277,7 @@ jobs:
267277
run: brew install qemu
268278
- name: Make Artifact Folder
269279
run: mkdir artifact
270-
- name: Unit Test
280+
- name: Unit Test
271281
run: dotnet bin/Mosa.Utility.UnitTests.dll -check -o${{ matrix.optimization }} -counters artifact/counters-macos-unittests-o${{ matrix.optimization }}.txt
272282
- name: Store Counter Artifact
273283
uses: actions/upload-artifact@v4
@@ -279,7 +289,7 @@ jobs:
279289
windows-demo-testing:
280290
strategy:
281291
matrix:
282-
optimization: [0,1,2,3,4,5,6,7,8,9]
292+
optimization: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
283293
fail-fast: false
284294
name: Windows - Demo Test -o${{ matrix.optimization }}
285295
runs-on: windows-latest
@@ -307,17 +317,17 @@ jobs:
307317
linux-demo-testing:
308318
strategy:
309319
matrix:
310-
optimization: [0,1,2,3,4,5,6,7,8,9]
320+
optimization: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
311321
fail-fast: false
312322
name: Linux - Demo Test -o${{ matrix.optimization }}
313323
runs-on: ubuntu-latest
314324
timeout-minutes: 15
315325
needs: linux-build
316326
steps:
317-
- name: Set net9.0
327+
- name: Set net10.0
318328
uses: actions/setup-dotnet@v4
319329
with:
320-
dotnet-version: '9.0.x'
330+
dotnet-version: "9.0.x"
321331
- name: Checkout
322332
uses: actions/checkout@v4
323333
with:
@@ -343,17 +353,17 @@ jobs:
343353
macos-demo-testing:
344354
strategy:
345355
matrix:
346-
optimization: [0,1,2,3,4,5,6,7,8,9]
356+
optimization: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
347357
fail-fast: false
348358
name: MacOS - Demo Test -o${{ matrix.optimization }}
349359
runs-on: macos-26
350360
timeout-minutes: 15
351361
needs: macos-build
352362
steps:
353-
- name: Set net9.0
363+
- name: Set net10.0
354364
uses: actions/setup-dotnet@v4
355365
with:
356-
dotnet-version: '9.0.x'
366+
dotnet-version: "9.0.x"
357367
- name: Checkout
358368
uses: actions/checkout@v4
359369
with:
@@ -380,10 +390,10 @@ jobs:
380390
timeout-minutes: 15
381391
needs: linux-build
382392
steps:
383-
- name: Set net9.0
393+
- name: Set net10.0
384394
uses: actions/setup-dotnet@v4
385395
with:
386-
dotnet-version: '9.0.x'
396+
dotnet-version: "9.0.x"
387397
- name: Checkout
388398
uses: actions/checkout@v4
389399
with:
@@ -420,10 +430,10 @@ jobs:
420430
timeout-minutes: 15
421431
needs: linux-build
422432
steps:
423-
- name: Set net9.0
433+
- name: Set net10.0
424434
uses: actions/setup-dotnet@v4
425435
with:
426-
dotnet-version: '9.0.x'
436+
dotnet-version: "9.0.x"
427437
- name: Checkout
428438
uses: actions/checkout@v4
429439
with:
@@ -455,15 +465,14 @@ jobs:
455465
run: dotnet bin/Mosa.Tool.Launcher.Console.dll bin/Mosa.BareMetal.TestWorld.ARM32.dll -arm32 -o9 -check -autolaunch-off -output-counters
456466

457467
merge-artifacts:
458-
name: Merge Artifacts
459-
runs-on: ubuntu-latest
460-
needs: [windows-unit-testing, linux-unit-testing, macos-unit-testing]
461-
timeout-minutes: 15
462-
steps:
468+
name: Merge Artifacts
469+
runs-on: ubuntu-latest
470+
needs: [windows-unit-testing, linux-unit-testing, macos-unit-testing]
471+
timeout-minutes: 15
472+
steps:
463473
- name: Merge Artifacts
464474
uses: actions/upload-artifact/merge@v4
465475
with:
466-
name: counters-unit-tests
467-
pattern: counters-*
468-
compression-level: 9
469-
476+
name: counters-unit-tests
477+
pattern: counters-*
478+
compression-level: 9

LICENSE.txt

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
Copyright (c) 2025, MOSA-Project
1+
Copyright (c) 2026, MOSA-Project
22
All rights reserved.
33

4-
Redistribution and use in source and binary forms,
5-
with or without modification, are permitted provided
4+
Redistribution and use in source and binary forms,
5+
with or without modification, are permitted provided
66
that the following conditions are met:
77

88
* Redistributions of source code must retain the
9-
above copyright notice, this list of conditions
9+
above copyright notice, this list of conditions
1010
and the following disclaimer.
1111

12-
* Redistributions in binary form must reproduce the
13-
above copyright notice, this list of conditions and
14-
the following disclaimer in the documentation and/or
12+
* Redistributions in binary form must reproduce the
13+
above copyright notice, this list of conditions and
14+
the following disclaimer in the documentation and/or
1515
other materials provided with the distribution.
1616

17-
* Neither the name of Managed Operating System Alliance (MOSA)
18-
nor the names of its contributors may be used to endorse
19-
or promote products derived from this software without
17+
* Neither the name of Managed Operating System Alliance (MOSA)
18+
nor the names of its contributors may be used to endorse
19+
or promote products derived from this software without
2020
specific prior written permission.
2121

22-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
22+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
2323
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
24-
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
25-
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24+
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
25+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2626
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
27-
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28-
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29-
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
30-
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27+
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
30+
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3232
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
33-
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
33+
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
3434
OF SUCH DAMAGE.

Source/Directory.Build.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33

44
<PropertyGroup>
55
<OutputPath>../../bin</OutputPath>
6-
<TargetFramework>net9.0</TargetFramework>
6+
<TargetFramework>net10.0</TargetFramework>
77
<RollForward>major</RollForward>
8-
<LangVersion>13.0</LangVersion>
8+
<LangVersion>14.0</LangVersion>
99
<Nullable>disable</Nullable>
1010
<ImplicitUsings>enable</ImplicitUsings>
1111
<!-- <WarningsAsErrors>nullable</WarningsAsErrors>-->
1212
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
1313
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
1414
<CodeAnalysisRuleSet>../Common.ruleset</CodeAnalysisRuleSet>
1515
<Company>MOSA Project</Company>
16-
<Copyright>Copyright © MOSA Project 2025</Copyright>
16+
<Copyright>Copyright © MOSA Project 2026</Copyright>
1717
<AssemblyVersion>2.6.1.0</AssemblyVersion>
1818
</PropertyGroup>
1919

0 commit comments

Comments
 (0)