Skip to content

Commit c631161

Browse files
committed
Change Cosmos to netstandard2.1, tools to netcoreapp3.1
1 parent c088190 commit c631161

File tree

8 files changed

+11
-55
lines changed

8 files changed

+11
-55
lines changed

build.proj

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
<Exec Command="dotnet pack src/Equinox.SqlStreamStore.MySql $(Cfg) $(PackOptions)" />
2525
<Exec Command="dotnet pack src/Equinox.SqlStreamStore.Postgres $(Cfg) $(PackOptions)" />
2626
<Exec Command="dotnet pack tools/Equinox.Tools.TestHarness $(Cfg) $(PackOptions)" />
27-
<Exec Command='dotnet publish tools/Equinox.Tool $(Cfg) -f net461 -o "$(ThisDirAbsolute)/bin/equinox-tool/net461" ' />
2827
<Exec Command="dotnet pack tools/Equinox.Tool $(Cfg) $(PackOptions) /p:PackAsTool=true" />
2928
</Target>
3029

samples/Infrastructure/Infrastructure.fsproj

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

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

4441
</Project>

samples/Store/Integration/Integration.fsproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>$(TestTargetFrameworks)</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<WarningLevel>5</WarningLevel>
77
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>

samples/Tutorial/Tutorial.fsproj

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.1</TargetFrameworks>
55
<WarningLevel>5</WarningLevel>
66
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
77
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
@@ -31,8 +31,7 @@
3131
</ItemGroup>
3232

3333
<ItemGroup>
34-
<PackageReference Include="FSharp.Core" Version="3.1.2.5" Condition=" '$(TargetFramework)' == 'net461' " />
35-
<PackageReference Include="FSharp.Core" Version="4.3.4" Condition=" '$(TargetFramework)' == 'netstandard2.0' " />
34+
<PackageReference Include="FSharp.Core" Version="4.3.4" />
3635

3736
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
3837
<PackageReference Include="Serilog.Sinks.Seq" Version="4.0.0" />

src/Equinox.Core/Infrastructure.fs

+1-23
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ open System.Threading.Tasks
99

1010
type OAttribute = System.Runtime.InteropServices.OptionalAttribute
1111
type DAttribute = System.Runtime.InteropServices.DefaultParameterValueAttribute
12-
12+
1313
#if NET461
1414
module Array =
1515
let tryHead (array : 'T[]) =
@@ -68,28 +68,6 @@ type Async with
6868
sc ())
6969
|> ignore)
7070

71-
#if !NO_ASYNCSEQ
72-
module AsyncSeq =
73-
/// Same as takeWhileAsync, but returns the final element too
74-
let takeWhileInclusiveAsync p (source : AsyncSeq<'T>) : AsyncSeq<_> = asyncSeq {
75-
use ie = source.GetEnumerator()
76-
let! move = ie.MoveNext()
77-
let b = ref move
78-
while b.Value.IsSome do
79-
let v = b.Value.Value
80-
yield v
81-
let! res = p v
82-
if res then
83-
let! moven = ie.MoveNext()
84-
b := moven
85-
else
86-
b := None }
87-
88-
/// Same as takeWhile, but returns the final element too
89-
let takeWhileInclusive p (source : AsyncSeq<'T>) =
90-
takeWhileInclusiveAsync (p >> async.Return) source
91-
#endif
92-
9371
[<RequireQualifiedAccess>]
9472
module Regex =
9573
open System.Text.RegularExpressions

src/Equinox.Cosmos/Equinox.Cosmos.fsproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.1</TargetFrameworks>
55
<WarningLevel>5</WarningLevel>
66
<IsTestProject>false</IsTestProject>
77
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
@@ -19,16 +19,16 @@
1919
</ItemGroup>
2020

2121
<ItemGroup>
22+
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.1.0" />
2223
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
2324
<PackageReference Include="MinVer" Version="2.0.0" PrivateAssets="All" />
2425

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

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

3434
</Project>

tests/Equinox.Cosmos.Integration/Equinox.Cosmos.Integration.fsproj

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>$(TestTargetFrameworks)</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<WarningLevel>5</WarningLevel>
77
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>
8-
<DefineConstants Condition=" '$(TargetFramework)' == 'net461' ">NET461</DefineConstants>
98
</PropertyGroup>
109

1110
<ItemGroup>
@@ -30,7 +29,6 @@
3029
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
3130
<PackageReference Include="Microsoft.Azure.Cosmos.Direct" Version="3.1.4" />
3231
<PackageReference Include="Serilog.Sinks.Seq" Version="4.0.0" />
33-
<Reference Include="System.Runtime.Caching" Condition=" '$(TargetFramework)' != 'netstandard2.0'" />
3432
<PackageReference Include="unquote" Version="4.0" />
3533
<PackageReference Include="xunit" Version="2.4.1" />
3634
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />

tools/Equinox.Tool/Equinox.Tool.fsproj

+1-16
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
55
<OutputType>Exe</OutputType>
66
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
77
<WarningLevel>5</WarningLevel>
88
<IsTestProject>false</IsTestProject>
99
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
1010
<DisableImplicitSystemValueTupleReference>true</DisableImplicitSystemValueTupleReference>
11-
<DefineConstants Condition=" '$(TargetFramework)' == 'net461' ">$(DefineConstants);NET461</DefineConstants>
1211

1312
<PackageId>Equinox.Tool</PackageId>
1413
<AssemblyName>eqx</AssemblyName>
@@ -45,20 +44,6 @@
4544
<PackageReference Include="Serilog.Sinks.Seq" Version="4.0.0" />
4645
</ItemGroup>
4746

48-
<!-- bundle the net461 exe inside the .net core tool package -->
49-
<PropertyGroup Condition=" '$(PackAsTool)' == 'true' ">
50-
<TargetFrameworks></TargetFrameworks>
51-
<TargetFramework>netcoreapp3.1</TargetFramework>
52-
</PropertyGroup>
53-
54-
<ItemGroup Condition=" '$(PackAsTool)' == 'true' ">
55-
<Content Include="$(ThisDirAbsolute)/bin/equinox-tool/net461/*">
56-
<Pack>true</Pack>
57-
<PackagePath>tools\net461\any\%(Filename)%(Extension)</PackagePath>
58-
<Visible>true</Visible>
59-
</Content>
60-
</ItemGroup>
61-
6247
<!-- 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 -->
6348
<Target Name="CopyProjectReferencesToPackage" DependsOnTargets="ResolveReferences">
6449
<ItemGroup>

0 commit comments

Comments
 (0)