Holochain Forum

Holochain v0.0.46-alpha1 released

Holochain v0.0.46-alpha1 has been released. This is the first new ‘blessed’ release in about two months!

What’s new in this release?

  • hc hash now takes a --uuid parameter so you can get the hash of a DNA as it would be if a UUID were passed to it via conductor config. #2161
  • Some log messages have been moved to the ‘debug’ log level, which should make the log quieter.
  • The new scaffolding tool command hc-happ-create is included in this release!

Bug fixes

  • Lots of performance improvements all round!
  • Fixes to consistency, particularly links, CRUD, and validation #2148 #2153 #2159 #2169 #2170
  • The HDK now targets a few third-party dependencies’ versions (notably serde) in a more relaxed way; this should make your life a bit easier.

Breaking changes

  • The communication protocol between the conductor and sim2h_server has changed again, so if you’re running any sim2h servers in the wild you’ll need to update both sim2h_server and your (and your end-users’) conductors at the same time.

Known issues

  • None to report at this time.

How to upgrade

This is a ‘blessed’ release, so all you have to do is exit any Holonix shells you’ve got open, and re-enter them via this command:

nix-shell https://holochain.love

It’ll automatically download the updated packages.

Updating existing DNA

You’ll need to update all your zomes to use the new HDK; open the Cargo.toml files for each of your zomes and update these lines:

[dependencies]
serde = "1.0"
serde_json = { version = "1.0", features = ["preserve_order"] }
serde_derive = "1.0"
hdk = "=0.0.46-alpha1"
hdk_proc_macros = "=0.0.46-alpha1"
holochain_wasm_utils = "=0.0.46-alpha1"
holochain_json_derive = "0.0"

(Note: if your zome uses the older define_zome! style HDK, you don’t need the hdk_proc_macros line.)

2 Likes

I have been busy elsewhere lately and not following the developments closely. Have I missed some update on changes to get_links? I know support for pagination and sorting have been introduced, but besides from that?

My super simple zome that used to work is now returning empty results when calling get_links but I can’t find any hints as to how or what needs to be changed.

Below used to work.

Linking:

hdk::link_entries(&agent_address, &address, "author_text", "")?;

Getting links:

hdk::api::get_links(
            &agent_address,
            LinkMatch::Exactly("author_text"),
            LinkMatch::Any  
        )

How would the above need to change to work with the current situation?

Or does the links def need to be upgraded somehow?

links: [
  from!(
     "%agent_id",
     link_type: "author_text",
     validation_package: || {
      hdk::ValidationPackageDefinition::Entry
  },
  validation: |_validation_data: hdk::LinkValidationData| {
      Ok(())
  })
]
1 Like

No, this should work… Maybe some connection issue, like nodes not being able to talk to one another with sim2h? There have been major changes on that. Also maybe some race condition?

Otherwise @pauldaoust might be able to point to changes, but this kind of calls has always worked for me.

1 Like

I also have this problem. Has anyone tried latest develop branch to see if it was fixed?

Yes, 0.0.47 fixes the issue.

Quoting @lucksus:

All that’s needed to fix this is to recompile DNAs with the new version, i.e. upgrading the Cargo.toml files of the zomes to point to v0.0.47-alpha and then rebuild.

I also had to do some additional cleanup before compile went through as expected. These are the four things I did, not sure unfortunately what step made the actual change.

  • Deleted the .cargo folder
  • Deleted the target folder
  • Ran rustup update
  • Generated a new .hcbuild using hc generate
1 Like

0.0.47 fixes the issue, thanks.

Nice. Thanks for sharing!