Dependency issue packaging on v0.42-alpha5

Hey team.
I’ve just tried to spin up a new zome this morning and received a dependency error trying to package.
I’ve not changed the zome in any way so just trying to package the init setup here.

[nix-shell:~/Code/TestDemo/c_release/cc_tuts]$ hc package
> CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && echo $CARGO_TARGET_DIR 
"CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && echo $CARGO_TARGET_DIR "
/home/simwilso/Code/TestDemo/c_release/cell_zome/target
> CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && cargo build --release --target=wasm32-unknown-unknown --target-dir=$CARGO_TARGET_DIR
"CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && cargo build --release --target=wasm32-unknown-unknown --target-dir=$CARGO_TARGET_DIR"
    Updating crates.io index
error: failed to select a version for `serde`.
    ... required by package `hdk v0.0.42-alpha5`
    ... which is depended on by `cell_dna v0.1.0 (/home/simwilso/Code/TestDemo/c_release/cc_tuts/zomes/cell_dna/code)`
versions that meet the requirements `= 1.0.89` are: 1.0.89

all possible versions conflict with previously selected packages.

  previously selected package `serde v1.0.100`
    ... which is depended on by `cell_dna v0.1.0 (/home/simwilso/Code/TestDemo/c_release/cc_tuts/zomes/cell_dna/code)`

failed to select a version for `serde` which could resolve this conflict
Error: Couldn't traverse DNA in directory "/home/simwilso/Code/TestDemo/c_release/cc_tuts": command CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && cargo build --release --target=wasm32-unknown-unknown --target-dir=$CARGO_TARGET_DIR was not successful

Any thoughts on how I can resolve?

Maybe try v0.0.43-alpha3, released yesterday…

Yeah, this is annoying for sure. Right now we don’t have a good way of managing dependency versions between Holochain releases, which is a big deal because we keep bumping releases and pinning their dependencies to exact versions. (This will change when Holochain gets more stable! We promise!!!)

For now, what I’d do is generate a new blank zome (maybe 0.0.43-alpha3 as Mike suggests, to save yourself the hassle of doing it again soon), look at the Cargo.toml file in its code/ subfolder, and copy the version numbers for serde and other deps to the Cargo.toml in your zome.

thanks Paul. I updated cargo to reference 0.43 and this worked fine.

1 Like

@pauldaoust nix-shell is not using the latest version of holochain and hc ($ nix-shell https://holochain.love). Please, what is the easier way to get version 0.0.43 of such commands running inside the nix-shell?

@ramnasidharta oh no, you’re right! I might’ve made a mistake about it being available on holochain.love; let me check and get back to you next week.

1 Like

It’s still running 0.0.42
@pauldaoust, any quick work-arounds?

No worries, edited cargo, works for now.