Re: [capnproto] Schema Mismatch Between Client and Server

2023-02-14 Thread Matt Stern
Awesome, thanks so much! On Tue, Feb 14, 2023, 8:01 PM Kenton Varda wrote: > Hi Matt, > > Your idea would work initially, but if an @3 field were ever added, it > could end up incompatible. > > Instead, assuming `Internal` is a struct type, you can instead declare > `internal` to have type `AnyP

Re: [capnproto] Schema Mismatch Between Client and Server

2023-02-14 Thread 'Kenton Varda' via Cap'n Proto
Hi Matt, Your idea would work initially, but if an @3 field were ever added, it could end up incompatible. Instead, assuming `Internal` is a struct type, you can instead declare `internal` to have type `AnyPointer`: struct Event { union { foo @0 : Foo; bar @1 : Bar; internal @2: An

[capnproto] Schema Mismatch Between Client and Server

2023-02-14 Thread Matt Stern
Hi Capnp folks, I have a producer that writes events to a queue. The schema looks like: struct Event { union { foo @0 : Foo; bar @1 : Bar; internal @2 : Internal; } } There are downstream consumers of this queue that are meant to ignore the "internal" field -- in fact, we don't