diff --git a/CHANGELOG.md b/CHANGELOG.md
index dabab767a..255be318d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,18 +8,23 @@ The `Unreleased` section name is replaced by the expected version of next releas
## [Unreleased]
+### Added
+### Changed
+### Removed
+### Fixed
+
+
+## [2.0.0] - 2020-02-19
+
### Added
- `Stream.TransactAsyncEx`, exposing the `Core.ISyncContext` at conclusion of the sync operation, affording the ability to examine the post-state `Version` etc. (This paves the way for exposing [`SessionToken`](https://github.com/jet/equinox/issues/192) at a later point without a breaking change) [#194](https://github.com/jet/equinox/pull/194)
### Changed
-- `Stream.QueryEx` to supply `Core.ISyncContext` in lieu of only exposing `Version` (to align with `TransactAsyncEx`) [#194](https://github.com/jet/equinox/pull/194)
+- `Stream.QueryEx` to supply `Core.ISyncContext` in lieu of only exposing `Version` (to align with `TransactAsyncEx`) [#194](https://github.com/jet/equinox/pull/194)
+- Target `FsCodec` v `2.0.0`
-### Removed
-### Fixed
-
-
## [2.0.0-rc9] - 2020-01-31
@@ -362,7 +367,8 @@ The `Unreleased` section name is replaced by the expected version of next releas
(For information pertaining to earlier releases, see release notes in https://github.com/jet/equinox/releases and/or can someone please add it!)
-[Unreleased]: https://github.com/jet/equinox/compare/2.0.0-rc9...HEAD
+[Unreleased]: https://github.com/jet/equinox/compare/2.0.0...HEAD
+[2.0.0]: https://github.com/jet/equinox/compare/2.0.0-rc9...2.0.0
[2.0.0-rc9]: https://github.com/jet/equinox/compare/2.0.0-rc8...2.0.0-rc9
[2.0.0-rc8]: https://github.com/jet/equinox/compare/2.0.0-rc7...2.0.0-rc8
[2.0.0-rc7]: https://github.com/jet/equinox/compare/2.0.0-rc6...2.0.0-rc7
diff --git a/samples/Store/Domain/Domain.fsproj b/samples/Store/Domain/Domain.fsproj
index 1cce48946..295e2de15 100644
--- a/samples/Store/Domain/Domain.fsproj
+++ b/samples/Store/Domain/Domain.fsproj
@@ -21,8 +21,7 @@
-
-
+
diff --git a/src/Equinox.Cosmos/Cosmos.fs b/src/Equinox.Cosmos/Cosmos.fs
index b64737e4f..62b4424e8 100644
--- a/src/Equinox.Cosmos/Cosmos.fs
+++ b/src/Equinox.Cosmos/Cosmos.fs
@@ -39,9 +39,10 @@ type []
member __.EventType = __.c
member __.Data = __.d
member __.Meta = __.m
- member __.Timestamp = __.t
+ member __.EventId = Guid.Empty
member __.CorrelationId = __.correlationId
member __.CausationId = __.causationId
+ member __.Timestamp = __.t
/// A 'normal' (frozen, not Tip) Batch of Events (without any Unfolds)
type []
@@ -185,7 +186,7 @@ type Direction = Forward | Backward override this.ToString() = match this with F
type internal Enum() =
static member internal Events(b: Tip) : ITimelineEvent seq =
- b.e |> Seq.mapi (fun offset x -> FsCodec.Core.TimelineEvent.Create(b.i + int64 offset, x.c, x.d, x.m, x.correlationId, x.causationId, x.t))
+ b.e |> Seq.mapi (fun offset x -> FsCodec.Core.TimelineEvent.Create(b.i + int64 offset, x.c, x.d, x.m, Guid.Empty, x.correlationId, x.causationId, x.t))
static member Events(i: int64, e: Event[], startPos : Position option, direction) : ITimelineEvent seq = seq {
// If we're loading from a nominated position, we need to discard items in the batch before/after the start on the start page
let isValidGivenStartPos i =
@@ -197,12 +198,12 @@ type internal Enum() =
let index = i + int64 offset
if isValidGivenStartPos index then
let x = e.[offset]
- yield FsCodec.Core.TimelineEvent.Create(index, x.c, x.d, x.m, x.correlationId, x.causationId, x.t) }
+ yield FsCodec.Core.TimelineEvent.Create(index, x.c, x.d, x.m, Guid.Empty, x.correlationId, x.causationId, x.t) }
static member internal Events(b: Batch, startPos, direction) =
Enum.Events(b.i, b.e, startPos, direction)
|> if direction = Direction.Backward then System.Linq.Enumerable.Reverse else id
static member Unfolds(xs: Unfold[]) : ITimelineEvent seq = seq {
- for x in xs -> FsCodec.Core.TimelineEvent.Create(x.i, x.c, x.d, x.m, null, null, x.t, isUnfold=true) }
+ for x in xs -> FsCodec.Core.TimelineEvent.Create(x.i, x.c, x.d, x.m, Guid.Empty, null, null, x.t, isUnfold=true) }
static member EventsAndUnfolds(x: Tip): ITimelineEvent seq =
Enum.Events x
|> Seq.append (Enum.Unfolds x.u)
diff --git a/src/Equinox.Cosmos/Equinox.Cosmos.fsproj b/src/Equinox.Cosmos/Equinox.Cosmos.fsproj
index df7f0f958..cd9d17dd6 100644
--- a/src/Equinox.Cosmos/Equinox.Cosmos.fsproj
+++ b/src/Equinox.Cosmos/Equinox.Cosmos.fsproj
@@ -25,7 +25,7 @@
-
+
diff --git a/src/Equinox.EventStore/Equinox.EventStore.fsproj b/src/Equinox.EventStore/Equinox.EventStore.fsproj
index 37c8ace98..b7c6b71d3 100644
--- a/src/Equinox.EventStore/Equinox.EventStore.fsproj
+++ b/src/Equinox.EventStore/Equinox.EventStore.fsproj
@@ -26,7 +26,7 @@
-
+
diff --git a/src/Equinox.EventStore/EventStore.fs b/src/Equinox.EventStore/EventStore.fs
index 6ac9dfe04..feef7ff7a 100755
--- a/src/Equinox.EventStore/EventStore.fs
+++ b/src/Equinox.EventStore/EventStore.fs
@@ -301,12 +301,12 @@ module UnionEncoderAdapters =
let ts = DateTimeOffset.FromUnixTimeMilliseconds(e.CreatedEpoch)
// TOCONSIDER wire e.Metadata.["$correlationId"] and .["$causationId"] into correlationId and causationId
// https://eventstore.org/docs/server/metadata-and-reserved-names/index.html#event-metadata
- FsCodec.Core.TimelineEvent.Create(e.EventNumber, e.EventType, e.Data, e.Metadata, correlationId = null, causationId = null, timestamp = ts)
+ FsCodec.Core.TimelineEvent.Create(e.EventNumber, e.EventType, e.Data, e.Metadata, e.EventId, correlationId = null, causationId = null, timestamp = ts)
let eventDataOfEncodedEvent (x : FsCodec.IEventData) =
// TOCONSIDER wire x.CorrelationId, x.CausationId into x.Meta.["$correlationId"] and .["$causationId"]
// https://eventstore.org/docs/server/metadata-and-reserved-names/index.html#event-metadata
- EventData(Guid.NewGuid(), x.EventType, isJson = true, data = x.Data, metadata = x.Meta)
+ EventData(x.EventId, x.EventType, isJson = true, data = x.Data, metadata = x.Meta)
type Stream = { name : string }
type Position = { streamVersion : int64; compactionEventNumber : int64 option; batchCapacityLimit : int option }
diff --git a/src/Equinox.MemoryStore/Equinox.MemoryStore.fsproj b/src/Equinox.MemoryStore/Equinox.MemoryStore.fsproj
index 849fc6467..5eeae410f 100644
--- a/src/Equinox.MemoryStore/Equinox.MemoryStore.fsproj
+++ b/src/Equinox.MemoryStore/Equinox.MemoryStore.fsproj
@@ -23,8 +23,8 @@
-
-
+
+
\ No newline at end of file
diff --git a/src/Equinox.MemoryStore/MemoryStore.fs b/src/Equinox.MemoryStore/MemoryStore.fs
index 794096e43..74e6fc994 100644
--- a/src/Equinox.MemoryStore/MemoryStore.fs
+++ b/src/Equinox.MemoryStore/MemoryStore.fs
@@ -66,7 +66,7 @@ type Category<'event, 'state, 'context, 'Format>(store : VolatileStore<'Format>,
| Some (Decode events) -> return Token.ofEventArray streamName fold initial events }
member __.TrySync(_log, Token.Unpack token, state, events : 'event list, context : 'context option) = async {
let inline map i (e : FsCodec.IEventData<'Format>) =
- FsCodec.Core.TimelineEvent.Create(int64 i,e.EventType,e.Data,e.Meta,e.CorrelationId,e.CausationId,e.Timestamp)
+ FsCodec.Core.TimelineEvent.Create(int64 i, e.EventType, e.Data, e.Meta, e.EventId, e.CorrelationId, e.CausationId, e.Timestamp)
let encoded : FsCodec.ITimelineEvent<_>[] = events |> Seq.mapi (fun i e -> map (token.streamVersion+i) (codec.Encode(context,e))) |> Array.ofSeq
let trySyncValue currentValue =
if Array.length currentValue <> token.streamVersion + 1 then ConcurrentDictionarySyncResult.Conflict (token.streamVersion)
diff --git a/src/Equinox.SqlStreamStore/Equinox.SqlStreamStore.fsproj b/src/Equinox.SqlStreamStore/Equinox.SqlStreamStore.fsproj
index 678ac9448..9454e4b78 100644
--- a/src/Equinox.SqlStreamStore/Equinox.SqlStreamStore.fsproj
+++ b/src/Equinox.SqlStreamStore/Equinox.SqlStreamStore.fsproj
@@ -24,7 +24,7 @@
-
+
diff --git a/src/Equinox.SqlStreamStore/SqlStreamStore.fs b/src/Equinox.SqlStreamStore/SqlStreamStore.fs
index edad1e0fe..d1cc56d69 100644
--- a/src/Equinox.SqlStreamStore/SqlStreamStore.fs
+++ b/src/Equinox.SqlStreamStore/SqlStreamStore.fs
@@ -282,12 +282,12 @@ module UnionEncoderAdapters =
let (Bytes meta) = e.JsonMetadata
// TOCONSIDER wire x.CorrelationId, x.CausationId into x.Meta.["$correlationId"] and .["$causationId"]
// https://eventstore.org/docs/server/metadata-and-reserved-names/index.html#event-metadata
- FsCodec.Core.TimelineEvent.Create(int64 e.StreamVersion, e.Type, data, meta, null, null, let ts = e.CreatedUtc in DateTimeOffset ts)
+ FsCodec.Core.TimelineEvent.Create(int64 e.StreamVersion, e.Type, data, meta, e.MessageId, null, null, let ts = e.CreatedUtc in DateTimeOffset ts)
let eventDataOfEncodedEvent (x : FsCodec.IEventData) =
let str = function null -> null | s -> System.Text.Encoding.UTF8.GetString s
// TOCONSIDER wire x.CorrelationId, x.CausationId into x.Meta.["$correlationId"] and .["$causationId"]
// https://eventstore.org/docs/server/metadata-and-reserved-names/index.html#event-metadata
- NewStreamMessage(Guid.NewGuid(), x.EventType, str x.Data, str x.Meta)
+ NewStreamMessage(x.EventId, x.EventType, str x.Data, str x.Meta)
type Stream = { name: string }
type Position = { streamVersion: int64; compactionEventNumber: int64 option; batchCapacityLimit: int option }
diff --git a/tests/Equinox.EventStore.Integration/Equinox.EventStore.Integration.fsproj b/tests/Equinox.EventStore.Integration/Equinox.EventStore.Integration.fsproj
index 43bc0a903..4ea55867f 100644
--- a/tests/Equinox.EventStore.Integration/Equinox.EventStore.Integration.fsproj
+++ b/tests/Equinox.EventStore.Integration/Equinox.EventStore.Integration.fsproj
@@ -22,7 +22,7 @@
-
+