Skip to content

Commit

Permalink
Update TaskSeq to 0.4.0-alpha.1 (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartelink authored Jun 5, 2023
1 parent edda98d commit 5cd8829
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 42 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The `Unreleased` section name is replaced by the expected version of next releas
- `CosmosStore.AccessStrategy.MultiSnapshot`,`Custom`: Change `list` and `seq` types to `array` [#338](https://github.com/jet/equinox/pull/338)
- `EventStore`: Target `EventStore.Client` v `22.0.0-preview`; rename `Connector` -> `EventStoreConnector` [#317](https://github.com/jet/equinox/pull/317)
- `Equinox.Tool`/`samples/`: switched to use `Equinox.EventStoreDb` [#196](https://github.com/jet/equinox/pull/196)
- Replace `AsyncSeq` usage with `FSharp.Control.TaskSeq` v `0.3.0` [#361](https://github.com/jet/equinox/pull/361)
- Replace `AsyncSeq` usage with `FSharp.Control.TaskSeq` v `0.4.0` [#361](https://github.com/jet/equinox/pull/361)
- Raise `FSharp.Core` requirement to `6.0.7` [#337](https://github.com/jet/equinox/pull/337) [#33](https://github.com/jet/equinox/pull/362)
- Update all Stores to use `FsCodec` v `3.0.0`, with [`EventBody` types switching from `byte[]` to `ReadOnlyMemory<byte>` and/or `JsonElement` see FsCodec#75](https://github.com/jet/FsCodec/pull/75) [#323](https://github.com/jet/equinox/pull/323)
- Update all non-Client dependencies except `FSharp.Core`, `FSharp.Control.AsyncSeq` [#310](https://github.com/jet/equinox/pull/310)
Expand Down
34 changes: 0 additions & 34 deletions src/Equinox.Core/Internal.fs
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,3 @@ module Log =
let [<return: Struct>] (|ScalarValue|_|): Serilog.Events.LogEventPropertyValue -> obj voption = function
| :? Serilog.Events.ScalarValue as x -> ValueSome x.Value
| _ -> ValueNone

#if !NO_TASK_SEQ
module TaskSeq =

open FSharp.Control

let takeWhile predicate (source: taskSeq<_>) = taskSeq {
use e = source.GetAsyncEnumerator(System.Threading.CancellationToken())
let! step = e.MoveNextAsync()
let mutable go = step
while go do
let value = e.Current
if predicate value then
yield value
let! more = e.MoveNextAsync()
go <- more
else
go <- false
}

let takeWhileInclusive predicate (source: taskSeq<_>) = taskSeq {
use e = source.GetAsyncEnumerator(System.Threading.CancellationToken())
let! step = e.MoveNextAsync()
let mutable go = step
while go do
let value = e.Current
yield value
if predicate value then
let! more = e.MoveNextAsync()
go <- more
else
go <- false
}
#endif
2 changes: 1 addition & 1 deletion src/Equinox.CosmosStore/Equinox.CosmosStore.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PackageReference Include="FSharp.Core" Version="6.0.7" />

<PackageReference Include="FsCodec" Version="3.0.0-rc.10" />
<PackageReference Include="FSharp.Control.TaskSeq" Version="0.3.0" />
<PackageReference Include="FSharp.Control.TaskSeq" Version="0.4.0-alpha.1" />
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.30.1" />
<PackageReference Include="System.Text.Json" Version="6.0.1" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Equinox.DynamoStore/Equinox.DynamoStore.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<PackageReference Include="FsCodec" Version="3.0.0-rc.10" />
<PackageReference Include="FSharp.AWS.DynamoDB" Version="0.11.2-beta" />
<PackageReference Include="FSharp.Control.TaskSeq" Version="0.3.0" />
<PackageReference Include="FSharp.Control.TaskSeq" Version="0.4.0-alpha.1" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Equinox.EventStore/Equinox.EventStore.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<PackageReference Include="EventStore.Client" Version="22.0.0-preview" />
<PackageReference Include="FsCodec" Version="3.0.0-rc.10" />
<PackageReference Include="FSharp.Control.TaskSeq" Version="0.3.0" />
<PackageReference Include="FSharp.Control.TaskSeq" Version="0.4.0-alpha.1" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Equinox.EventStoreDb/Equinox.EventStoreDb.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<PackageReference Include="EventStore.Client.Grpc.Streams" Version="22.0.0" />
<PackageReference Include="FsCodec" Version="3.0.0-rc.10" />
<PackageReference Include="FSharp.Control.TaskSeq" Version="0.3.0" />
<PackageReference Include="FSharp.Control.TaskSeq" Version="0.4.0-alpha.1" />
</ItemGroup>

</Project>
2 changes: 0 additions & 2 deletions src/Equinox.MessageDb/Equinox.MessageDb.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<DefineConstants>NO_TASK_SEQ</DefineConstants>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Equinox.SqlStreamStore/Equinox.SqlStreamStore.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<PackageReference Include="FSharp.Core" Version="6.0.7" />

<PackageReference Include="FsCodec" Version="3.0.0-rc.10" />
<PackageReference Include="FSharp.Control.TaskSeq" Version="0.3.0" />
<PackageReference Include="FSharp.Control.TaskSeq" Version="0.4.0-alpha.1" />
<PackageReference Include="SqlStreamStore" Version="1.2.0-beta.8" />
</ItemGroup>

Expand Down

0 comments on commit 5cd8829

Please sign in to comment.