Skip to content

Commit

Permalink
Change Cosmos to netstandard2.1, tools to netcoreapp3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bartelink committed Feb 19, 2020
1 parent c088190 commit c631161
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 55 deletions.
1 change: 0 additions & 1 deletion build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
<Exec Command="dotnet pack src/Equinox.SqlStreamStore.MySql $(Cfg) $(PackOptions)" />
<Exec Command="dotnet pack src/Equinox.SqlStreamStore.Postgres $(Cfg) $(PackOptions)" />
<Exec Command="dotnet pack tools/Equinox.Tools.TestHarness $(Cfg) $(PackOptions)" />
<Exec Command='dotnet publish tools/Equinox.Tool $(Cfg) -f net461 -o "$(ThisDirAbsolute)/bin/equinox-tool/net461" ' />
<Exec Command="dotnet pack tools/Equinox.Tool $(Cfg) $(PackOptions) /p:PackAsTool=true" />
</Target>

Expand Down
5 changes: 1 addition & 4 deletions samples/Infrastructure/Infrastructure.fsproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<TargetFrameworks>netstandard2.1</TargetFrameworks>
<WarningLevel>5</WarningLevel>
<IsTestProject>false</IsTestProject>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
Expand Down Expand Up @@ -31,14 +31,11 @@
<PackageReference Include="Argu" Version="6.0.0" />
<!--Note .NetCore sufficed package is not an officially suported package and is not longer needed-->
<PackageReference Include="Destructurama.FSharp" Version="1.1.1-dev-00033" />
<!--Handle TypeShape-restriction; would otherwise use 3.1.2.5 for net461 -->
<!--Handle Destructurama.FSharp-restriction; would otherwise use 4.0.0.1 for net461 -->
<PackageReference Include="FSharp.Core" Version="4.3.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.1" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.Seq" Version="4.0.0" />
<PackageReference Include="Microsoft.Azure.Cosmos.Direct" Version="3.1.4" />
<Reference Include="System.Runtime.Caching" Condition=" '$(TargetFramework)' != 'netstandard2.0' " />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion samples/Store/Integration/Integration.fsproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(TestTargetFrameworks)</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<IsPackable>false</IsPackable>
<WarningLevel>5</WarningLevel>
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>
Expand Down
5 changes: 2 additions & 3 deletions samples/Tutorial/Tutorial.fsproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<TargetFrameworks>netstandard2.1</TargetFrameworks>
<WarningLevel>5</WarningLevel>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
Expand Down Expand Up @@ -31,8 +31,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="FSharp.Core" Version="3.1.2.5" Condition=" '$(TargetFramework)' == 'net461' " />
<PackageReference Include="FSharp.Core" Version="4.3.4" Condition=" '$(TargetFramework)' == 'netstandard2.0' " />
<PackageReference Include="FSharp.Core" Version="4.3.4" />

<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.Seq" Version="4.0.0" />
Expand Down
24 changes: 1 addition & 23 deletions src/Equinox.Core/Infrastructure.fs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ open System.Threading.Tasks

type OAttribute = System.Runtime.InteropServices.OptionalAttribute
type DAttribute = System.Runtime.InteropServices.DefaultParameterValueAttribute

#if NET461
module Array =
let tryHead (array : 'T[]) =
Expand Down Expand Up @@ -68,28 +68,6 @@ type Async with
sc ())
|> ignore)

#if !NO_ASYNCSEQ
module AsyncSeq =
/// Same as takeWhileAsync, but returns the final element too
let takeWhileInclusiveAsync p (source : AsyncSeq<'T>) : AsyncSeq<_> = asyncSeq {
use ie = source.GetEnumerator()
let! move = ie.MoveNext()
let b = ref move
while b.Value.IsSome do
let v = b.Value.Value
yield v
let! res = p v
if res then
let! moven = ie.MoveNext()
b := moven
else
b := None }

/// Same as takeWhile, but returns the final element too
let takeWhileInclusive p (source : AsyncSeq<'T>) =
takeWhileInclusiveAsync (p >> async.Return) source
#endif

[<RequireQualifiedAccess>]
module Regex =
open System.Text.RegularExpressions
Expand Down
8 changes: 4 additions & 4 deletions src/Equinox.Cosmos/Equinox.Cosmos.fsproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<TargetFrameworks>netstandard2.1</TargetFrameworks>
<WarningLevel>5</WarningLevel>
<IsTestProject>false</IsTestProject>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
Expand All @@ -19,16 +19,16 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.1.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="MinVer" Version="2.0.0" PrivateAssets="All" />

<PackageReference Include="FSharp.Core" Version="3.1.2.5" Condition=" '$(TargetFramework)' != 'netstandard2.0' " />
<PackageReference Include="FSharp.Core" Version="4.3.4" Condition=" '$(TargetFramework)' == 'netstandard2.0' " />

<PackageReference Include="FsCodec.NewtonsoftJson" Version="2.0.0" />
<PackageReference Include="FSharp.Control.AsyncSeq" Version="2.0.23" />
<PackageReference Include="Microsoft.Azure.DocumentDB" Version="2.2.0" Condition=" '$(TargetFramework)' != 'netstandard2.0' " />
<PackageReference Include="Microsoft.Azure.DocumentDB.Core" Version="2.2.0" Condition=" '$(TargetFramework)' == 'netstandard2.0' " />
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.1.1" />
<PackageReference Include="System.Runtime.Caching" Version="4.5.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(TestTargetFrameworks)</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<IsPackable>false</IsPackable>
<WarningLevel>5</WarningLevel>
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>
<DefineConstants Condition=" '$(TargetFramework)' == 'net461' ">NET461</DefineConstants>
</PropertyGroup>

<ItemGroup>
Expand All @@ -30,7 +29,6 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="Microsoft.Azure.Cosmos.Direct" Version="3.1.4" />
<PackageReference Include="Serilog.Sinks.Seq" Version="4.0.0" />
<Reference Include="System.Runtime.Caching" Condition=" '$(TargetFramework)' != 'netstandard2.0'" />
<PackageReference Include="unquote" Version="4.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
Expand Down
17 changes: 1 addition & 16 deletions tools/Equinox.Tool/Equinox.Tool.fsproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<OutputType>Exe</OutputType>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<WarningLevel>5</WarningLevel>
<IsTestProject>false</IsTestProject>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>
<DefineConstants Condition=" '$(TargetFramework)' == 'net461' ">$(DefineConstants);NET461</DefineConstants>

<PackageId>Equinox.Tool</PackageId>
<AssemblyName>eqx</AssemblyName>
Expand Down Expand Up @@ -45,20 +44,6 @@
<PackageReference Include="Serilog.Sinks.Seq" Version="4.0.0" />
</ItemGroup>

<!-- bundle the net461 exe inside the .net core tool package -->
<PropertyGroup Condition=" '$(PackAsTool)' == 'true' ">
<TargetFrameworks></TargetFrameworks>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

<ItemGroup Condition=" '$(PackAsTool)' == 'true' ">
<Content Include="$(ThisDirAbsolute)/bin/equinox-tool/net461/*">
<Pack>true</Pack>
<PackagePath>tools\net461\any\%(Filename)%(Extension)</PackagePath>
<Visible>true</Visible>
</Content>
</ItemGroup>

<!-- workaround for not being able to make Backend and Domain as inlined in a complete way https://github.com/nuget/home/issues/3891#issuecomment-377319939 -->
<Target Name="CopyProjectReferencesToPackage" DependsOnTargets="ResolveReferences">
<ItemGroup>
Expand Down

0 comments on commit c631161

Please sign in to comment.