Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to .NET 8 #372

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: csharp
dist: xenial
sudo: required
dotnet: 3.1.300
dotnet: 8.0.300
mono: none
addons:
snaps:
Expand Down
4 changes: 2 additions & 2 deletions ClientTests/src/Client.fsproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>latest</LangVersion>
<DefineConstants>TASK_AS_ASYNC</DefineConstants>
</PropertyGroup>
Expand All @@ -14,4 +14,4 @@
<ProjectReference Include="..\..\Fable.Remoting.MsgPack\Fable.Remoting.MsgPack.fsproj" />
</ItemGroup>
<Import Project="..\..\.paket\Paket.Restore.targets" />
</Project>
</Project>
4 changes: 2 additions & 2 deletions Fable.Remoting.AspNetCore/Fable.Remoting.AspNetCore.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<PackageTags>fsharp;fable;remoting;rpc;webserver;aspnet</PackageTags>
<Authors>Zaid Ajaj;Diego Esmerio</Authors>
<Version>2.40.0</Version>
<TargetFrameworks>netstandard2.0; netcoreapp3.1; net6.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageReleaseNotes>Update newtonsoft dependency</PackageReleaseNotes>
</PropertyGroup>
Expand All @@ -23,4 +23,4 @@
</ItemGroup>

<Import Project="..\.paket\Paket.Restore.targets" />
</Project>
</Project>
3 changes: 1 addition & 2 deletions Fable.Remoting.AwsLambda/Fable.Remoting.AwsLambda.fsproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Description>AWS Lambda-Fable adapter that generates routes for shared server spec with a Fable client. Client must use Fable.Remoting.Client</Description>
<PackageProjectUrl>https://github.com/Zaid-Ajaj/Fable.Remoting</PackageProjectUrl>
<RepositoryUrl>https://github.com/Zaid-Ajaj/Fable.Remoting.git</RepositoryUrl>
<PackageLicenseUrl>https://github.com/Zaid-Ajaj/Fable.Remoting/blob/master/LICENSE</PackageLicenseUrl>
<PackageIconUrl></PackageIconUrl>
<PackageTags>fsharp;fable;remoting;rpc;webserver;serverless;aws lambda</PackageTags>
<Authors>Zaid Ajaj</Authors>
<Version>1.2.0</Version>
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>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Fable.Remoting.DotnetClient\Fable.Remoting.DotnetClient.fsproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AzureFunctionsVersion>v3</AzureFunctionsVersion>
<OutputType>Exe</OutputType>
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
Expand Down Expand Up @@ -28,4 +28,4 @@
</Target>
<Import Project="..\..\.paket\Paket.Restore.targets" />

</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Description>AzureFunctions-Fable adapter for isolated mode (worker) that generates routes for shared server spec with a Fable client. Client must use Fable.Remoting.Client</Description>
<PackageProjectUrl>https://github.com/Zaid-Ajaj/Fable.Remoting</PackageProjectUrl>
<RepositoryUrl>https://github.com/Zaid-Ajaj/Fable.Remoting.git</RepositoryUrl>
<PackageLicenseUrl>https://github.com/Zaid-Ajaj/Fable.Remoting/blob/master/LICENSE</PackageLicenseUrl>
<PackageIconUrl></PackageIconUrl>
<PackageTags>fsharp;fable;remoting;rpc;webserver;serverless;azure functions</PackageTags>
<Authors>Zaid Ajaj;Roman Provaznik</Authors>
<Version>1.14.0</Version>
Expand Down
4 changes: 2 additions & 2 deletions Fable.Remoting.Benchmarks/Fable.Remoting.Benchmarks.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>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Serialization.fs" />
Expand All @@ -13,4 +13,4 @@
<ProjectReference Include="..\Fable.Remoting.MsgPack\Fable.Remoting.MsgPack.fsproj" />
</ItemGroup>
<Import Project="..\.paket\Paket.Restore.targets" />
</Project>
</Project>
15 changes: 7 additions & 8 deletions Fable.Remoting.Benchmarks/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ open BenchmarkDotNet.Order

type Orderer () =
interface IOrderer with
member _.GetExecutionOrder benchmarksCase = benchmarksCase :> _
member _.GetHighlightGroupKey benchmarkCase = null
member _.GetLogicalGroupKey (allBenchmarksCases, benchmarkCase) = sprintf "%s_%s" benchmarkCase.Descriptor.Type.Name benchmarkCase.DisplayInfo
member _.GetLogicalGroupOrder logicalGroups = logicalGroups
member _.GetSummaryOrder (benchmarksCases, summary) = benchmarksCases :> _
member _.GetExecutionOrder (benchmarksCase, _) = benchmarksCase :> _
member _.GetHighlightGroupKey _ = null
member _.GetLogicalGroupKey (_, benchmarkCase) = sprintf "%s_%s" benchmarkCase.Descriptor.Type.Name benchmarkCase.DisplayInfo
member _.GetLogicalGroupOrder (logicalGroups, _) = logicalGroups
member _.GetSummaryOrder (benchmarksCases, _) = benchmarksCases :> _
member _.SeparateLogicalGroups = true

[<EntryPoint>]
let main argv =
let main _ =
let config = DefaultConfig.Instance.WithOption(ConfigOptions.JoinSummary, true).WithOrderer (Orderer ())
let results = BenchmarkSwitcher.FromAssembly(typeof<Serialization.RecursiveRecord>.Assembly).RunAll config
let _ = BenchmarkSwitcher.FromAssembly(typeof<Serialization.RecursiveRecord>.Assembly).RunAll config
0

5 changes: 2 additions & 3 deletions Fable.Remoting.Client/Fable.Remoting.Client.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
<PackageProjectUrl>https://github.com/Zaid-Ajaj/Fable.Remoting</PackageProjectUrl>
<RepositoryUrl>https://github.com/Zaid-Ajaj/Fable.Remoting.git</RepositoryUrl>
<PackageLicenseUrl>https://github.com/Zaid-Ajaj/Fable.Remoting/blob/master/LICENSE</PackageLicenseUrl>
<PackageIconUrl></PackageIconUrl>
<PackageTags>fsharp;fable;remoting;rpc;webserver</PackageTags>
<Authors>Zaid Ajaj;Diego Esmerio</Authors>
<Version>7.32.0</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageReleaseNotes>Fix compatibility with Fable v4.13 by checking array bounds before accessing</PackageReleaseNotes>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Types.fs" />
Expand All @@ -26,4 +25,4 @@
<ProjectReference Include="..\Fable.Remoting.MsgPack\Fable.Remoting.MsgPack.fsproj" />
</ItemGroup>
<Import Project="..\.paket\Paket.Restore.targets" />
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
<PackageProjectUrl>https://github.com/Zaid-Ajaj/Fable.Remoting</PackageProjectUrl>
<RepositoryUrl>https://github.com/Zaid-Ajaj/Fable.Remoting.git</RepositoryUrl>
<PackageLicenseUrl>https://github.com/Zaid-Ajaj/Fable.Remoting/blob/master/LICENSE</PackageLicenseUrl>
<PackageIconUrl></PackageIconUrl>
<PackageTags>fsharp;fable;remoting;rpc;webserver;json</PackageTags>
<Authors>Zaid Ajaj</Authors>
<Version>3.35.0</Version>
<TargetFrameworks>net462;netstandard2.0;net6.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageReleaseNotes>Update newtonsoft dependency</PackageReleaseNotes>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -21,4 +21,4 @@
</ItemGroup>

<Import Project="..\.paket\Paket.Restore.targets" />
</Project>
</Project>
5 changes: 2 additions & 3 deletions Fable.Remoting.Giraffe/Fable.Remoting.Giraffe.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
<PackageProjectUrl>https://github.com/Zaid-Ajaj/Fable.Remoting</PackageProjectUrl>
<RepositoryUrl>https://github.com/Zaid-Ajaj/Fable.Remoting.git</RepositoryUrl>
<PackageLicenseUrl>https://github.com/Zaid-Ajaj/Fable.Remoting/blob/master/LICENSE</PackageLicenseUrl>
<PackageIconUrl></PackageIconUrl>
<PackageTags>fsharp;fable;remoting;rpc;webserver;giraffe</PackageTags>
<Authors>Zaid Ajaj;Diego Esmerio</Authors>
<Version>4.22.0</Version>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

Expand All @@ -23,4 +22,4 @@
</ItemGroup>

<Import Project="..\.paket\Paket.Restore.targets" />
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="../Shared/SharedTypes.fs" />
Expand All @@ -13,4 +13,4 @@
<ProjectReference Include="../../Fable.Remoting.Giraffe/Fable.Remoting.Giraffe.fsproj" />
</ItemGroup>
<Import Project="..\..\.paket\Paket.Restore.targets" />
</Project>
</Project>
4 changes: 2 additions & 2 deletions Fable.Remoting.Json.Tests/Fable.Remoting.Json.Tests.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>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Fable.Remoting.Json\Fable.Remoting.Json.fsproj" />
Expand All @@ -12,4 +12,4 @@
<Compile Include="Program.fs" />
</ItemGroup>
<Import Project="..\.paket\Paket.Restore.targets" />
</Project>
</Project>
4 changes: 2 additions & 2 deletions Fable.Remoting.Json/Fable.Remoting.Json.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Authors>Zaid Ajaj</Authors>
<Version>2.25.0</Version>
<PackageReleaseNotes>Update newtonsoft dependency</PackageReleaseNotes>
<TargetFrameworks>netstandard2.0;net462;net6.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>

Expand All @@ -19,4 +19,4 @@
</ItemGroup>

<Import Project="..\.paket\Paket.Restore.targets" />
</Project>
</Project>
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>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Fable.Remoting.MsgPack\Fable.Remoting.MsgPack.fsproj" />
Expand All @@ -13,4 +13,4 @@
<Compile Include="Program.fs" />
</ItemGroup>
<Import Project="..\.paket\Paket.Restore.targets" />
</Project>
</Project>
3 changes: 1 addition & 2 deletions Fable.Remoting.MsgPack/Fable.Remoting.MsgPack.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
<PackageProjectUrl>https://github.com/Zaid-Ajaj/Fable.Remoting</PackageProjectUrl>
<RepositoryUrl>https://github.com/Zaid-Ajaj/Fable.Remoting.git</RepositoryUrl>
<PackageLicenseUrl>https://github.com/Zaid-Ajaj/Fable.Remoting/blob/master/LICENSE</PackageLicenseUrl>
<PackageIconUrl></PackageIconUrl>
<PackageTags>fsharp;fable;remoting;msgpack</PackageTags>
<Authors>Zaid Ajaj</Authors>
<Version>1.24.0</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageReleaseNotes>Fix serialization bug in latest Fable compiler</PackageReleaseNotes>
<TargetFrameworks>netstandard2.0;net462;netcoreapp3.1;net6.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="TypeShape.fs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Compile Include="Types.fs" />
<Compile Include="ServerDynamicInvokeTests.fs" />
<Compile Include="App.fs" />
</ItemGroup>
<ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Fable.Remoting.Server\Fable.Remoting.Server.fsproj" />
</ItemGroup>
<Import Project="..\.paket\Paket.Restore.targets" />
</Project>
</Project>
20 changes: 10 additions & 10 deletions Fable.Remoting.Server/Diagnostics.fs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
namespace Fable.Remoting.Server
namespace Fable.Remoting.Server

open System
open System.Text
open System.Text

module Diagnostics =
let writeLn text (builder: StringBuilder) = builder.AppendLine(text)
module Diagnostics =
let writeLn (text: string) (builder: StringBuilder) = builder.AppendLine(text)
let toLogger logf = string >> logf
/// Simplifes the name of the type that is to be deserialized

/// Simplifes the name of the type that is to be deserialized
let rec typePrinter (valueType: Type) =
let simplifyGeneric = function
| "Microsoft.FSharp.Core.FSharpOption" -> "Option"
Expand All @@ -33,14 +33,14 @@ module Diagnostics =
|> String.concat ", "
|> sprintf "%s<%s>" (simplifyGeneric typeName)

let runPhase logger text =
let runPhase logger text =
logger |> Option.iter (fun logf ->
StringBuilder()
|> writeLn (sprintf "Fable.Remoting: invoking function %s" text)
|> toLogger logf
|> toLogger logf
)

/// Logs the JSON input and the corresponding types that the JSON will be converter into.
/// Logs the JSON input and the corresponding types that the JSON will be converter into.
let deserializationPhase logger (text: unit -> string) (inputTypes: System.Type[]) =
logger |> Option.iter(fun logf ->
StringBuilder()
Expand All @@ -58,4 +58,4 @@ module Diagnostics =
StringBuilder()
|> writeLn "Fable.Remoting: Returning serialized result back to client"
|> writeLn value
|> toLogger logf)
|> toLogger logf)
5 changes: 2 additions & 3 deletions Fable.Remoting.Server/Fable.Remoting.Server.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
<PackageProjectUrl>https://github.com/Zaid-Ajaj/Fable.Remoting</PackageProjectUrl>
<RepositoryUrl>https://github.com/Zaid-Ajaj/Fable.Remoting.git</RepositoryUrl>
<PackageLicenseUrl>https://github.com/Zaid-Ajaj/Fable.Remoting/blob/master/LICENSE</PackageLicenseUrl>
<PackageIconUrl></PackageIconUrl>
<PackageTags>fsharp;fable;remoting;rpc;webserver</PackageTags>
<Authors>Zaid Ajaj;Diego Esmerio</Authors>
<Version>5.39.0</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<PackageReleaseNotes>Update newtonsoft dependency</PackageReleaseNotes>
<LangVersion>latest</LangVersion>
</PropertyGroup>
Expand All @@ -34,4 +33,4 @@
</ItemGroup>

<Import Project="..\.paket\Paket.Restore.targets" />
</Project>
</Project>
Loading