Great, thanks everyone. I will get the current unique ID from the capnp tool and specify it explicitly for my struct before I do my refactoring.
On Wed, Nov 25, 2020, 5:26 PM Ian Denhardt <[email protected]> wrote: > The ID doesn't affect the encoding itself, so the basic things will > still work. > > > You can avoid changing the id by specifying it explicitly, e.g. > > struct Bar 0xfeefefffefeefefe { > val @0 :UInt32; > } > > You can discover the current id by running: > > capnp compile -ocapnp myschema.capnp > > Which will output a version of the schema including the ids, as well as > some other information. > > -Ian > > Quoting Matt Stern (2020-11-25 14:39:01) > > Hi all, > > > > Suppose I have a simple schema file: > > > > 0xabbeabbeabbeabbe; > > > > struct Foo { > > > > val @0 : UInt32; > > > > }; > > > > struct Bar { > > val @1 : UInt32; > > }; > > > > I would like to move Bar into a separate schema file. If I understand > > the [1]docs correctly, then this will change Bar's unique ID. > > > > I have two questions about that: > > > > 1. Will changing Bar's unique ID cause backwards incompatibility with > > old messages that are serialized with the old ID? > > 2. If so, what can I do to prevent this? I would like my change to > > have no side-effects (a pure no-op). > > > > Thanks! > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Cap'n Proto" group. > > To unsubscribe from this group and stop receiving emails from it, send > > an email to [2][email protected]. > > To view this discussion on the web visit > > [3] > https://groups.google.com/d/msgid/capnproto/aa247efb-ca69-40fa-97a7- > > 415792fd0c1dn%40googlegroups.com. > > > > Verweise > > > > 1. https://capnproto.org/language.html#unique-ids > > 2. mailto:[email protected] > > 3. > https://groups.google.com/d/msgid/capnproto/aa247efb-ca69-40fa-97a7-415792fd0c1dn%40googlegroups.com?utm_medium=email&utm_source=footer > -- You received this message because you are subscribed to the Google Groups "Cap'n Proto" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/capnproto/CAL717_QtdWwfHQCK4NbEU8%2BHymqgsKg_kQ-i3cO9Yt19fxb0SQ%40mail.gmail.com.
