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…
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.