Skip to content

Commit

Permalink
Net 5.0 (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrattli authored Nov 11, 2020
1 parent 875b521 commit cb9a92d
Show file tree
Hide file tree
Showing 9 changed files with 417 additions and 450 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101
dotnet-version: 5.0.100
- name: Setup dotnet manifest
run: dotnet new tool-manifest
- name: Setup paket
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101
dotnet-version: 5.0.100

- name: Setup dotnet manifest
run: dotnet new tool-manifest
Expand Down Expand Up @@ -49,4 +49,3 @@ jobs:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ extensions/Oryx.ThothJsonNet/obj
paket-files/
.idea
.mypy_cache

.metals/
2 changes: 1 addition & 1 deletion benchmark/benchmark.fsproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
26 changes: 13 additions & 13 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ group Main
framework: netstandard2.0

nuget Microsoft.Extensions.Logging
nuget FSharp.Core ~> 4.7
nuget FSharp.Core >= 4.7
nuget Taskbuilder.fs ~> 2.1


Expand All @@ -14,48 +14,48 @@ group Json
storage: none

framework: netstandard2.0
nuget FSharp.Core ~> 4.7
nuget FSharp.Core >= 4.7
nuget System.Text.Json
nuget Taskbuilder.fs ~> 2.1
nuget Taskbuilder.fs ~> 2
nuget Oryx

group Newtonsoft
source https://www.nuget.org/api/v2
storage: none

framework: netstandard2.0
nuget FSharp.Core ~> 4.7
nuget FSharp.Core >= 4.7
nuget Newtonsoft.Json
nuget Taskbuilder.fs ~> 2.1
nuget Taskbuilder.fs ~> 2
nuget Oryx

group Thoth
source https://www.nuget.org/api/v2
storage: none

framework: netstandard2.0
nuget FSharp.Core ~> 4.7
nuget FSharp.Core >= 4.7
nuget Thoth.Json.Net
nuget Taskbuilder.fs ~> 2.1
nuget Taskbuilder.fs ~> 2
nuget Oryx

group Google
source https://www.nuget.org/api/v2
storage: none

framework: netstandard2.0
nuget FSharp.Core ~> 4.7
nuget Google.Protobuf ~> 3.9
nuget Taskbuilder.fs ~> 2.1
nuget FSharp.Core >= 4.7
nuget Google.Protobuf ~> 3
nuget Taskbuilder.fs ~> 2
nuget Oryx

group Test
source https://www.nuget.org/api/v2
storage: none

nuget FSharp.Core 4.7.0
nuget FSharp.Core >= 4.7
nuget coverlet.msbuild 2.5.1
nuget Unquote ~> 4
nuget Unquote ~> 5
nuget xunit ~> 2
nuget xunit.runner.visualstudio ~> 2
nuget Serilog.Sinks.XUnit
Expand All @@ -76,5 +76,5 @@ group Benchmark
group Examples
source https://www.nuget.org/api/v2
storage: none

nuget Thoth.Json.Net
822 changes: 395 additions & 427 deletions paket.lock

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions src/Handler.fs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ module Handler =
/// Run the HTTP handler in the given context.
let runAsync (ctx : Context<'T>) (handler: HttpHandler<'T, 'TResult, 'TResult, 'TError>) : Task<Result<'TResult, HandlerError<'TError>>> =
task {
let! result = handler finishEarly ctx
match result with
| Ok a -> return Ok a.Response
| Error err -> return Error err
let! result = (handler finishEarly) ctx
return Result.map (fun a -> a.Response) result
}

let map (mapper: 'T1 -> 'T2) (next : HttpFunc<'T2, 'TResult, 'TError>) (ctx : Context<'T1>) : HttpFuncResult<'TResult, 'TError> =
next { Request = ctx.Request; Response = (mapper ctx.Response) }

Expand Down
1 change: 0 additions & 1 deletion src/Result.fs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ module Result =
let folder head tail = f head >>= (fun h -> tail >>= (fun t -> h::t |> rtn))
List.foldBack folder ls (rtn List.empty)
let sequenceList ls = traverseList id ls

2 changes: 1 addition & 1 deletion test/Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<GenerateProgramFile>false</GenerateProgramFile>
Expand Down

0 comments on commit cb9a92d

Please sign in to comment.