I’m excited to get deep into development but have been running into several baffling issues. I understand that the ecosystem is moving fast so it seems prudent to be up to date with the latest development versions. In an attempt to fix https://github.com/holochain/holochain-rust/issues/2028,
I updated to the latest version of hdk. Here is my zome’s Cargo.toml
[package]
name = "cogov"
version = "0.1.0"
authors = ["hc-scaffold-framework"]
edition = "2018"
[dependencies]
futures-io = "=0.3.1"
hdk = "=0.0.42-alpha1"
hdk_proc_macros = "=0.0.42-alpha1"
holochain_json_derive = "=0.0.17"
holochain_persistence_api = "=0.0.11"
holochain_wasm_utils = "=0.0.42-alpha1"
log = "0.4"
serde = "=1.0.89"
serde_json = { version = "=1.0.39", features = ["preserve_order"] }
serde_derive = "=1.0.89"
[lib]
path = "src/lib.rs"
crate-type = ["cdylib"]
When I run hc test
I have the following output. Note that I created an issue with futures-io https://github.com/rust-lang/futures-rs/issues/2019
% nix-shell --run "hc test" https://holochain.love :(
Packaging files for testing to file: "/home/brian/work/cogov/cogov-dev/dist/cogov-dev.dna.json"
> cargo build --release --target=wasm32-unknown-unknown
Compiling futures-io v0.3.1
Compiling proc-macro-hack v0.5.11
error[E0106]: missing lifetime specifier
--> /home/brian/work/cogov/cogov-dev/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-io-0.3.1/src/lib.rs:291:28
|
291 | -> Poll<Result<&[u8]>>;
| ^ expected lifetime parameter
|
= help: this function's return type contains a borrowed value, but the signature does not say which one of argument 2's 2 lifetimes it is borrowed from
error[E0106]: missing lifetime specifier
--> /home/brian/work/cogov/cogov-dev/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-io-0.3.1/src/lib.rs:507:32
|
507 | -> Poll<Result<&[u8]>>
| ^ expected lifetime parameter
...
519 | deref_async_buf_read!();
| ------------------------ in this macro invocation
|
= help: this function's return type contains a borrowed value, but the signature does not say which one of `cx`'s 2 lifetimes it is borrowed from
error[E0106]: missing lifetime specifier
--> /home/brian/work/cogov/cogov-dev/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-io-0.3.1/src/lib.rs:507:32
|
507 | -> Poll<Result<&[u8]>>
| ^ expected lifetime parameter
...
523 | deref_async_buf_read!();
| ------------------------ in this macro invocation
|
= help: this function's return type contains a borrowed value, but the signature does not say which one of `cx`'s 2 lifetimes it is borrowed from
error[E0106]: missing lifetime specifier
--> /home/brian/work/cogov/cogov-dev/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-io-0.3.1/src/lib.rs:532:28
|
532 | -> Poll<Result<&[u8]>>
| ^ expected lifetime parameter
|
= help: this function's return type contains a borrowed value, but the signature does not say which one of `cx`'s 2 lifetimes it is borrowed from
error[E0106]: missing lifetime specifier
--> /home/brian/work/cogov/cogov-dev/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-io-0.3.1/src/lib.rs:545:32
|
545 | -> Poll<Result<&[u8]>>
| ^ expected lifetime parameter
...
557 | delegate_async_buf_read_to_stdio!();
| ------------------------------------ in this macro invocation
|
= help: this function's return type contains a borrowed value, but the signature does not say which one of argument 2's 2 lifetimes it is borrowed from
error: aborting due to 5 previous errors
For more information about this error, try `rustc --explain E0106`.
error: Could not compile `futures-io`.
warning: build failed, waiting for other jobs to finish...
error[E0106]: missing lifetime specifier
--> /home/brian/work/cogov/cogov-dev/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-io-0.3.1/src/lib.rs:291:28
|
291 | -> Poll<Result<&[u8]>>;
| ^ expected lifetime parameter
|
= help: this function's return type contains a borrowed value, but the signature does not say which one of argument 2's 2 lifetimes it is borrowed from
error[E0106]: missing lifetime specifier
--> /home/brian/work/cogov/cogov-dev/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-io-0.3.1/src/lib.rs:507:32
|
504 | / macro_rules! deref_async_buf_read {
505 | | () => {
506 | | fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>)
507 | | -> Poll<Result<&[u8]>>
| | ^ expected lifetime parameter
... |
515 | | }
516 | | }
| |_____- in this expansion of `deref_async_buf_read!`
...
519 | deref_async_buf_read!();
| ------------------------ in this macro invocation
|
= help: this function's return type contains a borrowed value, but the signature does not say which one of `cx`'s 2 lifetimes it is borrowed from
error[E0106]: missing lifetime specifier
--> /home/brian/work/cogov/cogov-dev/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-io-0.3.1/src/lib.rs:507:32
|
504 | / macro_rules! deref_async_buf_read {
505 | | () => {
506 | | fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>)
507 | | -> Poll<Result<&[u8]>>
| | ^ expected lifetime parameter
... |
515 | | }
516 | | }
| |_____- in this expansion of `deref_async_buf_read!`
...
523 | deref_async_buf_read!();
| ------------------------ in this macro invocation
|
= help: this function's return type contains a borrowed value, but the signature does not say which one of `cx`'s 2 lifetimes it is borrowed from
error[E0106]: missing lifetime specifier
--> /home/brian/work/cogov/cogov-dev/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-io-0.3.1/src/lib.rs:532:28
|
532 | -> Poll<Result<&[u8]>>
| ^ expected lifetime parameter
|
= help: this function's return type contains a borrowed value, but the signature does not say which one of `cx`'s 2 lifetimes it is borrowed from
error[E0106]: missing lifetime specifier
--> /home/brian/work/cogov/cogov-dev/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-io-0.3.1/src/lib.rs:545:32
|
542 | / macro_rules! delegate_async_buf_read_to_stdio {
543 | | () => {
544 | | fn poll_fill_buf(self: Pin<&mut Self>, _: &mut Context<'_>)
545 | | -> Poll<Result<&[u8]>>
| | ^ expected lifetime parameter
... |
553 | | }
554 | | }
| |_____- in this expansion of `delegate_async_buf_read_to_stdio!`
...
557 | delegate_async_buf_read_to_stdio!();
| ------------------------------------ in this macro invocation
|
= help: this function's return type contains a borrowed value, but the signature does not say which one of argument 2's 2 lifetimes it is borrowed from
error: aborting due to 5 previous errors
For more information about this error, try `rustc --explain E0106`.
error: Could not compile `futures-io`.
warning: build failed, waiting for other jobs to finish...
error: build failed
Error: Couldn't traverse DNA in directory "/home/brian/work/cogov/cogov-dev": command cargo build --release --target=wasm32-unknown-unknown was not successful
nix-shell --run "hc test" https://holochain.love 8.53s user 0.54s system 136% cpu 6.626 total