Skip to content

Commit

Permalink
Merge pull request #402 from baronfel/net5.0
Browse files Browse the repository at this point in the history
Changes required to support a .net5.0 build of expecto.
  • Loading branch information
haf authored Nov 11, 2020
2 parents 2733bea + e54e7e4 commit 8fb043f
Show file tree
Hide file tree
Showing 17 changed files with 926 additions and 1,228 deletions.
4 changes: 2 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"isRoot": true,
"tools": {
"paket": {
"version": "5.245.1",
"version": "5.252.0",
"commands": [
"paket"
]
},
"fake-cli": {
"version": "5.20.0",
"version": "5.20.4-alpha.1642",
"commands": [
"fake"
]
Expand Down
988 changes: 494 additions & 494 deletions .paket/Paket.Restore.targets

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: csharp
dist: bionic
dotnet: 3.1.300
dotnet: 5.0.100

matrix:
fast_finish: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
<TargetFrameworks>net5.0;netcoreapp3.1;net461</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Compile Include="BenchmarkDotNetTests.fs" />
Expand Down
2 changes: 1 addition & 1 deletion Expecto.Focused.Tests/Expecto.Focused.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<AssemblyName>Expecto.Focused.Tests</AssemblyName>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
<TargetFrameworks>net5.0;netcoreapp3.1;net461</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Compile Include="Main.fs" />
Expand Down
2 changes: 1 addition & 1 deletion Expecto.Hopac.Tests/Expecto.Hopac.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ServerGarbageCollection>true</ServerGarbageCollection>
<AssemblyName>Expecto.Hopac.Tests</AssemblyName>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
<TargetFrameworks>net5.0;netcoreapp3.1;net461</TargetFrameworks>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions Expecto.Hopac/Expecto.Hopac.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
<ItemGroup>
<ProjectReference Include="..\Expecto\Expecto.fsproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<Reference Include="System.Threading.Tasks" />
</ItemGroup>
<Import Project="..\NuGet.props" />
<Import Project="..\.paket\Paket.Restore.targets" />
</Project>
2 changes: 1 addition & 1 deletion Expecto.Sample/Expecto.Sample.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<AssemblyName>Expecto.Sample</AssemblyName>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
<TargetFrameworks>net5.0;netcoreapp3.1;net461</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Compile Include="Expecto.Flip.Sample.fs" />
Expand Down
2 changes: 1 addition & 1 deletion Expecto.Tests.CSharp/Expecto.Tests.CSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<AssemblyName>Expecto.Tests.CSharp</AssemblyName>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
<TargetFrameworks>net5.0;netcoreapp3.1;net461</TargetFrameworks>
<EnableDefaultContentItems>false</EnableDefaultContentItems>
<EnableDefaultNoneItems>false</EnableDefaultNoneItems>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
Expand Down
2 changes: 1 addition & 1 deletion Expecto.Tests/Expecto.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<AssemblyName>Expecto.Tests</AssemblyName>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
<TargetFrameworks>net5.0;netcoreapp3.1;net461</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Compile Include="Prelude.fs" />
Expand Down
2 changes: 1 addition & 1 deletion Expecto/Expecto.Impl.fs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ module Impl =
let spirit =
if summary.successful then "Success!" else String.Empty
let commonAncestor =
let rec loop ancestor (descendants : string list) =
let rec loop (ancestor: string) (descendants : string list) =
match descendants with
| [] -> ancestor
| hd::tl when hd.StartsWith(ancestor)->
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ There's a nuget `Expecto.VisualStudio.TestAdapter` for Visual Studio integration

You can use `dotnet run` or `dotnet watch` from the command line.

dotnet watch -p MyProject.Tests run -f netcoreapp3.1
dotnet watch -p MyProject.Tests run -f net5.0


### Prettify stacktraces/ship test logs
Expand Down Expand Up @@ -1122,8 +1122,8 @@ Tests.runTestsInAssemblyWithCLIArgs [Stress 0.1;Stress_Timeout 0.2] [||]
From the command line you can run:

```
dotnet run -p Expecto.Tests -f netcoreapp3.1 -c release -- --help
dotnet watch -p Expecto.Tests run -f netcoreapp3.1 -c release -- --colours 256
dotnet run -p Expecto.Tests -f net5.0 -c release -- --help
dotnet watch -p Expecto.Tests run -f net5.0 -c release -- --colours 256
```

## Contributing and building
Expand Down
2 changes: 1 addition & 1 deletion build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ let configuration =
|> DotNet.BuildConfiguration.fromString

let release = ReleaseNotes.load "RELEASE_NOTES.md"
let testFramework = "netcoreapp3.1"
let testFramework = "net5.0"
let dotnetExePath = "dotnet"

let githubToken = lazy(Environment.environVarOrFail "GITHUB_TOKEN")
Expand Down
2 changes: 1 addition & 1 deletion fake
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -eu
set -o pipefail

dotnet tool restore
dotnet tool run fake $@
dotnet fake $@
3 changes: 1 addition & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"sdk": {
"version": "3.1.3XX",
"rollForward": "latestFeature"
"version": "5.0.100"
}
}
15 changes: 8 additions & 7 deletions paket.dependencies
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source https://api.nuget.org/v3/index.json
framework net461, netstandard2.0, netcoreapp3.1
framework net461, netstandard2.0, netcoreapp3.1, net5.0
storage none
version 5.245.1

Expand All @@ -13,20 +13,21 @@ nuget BenchmarkDotNet ~> 0.12.1
group Build
source https://api.nuget.org/v3/index.json
storage none
framework auto-detect
framework netstandard2.0

nuget FSharp.Core
nuget Fake.Api.GitHub
nuget Fake.BuildServer.AppVeyor
nuget Fake.BuildServer.Travis
nuget Fake.Core.ReleaseNotes
nuget Fake.Core.Target
nuget Fake.Core.Xml
nuget Fake.DotNet.Cli
nuget Fake.DotNet.Paket
nuget Fake.IO.FileSystem
nuget Fake.Core.Target prerelease
nuget Fake.Core.Xml prerelease
nuget Fake.DotNet.Cli prerelease
nuget Fake.DotNet.Paket prerelease
nuget Fake.IO.FileSystem prerelease
nuget Fake.IO.Zip
nuget Fake.Tools.Git
nuget Fake.Tools.Octo
nuget Nuget.Protocol < 5.8

github eiriktsarpalis/snippets SlnTools/SlnTools.fs
Loading

0 comments on commit 8fb043f

Please sign in to comment.