Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

error: no matching package named hdk-proc-macros found #1871

Closed
jamesray1 opened this issue Nov 13, 2019 · 3 comments
Closed

error: no matching package named hdk-proc-macros found #1871

jamesray1 opened this issue Nov 13, 2019 · 3 comments

Comments

@jamesray1
Copy link
Contributor

jamesray1 commented Nov 13, 2019

[nix-shell:~]$ hc init test-app
Created new Holochain project at: "test-app"

[nix-shell:~]$ cd test-app

[nix-shell:~/test-app]$ hc generate zomes/my_zome rust-proc

> cargo init --lib --vcs none
     Created library package
Generated "my_zome" Zome

[nix-shell:~/test-app]$ 

[nix-shell:~/test-app]$ hc package
> cargo build --release --target=wasm32-unknown-unknown --target-dir=../target
    Updating crates.io index
error: no matching package named `hdk-proc-macros` found
location searched: registry `https://github.com/rust-lang/crates.io-index`
required by package `my_zome v0.1.0 (/home/jr/test-app/zomes/my_zome/code)`
Error: Couldn't traverse DNA in directory "/home/jr/test-app": command cargo build --release --target=wasm32-unknown-unknown --target-dir=../target was not successful

[nix-shell:~/test-app]$ cd ~

[nix-shell:~]$ hc init test_app
Created new Holochain project at: "test_app"

[nix-shell:~]$ cd test_app

[nix-shell:~/test_app]$ hc generate zomes/my_zome rust-proc
> cargo init --lib --vcs none
     Created library package
Generated "my_zome" Zome

[nix-shell:~/test_app]$ hc package
> cargo build --release --target=wasm32-unknown-unknown --target-dir=../target
    Updating crates.io index
error: no matching package named `hdk-proc-macros` found
location searched: registry `https://github.com/rust-lang/crates.io-index`
required by package `my_zome v0.1.0 (/home/jr/test_app/zomes/my_zome/code)`
Error: Couldn't traverse DNA in directory "/home/jr/test_app": command cargo build --release --target=wasm32-unknown-unknown --target-dir=../target was not successful
[nix-shell:~/test_app]$ hc --version
hc 0.0.34-alpha1 # that's not the latest :S
➜  ~ nh
warning: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:9; will use bash from your environment  
# posted separately in #1789 and possibly related?
^C[jr@lm ~]$ alias nh
alias nh='nix-shell https://holochain.love'

Related issue:

This is from following https://developer.holochain.org/docs/create-new-app/.

@willemolding
Copy link
Collaborator

willemolding commented Nov 13, 2019

Any chance you are on an older version of the hc tool. The latest pulls templates from our repos (or any repo actually) and these definitely have the correct version of hdk_proc_macros with underscores.

https://github.com/holochain/rust-proc-zome-template/blob/master/code/Cargo.toml

@jamesray1
Copy link
Contributor Author

jamesray1 commented Nov 15, 2019

I'm switching to working on my desktop.

I can check on the laptop, but as I don't plan to use it, unless others report the same issue, it seems redundant now.

Running nix-shell https://holochain.love (or nh via an alias) I got a build error.

copying path '/nix/store/mwazh1aylx9c4dfrd73a1m4y7rrbv6xr-zlib-0.6.2.1' from 'https://cache.nixos.org'...
error: cloning builder process: Operation not permitted
error: unable to start build process

On my desktop I still had nix-env (Nix) 2.2.2, so I upgraded.

I also had this line in my ~/.zshrc which I commented out:

# export NIX_PATH="nixpkgs=https://github.com/NixOS/nixpkgs/archive/release-19.03.tar.gz"

Running nh again gave:

cannot build derivation '/nix/store/7x70dgh5yj743lcdyahl9ywmf1518rqd-rust-1.38.0-nightly-2019-07-13-69656fa4c.drv': 1 dependencies couldn't be built
error: build of '/nix/store/7x70dgh5yj743lcdyahl9ywmf1518rqd-rust-1.38.0-nightly-2019-07-13-69656fa4c.drv', '/nix/store/gq192dvrhi35i2cmkgxxa8qxvmjbzpi5-hc.drv', '/nix/store/hzj1rmbm9a9yx2bz6cpwb5kw7bj5lfvv-trycp_server.drv', '/nix/store/rk12y7hz68b5p8ba294nhq07dvw18di0-sim2h_server.drv' failed

I tried this again on the desktop:

https://pastebin.com/CjDNnkeK

@jamesray1
Copy link
Contributor Author

jamesray1 commented Nov 29, 2019

Closing as hc package now works on my laptop, although I get an error with hc run. #1926

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants