You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
structGatewayMsg {
daqs @0:List(DaqMsg);
seq @1:UInt64;
title @2:Text;
version @3:Text;
datetime @4:Text;
health @5: UInt16;
structDaqMsg {
mdata @0:Data;
}
}
And I get the error:
rror[E0433]: failed to resolve: could not find foo_capnp in {{root}}
--> /home/gibsond/rust_projs/es1800_zmqsubr/target/debug/build/es1800_zmqsubr-fbe222f1c797ab23/out/foo_capnp.rs:326:80
|
326 | pub fn get_daqs(self) -> ::capnp::Result<::capnp::struct_list::Reader<'a,::foo_capnp::gateway_msg::daq_msg::Owned>> {
| ^^^^^^^^^ could not find foo_capnp in {{root}}
error[E0433]: failed to resolve: could not find foo_capnp in {{root}}
--> /home/gibsond/rust_projs/es1800_zmqsubr/target/debug/build/es1800_zmqsubr-fbe222f1c797ab23/out/foo_capnp.rs:416:81
|
416 | pub fn get_daqs(self) -> ::capnp::Result<::capnp::struct_list::Builder<'a,::foo_capnp::gateway_msg::daq_msg::Owned>> {
| ^^^^^^^^^ could not find foo_capnp in {{root}}
error[E0433]: failed to resolve: could not find foo_capnp in {{root}}
--> /home/gibsond/rust_projs/es1800_zmqsubr/target/debug/build/es1800_zmqsubr-fbe222f1c797ab23/out/foo_capnp.rs:420:73
|
420 | pub fn set_daqs(&mut self, value: ::capnp::struct_list::Reader<'a,::foo_capnp::gateway_msg::daq_msg::Owned>) -> ::capnp::Result<()> {
| ^^^^^^^^^ could not find foo_capnp in {{root}}
error[E0433]: failed to resolve: could not find foo_capnp in {{root}}
--> /home/gibsond/rust_projs/es1800_zmqsubr/target/debug/build/es1800_zmqsubr-fbe222f1c797ab23/out/foo_capnp.rs:424:77
|
424 | pub fn init_daqs(self, size: u32) -> ::capnp::struct_list::Builder<'a,::foo_capnp::gateway_msg::daq_msg::Owned> {
| ^^^^^^^^^ could not find foo_capnp in {{root}}
I can fix the problem, after the fact, by changing the generated source code:
::foo_capnp::first_msg::second_msg to self::second_msg.
Or, in this example
:foo_capnp::gateway_msg::daq_msg to self::daq_msg
Are you using edition = "2018" in your Cargo.toml? If you, you'll need to call edition(RustEdition::Rust2018) when constructing your CompilerCommand in your build.rs.
I have a schema as such:
And I get the error:
rror[E0433]: failed to resolve: could not find
foo_capnp
in{{root}}
--> /home/gibsond/rust_projs/es1800_zmqsubr/target/debug/build/es1800_zmqsubr-fbe222f1c797ab23/out/foo_capnp.rs:326:80
|
326 | pub fn get_daqs(self) -> ::capnp::Result<::capnp::struct_list::Reader<'a,::foo_capnp::gateway_msg::daq_msg::Owned>> {
| ^^^^^^^^^ could not find
foo_capnp
in{{root}}
error[E0433]: failed to resolve: could not find
foo_capnp
in{{root}}
--> /home/gibsond/rust_projs/es1800_zmqsubr/target/debug/build/es1800_zmqsubr-fbe222f1c797ab23/out/foo_capnp.rs:416:81
|
416 | pub fn get_daqs(self) -> ::capnp::Result<::capnp::struct_list::Builder<'a,::foo_capnp::gateway_msg::daq_msg::Owned>> {
| ^^^^^^^^^ could not find
foo_capnp
in{{root}}
error[E0433]: failed to resolve: could not find
foo_capnp
in{{root}}
--> /home/gibsond/rust_projs/es1800_zmqsubr/target/debug/build/es1800_zmqsubr-fbe222f1c797ab23/out/foo_capnp.rs:420:73
|
420 | pub fn set_daqs(&mut self, value: ::capnp::struct_list::Reader<'a,::foo_capnp::gateway_msg::daq_msg::Owned>) -> ::capnp::Result<()> {
| ^^^^^^^^^ could not find
foo_capnp
in{{root}}
error[E0433]: failed to resolve: could not find
foo_capnp
in{{root}}
--> /home/gibsond/rust_projs/es1800_zmqsubr/target/debug/build/es1800_zmqsubr-fbe222f1c797ab23/out/foo_capnp.rs:424:77
|
424 | pub fn init_daqs(self, size: u32) -> ::capnp::struct_list::Builder<'a,::foo_capnp::gateway_msg::daq_msg::Owned> {
| ^^^^^^^^^ could not find
foo_capnp
in{{root}}
I can fix the problem, after the fact, by changing the generated source code:
::foo_capnp::first_msg::second_msg to self::second_msg.
Or, in this example
:foo_capnp::gateway_msg::daq_msg to self::daq_msg
I see a similar issue inf the closed issues:
capnproto/capnpc-rust#5
capnproto/capnpc-rust#30
capnproto-rust/issues/16
However, this issue comes up in capnp version 0.9.4, and capnpc version 0.9.3.
Any help would be appreciated,
Daniel Gibson
The text was updated successfully, but these errors were encountered: