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]capnproto+unsubscr...@googlegroups.com. > 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:capnproto+unsubscr...@googlegroups.com > 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 capnproto+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/capnproto/160634320393.56972.10562251039007210649%40localhost.localdomain.