Skip to content

Commit

Permalink
Merge branch 'remove-streamresult' into project-unfolds
Browse files Browse the repository at this point in the history
  • Loading branch information
bartelink committed Jul 15, 2024
2 parents c7d5041 + c4c09df commit c9a47fe
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 36 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The `Unreleased` section name is replaced by the expected version of next releas
### Removed

- `Streams.StreamSpan`: Changed from a record to individual arguments of `FsCodec.StreamName` and `Sinks.Event[]` [#169](https://github.com/jet/propulsion/pull/169) [#208](https://github.com/jet/propulsion/pull/208)
- `Streams.SpanResult`: Replaced with returning an `int64` to reflect the updated position [#263](https://github.com/jet/propulsion/pull/263) [#208](https://github.com/jet/propulsion/pull/208)
- `Streams.SpanResult`: Replaced with `int64` to reflect the updated position [#264](https://github.com/jet/propulsion/pull/264) [#208](https://github.com/jet/propulsion/pull/208)
- `Streams`: `statsInterval` is obtained from the `Stats` wherever one is supplied [#208](https://github.com/jet/propulsion/pull/208)
- `Propulsion.Cosmos`: Should not be in general use - users should port to `Propulsion.CosmosStore3`, then `Propulsion.CosmosStore` [#193](https://github.com/jet/propulsion/pull/193)
- `Destructurama.FSharp` dependency [#152](https://github.com/jet/propulsion/pull/152)
Expand Down
5 changes: 2 additions & 3 deletions src/Propulsion.CosmosStore/CosmosStoreSink.fs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ module private Impl =
type EventBody = byte[] // V4 defines one directly, here we shim it
module StreamSpan =

let private toNativeEventBody (xs: Propulsion.Sinks.EventBody): byte[] = xs.ToArray()
let defaultToNative_ = FsCodec.Core.TimelineEvent.Map toNativeEventBody
let toNativeEventBody (xs: Propulsion.Sinks.EventBody): byte[] = xs.ToArray()
// Trimmed edition of what V4 exposes
module internal Equinox =
module CosmosStore =
Expand All @@ -36,7 +35,7 @@ module private Impl =
open System.Text.Json
let toNativeEventBody (x: EventBody): JsonElement =
if x.IsEmpty then JsonElement()
else JsonSerializer.Deserialize<JsonElement>(x.Span)
else JsonSerializer.Deserialize(x.Span)
#endif

module Internal =
Expand Down
7 changes: 4 additions & 3 deletions src/Propulsion.CosmosStore/Propulsion.CosmosStore.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<PackageValidationBaselineVersion>3.0.0-rc.13</PackageValidationBaselineVersion>
<!-- <PackageValidationBaselineVersion>3.0.0-rc.14</PackageValidationBaselineVersion>-->
</PropertyGroup>

<ItemGroup>
Expand All @@ -26,8 +26,9 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion\Propulsion.fsproj" />
<PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion" Version="[3.0.0-rc.13, 4.0.0)" />
<ProjectReference Include="..\Propulsion\Propulsion.fsproj" />
<!-- <ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion\Propulsion.fsproj" />-->
<!-- <PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion" Version="[3.0.0-rc.14, 4.0.0)" />-->
</ItemGroup>

</Project>
7 changes: 4 additions & 3 deletions src/Propulsion.CosmosStore3/Propulsion.CosmosStore3.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<PackageValidationBaselineVersion>3.0.0-rc.13</PackageValidationBaselineVersion>
<!-- <PackageValidationBaselineVersion>3.0.0-rc.14</PackageValidationBaselineVersion>-->
<DefineConstants>COSMOSV3</DefineConstants>
</PropertyGroup>

Expand Down Expand Up @@ -45,8 +45,9 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion\Propulsion.fsproj" />
<PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion" Version="[3.0.0-rc.13, 4.0.0)" />
<ProjectReference Include="..\Propulsion\Propulsion.fsproj" />
<!-- <ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion\Propulsion.fsproj" />-->
<!-- <PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion" Version="[3.0.0-rc.14, 4.0.0)" />-->
</ItemGroup>

</Project>
7 changes: 4 additions & 3 deletions src/Propulsion.DynamoStore/Propulsion.DynamoStore.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<!-- <PackageValidationBaselineVersion>3.0.0-rc.12</PackageValidationBaselineVersion>-->
<!-- <PackageValidationBaselineVersion>3.0.0-rc.14</PackageValidationBaselineVersion>-->
<DefineConstants>DYNAMOSTORE</DefineConstants>
</PropertyGroup>

Expand All @@ -31,8 +31,9 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion.Feed\Propulsion.Feed.fsproj" />
<PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion.Feed" Version="[3.0.0-rc.13, 4.0.0)" />
<ProjectReference Include="..\Propulsion.Feed\Propulsion.Feed.fsproj" />
<!-- <ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion.Feed\Propulsion.Feed.fsproj" />-->
<!-- <PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion.Feed" Version="[3.0.0-rc.14, 4.0.0)" />-->
</ItemGroup>

</Project>
7 changes: 4 additions & 3 deletions src/Propulsion.EventStore/Propulsion.EventStore.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<!-- <PackageValidationBaselineVersion>3.0.0-rc.12</PackageValidationBaselineVersion>-->
<!-- <PackageValidationBaselineVersion>3.0.0-rc.14</PackageValidationBaselineVersion>-->
<DefineConstants>EVENTSTORE_LEGACY</DefineConstants>
</PropertyGroup>

Expand All @@ -24,8 +24,9 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion\Propulsion.fsproj" />
<PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion" Version="[3.0.0-rc.13, 4.0.0)" />
<ProjectReference Include="..\Propulsion\Propulsion.fsproj" />
<!-- <ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion\Propulsion.fsproj" />-->
<!-- <PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion" Version="[3.0.0-rc.14, 4.0.0)" />-->
</ItemGroup>

</Project>
7 changes: 4 additions & 3 deletions src/Propulsion.EventStoreDb/Propulsion.EventStoreDb.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<!-- <PackageValidationBaselineVersion>3.0.0-rc.12</PackageValidationBaselineVersion>-->
<!-- <PackageValidationBaselineVersion>3.0.0-rc.14</PackageValidationBaselineVersion>-->
</PropertyGroup>

<ItemGroup>
Expand All @@ -22,8 +22,9 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion.Feed\Propulsion.Feed.fsproj" />
<PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion.Feed" Version="[3.0.0-rc.13, 4.0.0)" />
<ProjectReference Include="..\Propulsion.Feed\Propulsion.Feed.fsproj" />
<!-- <ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion.Feed\Propulsion.Feed.fsproj" />-->
<!-- <PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion.Feed" Version="[3.0.0-rc.14, 4.0.0)" />-->
</ItemGroup>

</Project>
7 changes: 4 additions & 3 deletions src/Propulsion.Feed/Propulsion.Feed.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<PackageValidationBaselineVersion>3.0.0-rc.13</PackageValidationBaselineVersion>
<!-- <PackageValidationBaselineVersion>3.0.0-rc.14</PackageValidationBaselineVersion>-->
</PropertyGroup>

<ItemGroup>
Expand All @@ -22,8 +22,9 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion\Propulsion.fsproj" />
<PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion" Version="[3.0.0-rc.13, 4.0.0)" />
<ProjectReference Include="..\Propulsion\Propulsion.fsproj" />
<!-- <ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion\Propulsion.fsproj" />-->
<!-- <PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion" Version="[3.0.0-rc.14, 4.0.0)" />-->
</ItemGroup>

</Project>
5 changes: 3 additions & 2 deletions src/Propulsion.Kafka/Propulsion.Kafka.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<!-- <PackageValidationBaselineVersion>3.0.0-rc.12</PackageValidationBaselineVersion>-->
<!-- <PackageValidationBaselineVersion>3.0.0-rc.14</PackageValidationBaselineVersion>-->
</PropertyGroup>

<ItemGroup>
Expand All @@ -22,8 +22,9 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Propulsion\Propulsion.fsproj" />
<ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion\Propulsion.fsproj" />
<PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion" Version="[3.0.0-rc.13, 4.0.0)" />
<PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion" Version="[3.0.0-rc.14, 4.0.0)" />
</ItemGroup>

</Project>
7 changes: 4 additions & 3 deletions src/Propulsion.MemoryStore/Propulsion.MemoryStore.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<PackageValidationBaselineVersion>3.0.0-rc.13</PackageValidationBaselineVersion>
<!-- <PackageValidationBaselineVersion>3.0.0-rc.14</PackageValidationBaselineVersion>-->
<DefineConstants>MEMORYSTORE</DefineConstants>
</PropertyGroup>

Expand All @@ -26,8 +26,9 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion\Propulsion.fsproj" />
<PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion" Version="[3.0.0-rc.13, 4.0.0)" />
<ProjectReference Include="..\Propulsion\Propulsion.fsproj" />
<!-- <ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion\Propulsion.fsproj" />-->
<!-- <PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion" Version="[3.0.0-rc.14, 4.0.0)" />-->
</ItemGroup>

</Project>
7 changes: 4 additions & 3 deletions src/Propulsion.MessageDb/Propulsion.MessageDb.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<!-- <PackageValidationBaselineVersion>3.0.0-rc.12</PackageValidationBaselineVersion>-->
<!-- <PackageValidationBaselineVersion>3.0.0-rc.14</PackageValidationBaselineVersion>-->
</PropertyGroup>

<ItemGroup>
Expand All @@ -21,8 +21,9 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion.Feed\Propulsion.Feed.fsproj" />
<PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion.Feed" Version="[3.0.0-rc.13, 4.0.0)" />
<ProjectReference Include="..\Propulsion.Feed\Propulsion.Feed.fsproj" />
<!-- <ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion.Feed\Propulsion.Feed.fsproj" />-->
<!-- <PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion.Feed" Version="[3.0.0-rc.14, 4.0.0)" />-->
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<!-- <PackageValidationBaselineVersion>3.0.0-rc.12</PackageValidationBaselineVersion>-->
<!-- <PackageValidationBaselineVersion>3.0.0-rc.14</PackageValidationBaselineVersion>-->
</PropertyGroup>

<ItemGroup>
Expand All @@ -22,8 +22,9 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion.Feed\Propulsion.Feed.fsproj" />
<PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion.Feed" Version="[3.0.0-rc.13, 4.0.0)" />
<ProjectReference Include="..\Propulsion.Feed\Propulsion.Feed.fsproj" />
<!-- <ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion.Feed\Propulsion.Feed.fsproj" />-->
<!-- <PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion.Feed" Version="[3.0.0-rc.14, 4.0.0)" />-->
</ItemGroup>

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

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<PackageValidationBaselineVersion>3.0.0-rc.13</PackageValidationBaselineVersion>
<!-- <PackageValidationBaselineVersion>3.0.0-rc.14</PackageValidationBaselineVersion>-->
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions tests/Propulsion.Tests/StreamStateTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ open Propulsion.Streams
open Swensen.Unquote
open Xunit

module FsCodecEx =
module FsCodec301 = // Not yet merged, https://github.com/jet/FsCodec/pull/123
open FsCodec
open System
/// <summary>An Event or Unfold that's been read from a Store and hence has a defined <c>Index</c> on the Event Timeline.</summary>
Expand Down Expand Up @@ -40,7 +40,7 @@ module FsCodecEx =
member _.CorrelationId = correlationId
member _.CausationId = causationId
member _.Timestamp = timestamp
open FsCodecEx
open FsCodec301

let canonicalTime = System.DateTimeOffset.UtcNow

Expand Down

0 comments on commit c9a47fe

Please sign in to comment.