Skip to content

Commit 80616e3

Browse files
wallymathieurodriguestiago0gusty
authored
Upgrade tests and build to net7 except for Fable (net6) (#525)
Co-authored-by: Tiago Rodrigues <tiagomcrodrigues@gmail.com> Co-authored-by: gusty <1261319+gusty@users.noreply.github.com> Co-authored-by: Oskar Gewalli <wallymathieu@users.noreply.github.com>
1 parent 3caa9d1 commit 80616e3

File tree

10 files changed

+79
-56
lines changed

10 files changed

+79
-56
lines changed

.github/workflows/dotnetcore.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Setup .NET Core
2626
uses: actions/setup-dotnet@v1
2727
with:
28-
dotnet-version: 6.0.201
28+
dotnet-version: 7.0.100
2929
- name: Restore
3030
run: git submodule update --init --recursive
3131
- name: Build with dotnet
@@ -38,7 +38,11 @@ jobs:
3838

3939
steps:
4040
- uses: actions/checkout@v2
41-
- name: Setup .NET Core
41+
- name: Setup .NET Core 7
42+
uses: actions/setup-dotnet@v1
43+
with:
44+
dotnet-version: 7.0.100
45+
- name: Setup .NET Core 6
4246
uses: actions/setup-dotnet@v1
4347
with:
4448
dotnet-version: 6.0.201
@@ -78,6 +82,10 @@ jobs:
7882
runs-on: windows-latest
7983
steps:
8084
- uses: actions/checkout@v2
85+
- name: Setup .NET Core 7
86+
uses: actions/setup-dotnet@v1
87+
with:
88+
dotnet-version: 7.0.100
8189
- name: Setup .NET Core 6
8290
uses: actions/setup-dotnet@v1
8391
with:

.github/workflows/fable.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v2
16+
- name: Restore
17+
run: git submodule update --init --recursive
18+
- name: Remove global json
19+
run: rm global.json
1620
- name: Setup .NET Core
1721
uses: actions/setup-dotnet@v1
1822
with:
1923
dotnet-version: 6.0.201
20-
- name: Restore
21-
run: git submodule update --init --recursive
2224
- name: Restore tools
2325
run: dotnet tool restore
2426
- name: Use Node.js
@@ -37,12 +39,14 @@ jobs:
3739

3840
steps:
3941
- uses: actions/checkout@v2
42+
- name: Restore
43+
run: git submodule update --init --recursive
44+
- name: Remove global json
45+
run: rm global.json
4046
- name: Setup .NET Core
4147
uses: actions/setup-dotnet@v1
4248
with:
4349
dotnet-version: 6.0.201
44-
- name: Restore
45-
run: git submodule update --init --recursive
4650
- name: Restore tools
4751
run: dotnet tool restore
4852
# - name: Run tests (Fable2 subset but on .net)

docsrc/tools/docsTool.fsproj

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>net6.0</TargetFramework>
5+
<TargetFramework>net7.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>

global.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"sdk": {
3-
"version": "6.0.200",
3+
"version": "7.0.100",
44
"rollForward": "latestFeature"
55
},
66

77
"additionalSdks": [
8-
"5.0.405"
8+
"5.0.405",
9+
"6.0.201"
910
]
1011
}

src/FSharpPlus.Docs/FSharpPlus.Docs.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<OutputType>Exe</OutputType>
99
<Configurations>Debug;Release;Fable</Configurations>
1010
<Platforms>AnyCPU</Platforms>
11-
<TargetFramework>net6.0</TargetFramework>
11+
<TargetFramework>net7.0</TargetFramework>
1212
</PropertyGroup>
1313

1414
<ItemGroup>

src/FSharpPlus/Control/Numeric.fs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,11 +291,15 @@ type TryNegate' =
291291
type DivRem =
292292
inherit Default1
293293
static member inline DivRem (x: ^t when ^t: null and ^t: struct, y: ^t, _thisClass: DivRem) = (x, y)
294-
static member inline DivRem (D: 'T, d: 'T, [<Optional>]_impl: Default1) = let q = D / d in q, D - q * d
295-
static member inline DivRem (D: 'T, d: 'T, [<Optional>]_impl: DivRem ) =
294+
static member inline DivRem (D: 'T, d: 'T, _impl: Default2) = let q = D / d in q, D - q * d
295+
static member inline DivRem (D: 'T, d: 'T, _impl: Default1) =
296296
let mutable r = Unchecked.defaultof<'T>
297297
(^T: (static member DivRem : _ * _ -> _ -> _) (D, d, &r)), r
298298

299+
static member inline DivRem (D: 'T, d: 'T, _impl: DivRem ) =
300+
let (struct (x, y)) = (^T: (static member DivRem : _ * _ -> _) (D, d))
301+
(x, y)
302+
299303
static member inline Invoke (D: 'T) (d: 'T) : 'T*'T =
300304
let inline call_3 (a: ^a, b: ^b, c: ^c) = ((^a or ^b or ^c) : (static member DivRem : _*_*_ -> _) b, c, a)
301305
let inline call (a: 'a, b: 'b, c: 'c) = call_3 (a, b, c)

tests/FSharpPlus.Tests/FSharpPlus.Tests.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<FscToolExe>$(FSC_ExePathCompilerBuild)</FscToolExe>
66
</PropertyGroup>
77
<PropertyGroup>
8-
<TargetFrameworks>net6.0</TargetFrameworks>
98
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
109
<LangVersion Condition=" '$(Configuration)' == 'Fable' OR '$(Configuration)' == 'Fable3' ">6.0</LangVersion>
1110
<IsPackable>false</IsPackable>
1211
<Configurations>Debug;Release;Fable</Configurations>
1312
<Platforms>AnyCPU</Platforms>
1413
<DefineConstants Condition=" '$(Configuration)' == 'Fable'">$(DefineConstants);FABLE_COMPILER</DefineConstants>
14+
<TargetFramework>net7.0</TargetFramework>
1515
</PropertyGroup>
1616
<ItemGroup>
1717
<Compile Include="Helpers.fs" />
Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<OutputType>Exe</OutputType>
5-
<Configurations>Debug;Release;Fable;Fable3</Configurations>
6-
<Platforms>AnyCPU</Platforms>
7-
<LangVersion Condition=" '$(Configuration)' == 'Fable' OR '$(Configuration)' == 'Fable3' ">6.0</LangVersion>
8-
<DefineConstants Condition=" '$(Configuration)' == 'Fable'">$(DefineConstants);FABLE_COMPILER;FABLE_COMPILER_FAKE</DefineConstants>
9-
<DefineConstants Condition=" '$(Configuration)' == 'Fable3'">$(DefineConstants);FABLE_COMPILER;FABLE_COMPILER_3;FABLE_COMPILER_FAKE</DefineConstants>
10-
<TargetFramework>net6.0</TargetFramework>
11-
</PropertyGroup>
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<Configurations>Debug;Release;Fable;Fable3</Configurations>
6+
<Platforms>AnyCPU</Platforms>
7+
<LangVersion Condition=" '$(Configuration)' == 'Fable' OR '$(Configuration)' == 'Fable3' ">6.0</LangVersion>
8+
<DefineConstants Condition=" '$(Configuration)' == 'Fable'">$(DefineConstants);FABLE_COMPILER;FABLE_COMPILER_FAKE</DefineConstants>
9+
<DefineConstants Condition=" '$(Configuration)' == 'Fable3'">$(DefineConstants);FABLE_COMPILER;FABLE_COMPILER_3;FABLE_COMPILER_FAKE</DefineConstants>
10+
<TargetFramework>net6.0</TargetFramework>
11+
</PropertyGroup>
1212

13-
<ItemGroup>
14-
<Compile Include="Util.fs" />
15-
<Compile Include="FSharpTests/General/Util.fs" />
16-
<Compile Include="FSharpTests/General/Splits.fs" />
17-
<Compile Include="FSharpTests/General/MonoidCompile.fs" />
18-
<Compile Include="FSharpTests/General/Monoid.fs" />
19-
<Compile Include="FSharpTests/General/Functor.fs" />
20-
<Compile Include="FSharpTests/General/Collections.fs" />
21-
<Compile Include="FSharpTests/General/Monad.fs" />
22-
<Compile Include="FSharpTests/General/Applicative.fs" />
23-
<Compile Include="FSharpTests/General/Alternative.fs" />
24-
<Compile Include="FSharpTests/General/Foldable.fs" />
25-
<Compile Include="FSharpTests/General/Indexable.fs" />
26-
<Compile Include="FSharpTests/General/Parsing.fs" />
27-
<Compile Include="FSharpTests/General/Traversable.fs" />
28-
<Compile Include="FSharpTests/General/Lensing.fs" />
29-
<Compile Include="FSharpTests/General/Numeric.fs" />
30-
<Compile Include="FSharpTests/General.fs" />
31-
<Compile Include="FSharpTests/Extensions.fs" />
32-
<Compile Include="Tests.fs" />
33-
</ItemGroup>
13+
<ItemGroup>
14+
<Compile Include="Util.fs" />
15+
<Compile Include="FSharpTests/General/Util.fs" />
16+
<Compile Include="FSharpTests/General/Splits.fs" />
17+
<Compile Include="FSharpTests/General/MonoidCompile.fs" />
18+
<Compile Include="FSharpTests/General/Monoid.fs" />
19+
<Compile Include="FSharpTests/General/Functor.fs" />
20+
<Compile Include="FSharpTests/General/Collections.fs" />
21+
<Compile Include="FSharpTests/General/Monad.fs" />
22+
<Compile Include="FSharpTests/General/Applicative.fs" />
23+
<Compile Include="FSharpTests/General/Alternative.fs" />
24+
<Compile Include="FSharpTests/General/Foldable.fs" />
25+
<Compile Include="FSharpTests/General/Indexable.fs" />
26+
<Compile Include="FSharpTests/General/Parsing.fs" />
27+
<Compile Include="FSharpTests/General/Traversable.fs" />
28+
<Compile Include="FSharpTests/General/Lensing.fs" />
29+
<Compile Include="FSharpTests/General/Numeric.fs" />
30+
<Compile Include="FSharpTests/General.fs" />
31+
<Compile Include="FSharpTests/Extensions.fs" />
32+
<Compile Include="Tests.fs" />
33+
</ItemGroup>
3434

3535

36-
<ItemGroup>
37-
<PackageReference Include="Fable.Core" Version="3.2.5" />
38-
<PackageReference Include="Fable.Promise" Version="2.2.0" />
39-
<PackageReference Include="Fable.Fetch" Version="2.2.0" />
40-
<PackageReference Include="Fuchu" Version="1.2.0-beta-1" />
41-
</ItemGroup>
36+
<ItemGroup>
37+
<PackageReference Include="Fable.Core" Version="3.2.5" />
38+
<PackageReference Include="Fable.Promise" Version="2.2.0" />
39+
<PackageReference Include="Fable.Fetch" Version="2.2.0" />
40+
<PackageReference Include="Fuchu" Version="1.2.0-beta-1" />
41+
</ItemGroup>
4242

43-
<ItemGroup>
44-
<ProjectReference Include="..\..\src\FSharpPlus\FSharpPlus.fsproj">
45-
<Private>True</Private>
46-
</ProjectReference>
47-
<PackageReference Update="FSharp.Core" Version="6.0.6" />
48-
</ItemGroup>
43+
<ItemGroup>
44+
<ProjectReference Include="..\..\src\FSharpPlus\FSharpPlus.fsproj">
45+
<Private>True</Private>
46+
</ProjectReference>
47+
<PackageReference Update="FSharp.Core" Version="6.0.6" />
48+
</ItemGroup>
4949
</Project>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"sdk": {
3+
"version": "6.0.201",
4+
"rollForward": "latestFeature"
5+
}
6+
}

tests/benchmarks/Benchmarks.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net6.0</TargetFramework>
3+
<TargetFramework>net7.0</TargetFramework>
44
<OutputType>Exe</OutputType>
55
<PlatformTarget>AnyCPU</PlatformTarget>
66
<Optimize>true</Optimize>

0 commit comments

Comments
 (0)