Trying to update happ-client-call-tutorial and happ-build-tutorial to latest hdk

Hi last week I started looking at HoloChain and Im getting a problem.
Im using these 2 examples
***github/holochain/happ-client-call-tutorial.git
***github/holochain/happ-build-tutorial.git
(Note I had to remove the https to be able to post this)

The happ-build-tutorial works fine with happ-client-call-tutorial from github but the crate versions are about 6 month old.

However, I wanted to update it to get the recent functionality in the holochain/crates/test_utils/wasm/wasm_workspace examples.

When I run the conductor it starts fine, however client fails with this error:

Running /home/user/.cargo/target/debug/happ-client-call-tutorial
ExternalApiWireError(RibosomeError(“Wasm error while working with Ribosome: Compile(“Error while importing \“env\”.\”__hash\”: unknown import. Expected Function(FunctionType { params: [I32, I32], results: [] })")"))
Got an error: “zome call failed”

I have modified the Cargo.tomls, the client Cargo.toml has
holochain_client = { git = “***github/holochain/holochain-client-rust” }
holochain_conductor_api = “0.0.32”
holochain = “0.0.132”
hdk = “0.0.127”
paste = “1.0.5”
serde = “1.0.123”
tokio = {version = “1.3”, features = [“full”]}

and the zomes have
[dependencies]
hdk = “0.0.127”
serde = “1.0.137”

holochain_test_wasm_common = “0.0.27”

This is the latest versions of the crates that I have managed to get to compile due to the requirements in the holochain_client Cargo.toml

$ hn-introspect

List of applications and their version information

v0_0_119

  • hc-0.0.20: ***github/holochain/holochain/tree/holochain-0.0.119

  • holochain-0.0.119: ***github/holochain/holochain/tree/holochain-0.0.119

  • kitsune-p2p-proxy-0.0.15: ***github/holochain/holochain/tree/holochain-0.0.119

  • kitsune-p2p-tx2-proxy-0.0.15: ***github/holochain/holochain/tree/holochain-0.0.119

  • lair-keystore-0.0.9: ***github/holochain/lair/tree/v0.0.9

  • rustc: rustc 1.60.0 (7737e0b5c 2022-04-04)

  • cargo fmt: rustfmt 1.4.38-stable (7737e0b 2022-04-04)

  • cargo clippy: clippy 0.1.60 (7737e0b 2022-04-04)

  • perf: ***kernel/linux/kernel/v5.x/linux-5.10.118.tar.xz

I see that the versions are not the same.

Can someone help and point me in the direction to get the latest hdk crate to function with the 2 examples,

I see there are some Docker containers however I havent seen documentation. It would be great to have one docker container to compile. and one docker container with the conductor.

Btw I made a Makefile.toml to run the examples that I can share, if anyone is interested.

Thanks

1 Like

I cannot really help you with your specific problem but do you know about the scaffolding tool (GitHub - holochain/scaffolding: RAD tools to quickly scaffold a new holochain application)? It provides a simple way to create a hApp and is usually up to date regarding the hdk version.

Have you seen the Holochain Gym? There’s a link on there on the page I’ve linked to below to a Discord server where you’ll probably get more luck with your question:

Ok thanks Ill try on the Chat

1 Like

@apps4u Please post technical issues in the corresponding repos on Github.

1 Like

@apps4u The problem is incompatibility between the Holochain version and the HDK version of the zome. Run holochain --build-info to see which HDK is required for your zome.

Check compatible versions in holochain/CHANGELOG.md at develop · holochain/holochain · GitHub. There you see the HDK version that’s been released with a Holochain version.

2 Likes

Did you fix it? I managed to update to tge latest version… :slightly_smiling_face: