servicetitan / Stl.Fusion

Build real-time apps (Blazor included) with less than 1% of extra code responsible for real-time updates. Host 10-1000x faster APIs relying on transparent and nearly 100% consistent caching. We call it DREAM, or Distributed REActive Memoization, and it's here to turn real-time on!
MIT License
1.85k stars 108 forks source link

`MemoryPack` version compatiblity #678

Closed adambajguz closed 3 months ago

adambajguz commented 3 months ago

The library is not compatible with MemoryPack > 1.10.0 resulting in the following runtime error:

Couldn't serialize the value of type 'Stl.Rpc.Infrastructure.RpcMessage'
                   <s:Stl.Rpc.WebSockets.WebSocketChannel>
[("HResult": -2146233069), ("Message": "Method not found: 'Void MemoryPack.Formatters.ListFormatter.SerializePackable(MemoryPack.MemoryPackWriter`1<!!1> ByRef, System.Collections.Generic.List`1<System.__Canon> ByRef)'."), ("Source": "Stl.Rpc"), ("TargetSite": "Void MemoryPack.IMemoryPackable<Stl.Rpc.Infrastructure.RpcMessage>.Serialize[TBufferWriter](MemoryPack.MemoryPackWriter`1[TBufferWriter] ByRef, Stl.Rpc.Infrastructure.RpcMessage ByRef)"), ("Type": "System.MissingMethodException")]System.MissingMethodException: Method not found: 'Void MemoryPack.Formatters.ListFormatter.SerializePackable(MemoryPack.MemoryPackWriter`1<!!1> ByRef, System.Collections.Generic.List`1<System.__Canon> ByRef)'.
   at Stl.Rpc.Infrastructure.RpcMessage.MemoryPack.IMemoryPackable<Stl.Rpc.Infrastructure.RpcMessage>.Serialize[TBufferWriter](MemoryPackWriter`1& writer, RpcMessage& value)
   at MemoryPack.Formatters.MemoryPackableFormatter`1.Serialize[TBufferWriter](MemoryPackWriter`1& writer, T& value)
   at MemoryPack.MemoryPackSerializer.Serialize[T,TBufferWriter](TBufferWriter& bufferWriter, T& value, MemoryPackSerializerOptions options)
   at Stl.Serialization.MemoryPackByteSerializer`1.Write(IBufferWriter`1 bufferWriter, T value)
   at Stl.Rpc.WebSockets.WebSocketChannel`1.TrySerialize(T value, ArrayPoolBuffer`1 buffer)

Can you please update the MemoryPack version?

adambajguz commented 3 months ago

Moved to https://github.com/ActualLab/Fusion/issues/21