create a new repo and cd into it with hc init some-app; cd some-app
create a zome with hc generate zomes/zome1 rust-proc
run hc package
The whole build log is:
> CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-/tmp/my_first_app/target} && echo $CARGO_TARGET_DIR
Error: Couldn't traverse DNA in directory "/Users/me/src/github.com/user/somedir/some-app": No such file or directory (os error 2)
Am I doing something wrong ? If not, is there something I can try as a workaround ?
Thanks.
@nmrshll it looks like youāre on a Mac, and I know weāve been having some build issues on Macs. hc --version shows 0.0.38-alpha14, right? Have you updated to macOS Cordova? (If you havenāt, donāt do it yet! The Nix package manager is having some real struggles with Cordova.)
Thanks for the answer. Yes, I work on a mac at the moment, and I havenāt updated (precisely to avoid dealing with new problems). So thatās one more reason I wonāt update soon.
Yes, my hc version (inside the holonix shell) is hc 0.0.38-alpha14. I also have a version of it installed outside, which is on 0.0.40-alpha1.
Is there a way to āpinā/specify the https://holochain.love version I want to use ? I could try with an older version, I definitely had it working sometimes with older versions.
Else Iām going to try with different combinations of rust/hc versions.
Okay, this is definitely not a Mac issue; I can reproduce it in Linux too by following your steps, but canāt reproduce it on an existing project. I saw some chatter about this problem in our internal chat; will look into it.
I do have an older project (that was already set up) where the same last command works.
Maybe the holonix data has been cached in the other repo so it keeps working, and some change on holochain.love makes it not work the first time anymore ?
FWIU the holonix stuff is tied to the user rather than the folder, although I could be wrong. I suspect thereās a bug in the freshly generated templatesā¦
Hey @nmrshll and @pauldaoust
Iām also getting the same issue also on Linux.
I can successfully run hc package after hc init though. It is only after I generate a new zome then run hc package that I get the error (same as above).
Also Iām only getting the error when I create a new Happ. Previously created Happs seem to package ok.
Turns out itās an issue in .38 thatās going away in the next āblessedā holochain.love release. Itās some hardcoded build commands in the zomeās .hcbuild file that doesnāt actually work. In the meantime you can open up zomes/<zome_name>/code/.hcbuild and edit thusly:
Oh this is a good point. Even using the latest version any zomes created with the old template will need to be updated.
You can find the new template here.
This will only work with the new release which will be on holochain.love very shortly. Or you can access it now like this:
@Joss this is really interesting ā itās a totally separate issue with almost the same symptoms! It fails at a different stage in the build process though ā whereas the above bug was all about checking for the existence of the final build artifact, this one fails earlier. It seems to be related to the way cargo works ā it forces snake_case in build artifacts.