capnproto / capnpc-rust

Cap'n Proto code generation for Rust
76 stars 26 forks source link

List(Interface) is unsupported #42

Closed timotree3 closed 6 years ago

timotree3 commented 6 years ago

When compiling this schema:

@0xffffffffffffffff;

interface Crop {
  harvest @0 () -> (food: Food);
}

struct Food {
  yumminess @0: UInt8;
}

struct Field {
  crops @0: List(Crop);
}

with the command capnp compile -orust schema.capnp, I get the output:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: Failed, description: "List(Interface) is unsupported" }', /checkout/src/libcore/result.rs:916:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.
rust: plugin failed: exit code 101

I expect it to compile successfully. capnp compile -oc++ schema.capnp does compile successfully.

dwrensha commented 6 years ago

Fixed in https://github.com/capnproto/capnproto-rust/commit/9e22c66497909fdb8b26f5b1baa11c9f95dd1ecf and https://github.com/capnproto/capnpc-rust/commit/b222f4c2408820edd768d8f336ea07ae8229777a. Released in https://crates.io/crates/capnpc/0.8.8.