Skip to content

Commit 80cd768

Browse files
committed
Update ci to net8.0
1 parent 46cbc97 commit 80cd768

File tree

12 files changed

+51
-37
lines changed

12 files changed

+51
-37
lines changed

.github/workflows/code.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@ jobs:
1515

1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919
with:
2020
submodules: true
2121
fetch-depth: 0
2222

23-
- name: Install .NET 7.0
24-
uses: actions/setup-dotnet@v3
23+
- name: Install .NET 7.0 and 8.0
24+
uses: actions/setup-dotnet@v4
2525
with:
2626
dotnet-version: |
27-
7.0.x
27+
7.0
28+
8.0
2829
2930
- name: Build, Test, Pack, Publish
3031
shell: bash

src/Consolus.Tests/ConsoleTextTests.cs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.IO;
2-
using NUnit.Framework;
32

43
namespace Consolus.Tests
54
{

src/Consolus.Tests/Consolus.Tests.csproj

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="nunit" Version="3.13.3" />
9+
<PackageReference Include="nunit" Version="4.0.1" />
1010
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
11-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
11+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
12+
13+
<Using Include="NUnit.Framework" />
14+
<Using Include="NUnit.Framework.Legacy.ClassicAssert" Alias="Assert" />
15+
<Using Include="NUnit.Framework.Legacy.CollectionAssert" Alias="CollectionAssert" />
16+
<Using Include="NUnit.Framework.Legacy.StringAssert" Alias="StringAssert" />
17+
<Using Include="NUnit.Framework.Legacy.DirectoryAssert" Alias="DirectoryAssert" />
18+
<Using Include="NUnit.Framework.Legacy.FileAssert" Alias="FileAssert" />
1219
</ItemGroup>
1320

1421
<ItemGroup>

src/Kalk.CodeGen/Kalk.CodeGen.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net7.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
88

99
<ItemGroup>
1010
<PackageReference Include="Broslyn" Version="1.2.0" />
11-
<PackageReference Include="Microsoft.Build.Locator" Version="1.6.1" />
12-
<PackageReference Include="Scriban" Version="5.9.0" />
13-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.7.0" />
11+
<PackageReference Include="Microsoft.Build.Locator" Version="1.7.1" />
12+
<PackageReference Include="Scriban" Version="5.9.1" />
13+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" />
1414
</ItemGroup>
1515

1616
<ItemGroup>

src/Kalk.Core/Kalk.Core.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
</ItemGroup>
1818

1919
<ItemGroup>
20-
<PackageReference Include="CsvHelper" Version="30.0.1" />
20+
<PackageReference Include="CsvHelper" Version="31.0.0" />
2121
<PackageReference Include="MathNet.Numerics" Version="5.0.0" />
2222
<PackageReference Include="System.Runtime.Numerics" Version="4.3.0" />
23-
<PackageReference Include="System.Text.Encoding.CodePages" Version="7.0.0" />
24-
<PackageReference Include="Scriban" Version="5.9.0" />
23+
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
24+
<PackageReference Include="Scriban" Version="5.9.1" />
2525
</ItemGroup>
2626

2727
<ItemGroup>

src/Kalk.Core/Model/KalkComplex.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public override string ToString()
167167

168168
public Span<byte> AsSpan()
169169
{
170-
return MemoryMarshal.CreateSpan(ref Unsafe.As<KalkComplex, byte>(ref Unsafe.AsRef(this)), Unsafe.SizeOf<KalkComplex>());
170+
return MemoryMarshal.CreateSpan(ref Unsafe.As<KalkComplex, byte>(ref Unsafe.AsRef(in this)), Unsafe.SizeOf<KalkComplex>());
171171
}
172172

173173
public bool TryConvertTo(TemplateContext context, SourceSpan span, Type type, out object value)

src/Kalk.Core/Model/KalkHalf.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public void Display(KalkEngine engine, KalkDisplayMode mode)
122122

123123
private void DisplayDetailed(KalkEngine engine)
124124
{
125-
var u16 = Unsafe.As<Half, ushort>(ref Unsafe.AsRef(_value));
125+
var u16 = Unsafe.As<Half, ushort>(ref Unsafe.AsRef(in _value));
126126
engine.WriteHighlightLine($" # IEEE 754 - half float - 16-bit");
127127
engine.WriteHighlightLine($" #");
128128
engine.WriteInt16(u16, true);
@@ -156,7 +156,7 @@ public string ToString(string? format, IFormatProvider? formatProvider)
156156

157157
public Span<byte> AsSpan()
158158
{
159-
return MemoryMarshal.CreateSpan(ref Unsafe.As<KalkHalf, byte>(ref Unsafe.AsRef(this)), Unsafe.SizeOf<KalkHalf>());
159+
return MemoryMarshal.CreateSpan(ref Unsafe.As<KalkHalf, byte>(ref Unsafe.AsRef(in this)), Unsafe.SizeOf<KalkHalf>());
160160
}
161161

162162
public bool TryConvertTo(TemplateContext context, SourceSpan span, Type type, out object value)

src/Kalk.Core/Model/KalkNativeBuffer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public KalkNativeBuffer(byte[] buffer)
6464
public static KalkNativeBuffer AsBytes<T>(int byteCount, in T element)
6565
{
6666
var buffer = new KalkNativeBuffer(byteCount);
67-
Unsafe.CopyBlockUnaligned(ref buffer.AsSpan()[0], ref Unsafe.As<T, byte>(ref Unsafe.AsRef(element)), (uint)byteCount);
67+
Unsafe.CopyBlockUnaligned(ref buffer.AsSpan()[0], ref Unsafe.As<T, byte>(ref Unsafe.AsRef(in element)), (uint)byteCount);
6868
return buffer;
6969
}
7070

src/Kalk.Core/Modules/MiscModule.cs

+8-8
Original file line numberDiff line numberDiff line change
@@ -1511,7 +1511,7 @@ private static string HexaFromBytes<T>(int byteCount, in T element, bool prefix,
15111511
for (int i = 0; i < byteCount; i++)
15121512
{
15131513
if (i > 0) builder.Append(separator);
1514-
var v = Unsafe.As<T, byte>(ref Unsafe.AddByteOffset(ref Unsafe.AsRef(element), new IntPtr(i)));
1514+
var v = Unsafe.As<T, byte>(ref Unsafe.AddByteOffset(ref Unsafe.AsRef(in element), new IntPtr(i)));
15151515
if (prefix && (i % 1) == 0) builder.Append("0x");
15161516
builder.Append(v.ToString("X2"));
15171517
}
@@ -1521,7 +1521,7 @@ private static string HexaFromBytes<T>(int byteCount, in T element, bool prefix,
15211521
for (int i = 0; i < byteCount; i += 2)
15221522
{
15231523
if (i > 0) builder.Append(separator);
1524-
var v = Unsafe.As<T, short>(ref Unsafe.AddByteOffset(ref Unsafe.AsRef(element), new IntPtr(i)));
1524+
var v = Unsafe.As<T, short>(ref Unsafe.AddByteOffset(ref Unsafe.AsRef(in element), new IntPtr(i)));
15251525
if (prefix && (i % 2) == 0) builder.Append("0x");
15261526
builder.Append(v.ToString("X2"));
15271527
}
@@ -1531,7 +1531,7 @@ private static string HexaFromBytes<T>(int byteCount, in T element, bool prefix,
15311531
for (int i = 0; i < byteCount; i += 4)
15321532
{
15331533
if (i > 0) builder.Append(separator);
1534-
var v = Unsafe.As<T, int>(ref Unsafe.AddByteOffset(ref Unsafe.AsRef(element), new IntPtr(i)));
1534+
var v = Unsafe.As<T, int>(ref Unsafe.AddByteOffset(ref Unsafe.AsRef(in element), new IntPtr(i)));
15351535
if (prefix && (i % 4) == 0) builder.Append("0x");
15361536
builder.Append(v.ToString("X2"));
15371537
}
@@ -1541,7 +1541,7 @@ private static string HexaFromBytes<T>(int byteCount, in T element, bool prefix,
15411541
for (int i = 0; i < byteCount; i += 8)
15421542
{
15431543
if (i > 0) builder.Append(separator);
1544-
var v = Unsafe.As<T, long>(ref Unsafe.AddByteOffset(ref Unsafe.AsRef(element), new IntPtr(i)));
1544+
var v = Unsafe.As<T, long>(ref Unsafe.AddByteOffset(ref Unsafe.AsRef(in element), new IntPtr(i)));
15451545
if (prefix && (i % 8) == 0) builder.Append("0x");
15461546
builder.Append(v.ToString("X2"));
15471547
}
@@ -1762,7 +1762,7 @@ private static string BinaryFromBytes<T>(int byteCount, in T element, bool prefi
17621762
for (int i = 0; i < byteCount; i++)
17631763
{
17641764
if (i > 0) builder.Append(separator);
1765-
var b = Unsafe.As<T, byte>(ref Unsafe.AddByteOffset(ref Unsafe.AsRef(element), new IntPtr(i)));
1765+
var b = Unsafe.As<T, byte>(ref Unsafe.AddByteOffset(ref Unsafe.AsRef(in element), new IntPtr(i)));
17661766
if (prefix) builder.Append("0b");
17671767
AppendBinary(builder, b);
17681768
}
@@ -1772,7 +1772,7 @@ private static string BinaryFromBytes<T>(int byteCount, in T element, bool prefi
17721772
for (int i = 0; i < byteCount; i += 2)
17731773
{
17741774
if (i > 0) builder.Append(separator);
1775-
var v = Unsafe.As<T, short>(ref Unsafe.AddByteOffset(ref Unsafe.AsRef(element), new IntPtr(i)));
1775+
var v = Unsafe.As<T, short>(ref Unsafe.AddByteOffset(ref Unsafe.AsRef(in element), new IntPtr(i)));
17761776
if (prefix) builder.Append("0b");
17771777
AppendBinary(builder, v);
17781778
}
@@ -1782,7 +1782,7 @@ private static string BinaryFromBytes<T>(int byteCount, in T element, bool prefi
17821782
for (int i = 0; i < byteCount; i += 4)
17831783
{
17841784
if (i > 0) builder.Append(separator);
1785-
var v = Unsafe.As<T, int>(ref Unsafe.AddByteOffset(ref Unsafe.AsRef(element), new IntPtr(i)));
1785+
var v = Unsafe.As<T, int>(ref Unsafe.AddByteOffset(ref Unsafe.AsRef(in element), new IntPtr(i)));
17861786
if (prefix) builder.Append("0b");
17871787
AppendBinary(builder, v);
17881788
}
@@ -1792,7 +1792,7 @@ private static string BinaryFromBytes<T>(int byteCount, in T element, bool prefi
17921792
for (int i = 0; i < byteCount; i += 8)
17931793
{
17941794
if (i > 0) builder.Append(separator);
1795-
var v = Unsafe.As<T, long>(ref Unsafe.AddByteOffset(ref Unsafe.AsRef(element), new IntPtr(i)));
1795+
var v = Unsafe.As<T, long>(ref Unsafe.AddByteOffset(ref Unsafe.AsRef(in element), new IntPtr(i)));
17961796
if (prefix) builder.Append("0b");
17971797
AppendBinary(builder, v);
17981798
}

src/Kalk.IntrinsicsGen/Kalk.IntrinsicsGen.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net7.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<LangVersion>8.0</LangVersion>
77
<IsPackable>false</IsPackable>
88
</PropertyGroup>
99

1010
<ItemGroup>
1111
<PackageReference Include="Broslyn" Version="1.2.0" />
12-
<PackageReference Include="Microsoft.Build.Locator" Version="1.6.1" />
13-
<PackageReference Include="Scriban" Version="5.9.0" />
14-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.7.0" />
12+
<PackageReference Include="Microsoft.Build.Locator" Version="1.7.1" />
13+
<PackageReference Include="Scriban" Version="5.9.1" />
14+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" />
1515
</ItemGroup>
1616

1717
<ItemGroup>

src/Kalk.Tests/Kalk.Tests.csproj

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

@@ -16,9 +16,16 @@
1616
</ItemGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="nunit" Version="3.13.3" />
19+
<PackageReference Include="nunit" Version="4.0.1" />
2020
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
21-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
21+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
22+
23+
<Using Include="NUnit.Framework" />
24+
<Using Include="NUnit.Framework.Legacy.ClassicAssert" Alias="Assert" />
25+
<Using Include="NUnit.Framework.Legacy.CollectionAssert" Alias="CollectionAssert" />
26+
<Using Include="NUnit.Framework.Legacy.StringAssert" Alias="StringAssert" />
27+
<Using Include="NUnit.Framework.Legacy.DirectoryAssert" Alias="DirectoryAssert" />
28+
<Using Include="NUnit.Framework.Legacy.FileAssert" Alias="FileAssert" />
2229
</ItemGroup>
2330

2431
<ItemGroup>

src/global.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "7.0.100",
3+
"version": "8.0.100",
44
"rollForward": "latestMinor",
55
"allowPrerelease": false
66
}

0 commit comments

Comments
 (0)