jet / equinox

.NET event sourcing library with CosmosDB, DynamoDB, EventStoreDB, message-db, SqlStreamStore and integration test backends. Focused at stream level; see https://github.com/jet/propulsion for cross-stream projections/subscriptions/reactions

Home Page:https://github.com/jet/dotnet-templates

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

StreamId.gen2/3 - consider revert to struct tuples

bartelink opened this issue · comments

In Equinox as of v4, pretty much every tuple is now a ValueTuple. In general that only comes to the fore in the Func/Task lower level APIs. As part of #368, StreamId.gen moves to be a [class] Tuple.

While that removes some messiness from the code, I'm now unsure whether having that wart in there is a good long term decision. I know the perf is pretty irrelevant (which is why I did the flip).

So, consider this a notice that the .gen args might flip back to ValueTuple before the final V4 (the actual change involved would be tiny, but nonetheless is binary breaking and hence not something that is reasonable to do after a final V4 publishes). (a related consideration is that Propulsion might get some final fit and finish helpers, and this should align with how that settles wrt whether tuples are struct or not)

Turns out that gen's result can handle struct and non-struct tuples equally, happy days
(The convention will be to stick with non struct; people can adjust as and when the profiler tells them to)