[capnproto] Nested lists with pycapnp

2020-11-27 Thread Wichert Akkerman
Hi everyone,

I have a schema that uses a two-dimensional list. The schema looks like 
this:

struct Feature {
  coordinates @4 :List(List(Float64));
}

Where coordinates will be a list of 2-item lists. I can initialise the 
outer list easily:

feature = geo_schema.Feature.new_message()
coordinates = feature.init("coordinates", 10)

But I can't seem to initialise the inner lists. Is there a trick I'm 
missing?

Regards,
Wichert.

-- 
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/41ffdedc-f0a8-47b4-b687-2828bc7bebfen%40googlegroups.com.


Re: [capnproto] Schema Refactoring and Unique IDs

2020-11-27 Thread 'Kenton Varda' via Cap'n Proto
On Wed, Nov 25, 2020 at 3:43 PM Matt Stern  wrote:

> When I try to run capnp compile, I get the following:
>
> error: Import failed: /capnp/java.capnp
>

You will need to specify the same -I flags (import path) that you normally
specify to `capnp compile` when running the Java code generator.

If I comment out the Java bits and just compile in C++ (which works for
> me), will this have any effect on the unique IDs for the structs in my
> schema file?
>

No, the auto-generated IDs do not in any way depend on the contents of
other files. Auto-generated IDs are constructed by concatenating the parent
scope ID and the type name, and then taking a hash of that.

-Kenton

-- 
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/CAJouXQ%3DgWcj8%2BbKitcAn3jSqXYmKbpLsd_wZRRQ8jaPJym7yVQ%40mail.gmail.com.