Skip to content

Commit 39ac19b

Browse files
authored
Merge pull request #38 from lightningrodlabs/hc-123
Update to hc 0.0.123
2 parents 3666f90 + 8e1b570 commit 39ac19b

25 files changed

+5015
-4457
lines changed

Cargo.lock

Lines changed: 170 additions & 211 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

default.nix

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
{
2-
holonixPath ? builtins.fetchTarball { url = "https://github.com/holochain/holonix/archive/ccbed64b383ba57cc716797669ce92df3905117c.tar.gz"; }
3-
}:
4-
51
let
6-
holonix = import (holonixPath) { };
2+
holonixRev = "c72cfede8d1e673fdbd5f1b6e908fa3086f56e8d";
3+
holonixPath = builtins.fetchTarball "https://github.com/holochain/holonix/archive/${holonixRev}.tar.gz";
4+
holonix = import (holonixPath) {
5+
holochainVersionId = "v0_0_123";
6+
};
77
nixpkgs = holonix.pkgs;
88
in nixpkgs.mkShell {
99
inputsFrom = [ holonix.main ];
10-
buildInputs = with nixpkgs; [
11-
binaryen
10+
packages = with nixpkgs; [
11+
# Additional packages go here
1212
nodejs-16_x
1313
];
1414
}

dna/zomes/profiles/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ crate-type = ["cdylib", "rlib"]
99
name = "profiles"
1010

1111
[dependencies]
12-
hc_zome_profiles = {git = "https://github.com/holochain-open-dev/profiles", tag = "for-hc-v0.0.115", package = "hc_zome_profiles"}
12+
hc_zome_profiles = {git = "https://github.com/holochain-open-dev/profiles", tag = "for-hc-v0.0.123", package = "hc_zome_profiles"}
1313

14-
hdk = "0.0.115"
15-
holo_hash = "0.0.12"
14+
hdk = "0.0.119"
15+
holo_hash = "0.0.16"

dna/zomes/where/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ chrono = {version = "0.4", features = ['alloc', 'std']}
1313
derive_more = "0.99"
1414
serde = "1.0.123"
1515
thiserror = "1.0.20"
16-
hc_utils = {git = "https://github.com/holochain/hc-utils", branch = "v0.0.115", package = "hc_utils"}
16+
hc_utils = {git = "https://github.com/holochain/hc-utils", branch = "v0.0.123", package = "hc_utils"}
1717
#hc_utils = {git = "https://github.com/ddd-mtl/hc-utils", branch = "develop", package = "hc_utils"}
18-
hdk = "0.0.115"
19-
holo_hash = {version = "0.0.12", features = ["encoding"]}
18+
hdk = "0.0.119"
19+
holo_hash = {version = "0.0.16", features = ["encoding"]}
2020

2121
[dev-dependencies]
2222
#holochain = { git = "https://github.com/holochain/holochain.git", branch = "develop", features = ["test_utils"] }

dna/zomes/where/src/emoji_group.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use hc_utils::*;
1+
use hc_utils::get_links_and_load_type;
22
use holo_hash::EntryHashB64;
33
pub use hdk::prelude::*;
44

@@ -30,7 +30,7 @@ fn create_emoji_group(input: EmojiGroup) -> ExternResult<EntryHashB64> {
3030
let eh = hash_entry(input.clone())?;
3131
let path = get_emoji_group_path();
3232
path.ensure()?;
33-
let anchor_hash = path.hash()?;
33+
let anchor_hash = path.path_entry_hash()?;
3434
create_link(anchor_hash, eh.clone(), ())?;
3535
let eh64: EntryHashB64 = eh.clone().into();
3636
// let me = agent_info()?.agent_latest_pubkey.into();
@@ -53,12 +53,12 @@ fn get_emoji_group(input: EntryHashB64) -> ExternResult<Option<EmojiGroup>> {
5353
#[hdk_extern]
5454
fn get_all_emoji_groups(_: ()) -> ExternResult<Vec<EmojiGroupOutput>> {
5555
let path = get_emoji_group_path();
56-
let templates = get_all_inner(path.hash()?)?;
56+
let templates = get_all_inner(path.path_entry_hash()?)?;
5757
Ok(templates)
5858
}
5959

6060
fn get_all_inner(base: EntryHash) -> WhereResult<Vec<EmojiGroupOutput>> {
61-
let entries = get_links_and_load_type(base, None)?;
61+
let entries = get_links_and_load_type(base, None, false)?;
6262
let mut templates = vec![];
6363
for e in entries {
6464
templates.push(EmojiGroupOutput {hash: hash_entry(&e)?.into(), content: e});

dna/zomes/where/src/here.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use hdk::prelude::*;
2-
3-
use hc_utils::*;
2+
use hc_utils::get_latest_entry;
43
use std::collections::BTreeMap;
54
use holo_hash::{EntryHashB64, AgentPubKeyB64, HeaderHashB64};
65

dna/zomes/where/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fn init(_: ()) -> ExternResult<InitCallbackResult> {
2626
}
2727

2828
entry_defs![
29-
Path::entry_def(),
29+
PathEntry::entry_def(),
3030
svg_marker::SvgMarker::entry_def(),
3131
emoji_group::EmojiGroup::entry_def(),
3232
template::Template::entry_def(),

dna/zomes/where/src/space.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
pub use hdk::prelude::*;
2-
use hc_utils::*;
2+
use hc_utils::get_links_and_load_type;
33
use std::collections::BTreeMap;
44
use holo_hash::EntryHashB64;
55

@@ -36,7 +36,7 @@ fn create_space(input: Space) -> ExternResult<EntryHashB64> {
3636
let space_eh = hash_entry(input.clone())?;
3737
let path = get_spaces_path();
3838
path.ensure()?;
39-
let anchor_hash = path.hash()?;
39+
let anchor_hash = path.path_entry_hash()?;
4040
create_link(anchor_hash, space_eh.clone(), ())?;
4141
let eh64: EntryHashB64 = space_eh.clone().into();
4242
// let me = agent_info()?.agent_latest_pubkey.into();
@@ -78,7 +78,7 @@ fn create_space_with_sessions(input: SpaceSessionsInput) -> ExternResult<EntryHa
7878

7979
/// Returns 0 if no session found or if space does not exist
8080
pub fn get_next_session_index(space_eh: EntryHash) -> WhereResult<u32> {
81-
let sessions: Vec<PlacementSession> = get_links_and_load_type(space_eh, None)?;
81+
let sessions: Vec<PlacementSession> = get_links_and_load_type(space_eh, None, false)?;
8282
let mut top = 0;
8383
for session in sessions {
8484
if session.index >= top {
@@ -157,13 +157,13 @@ fn get_visible_spaces(_: ()) -> ExternResult<Vec<SpaceOutput>> {
157157
#[hdk_extern]
158158
fn get_spaces(_: ()) -> ExternResult<Vec<SpaceOutput>> {
159159
let path = get_spaces_path();
160-
let anchor_hash = path.hash()?;
160+
let anchor_hash = path.path_entry_hash()?;
161161
let spaces = get_spaces_inner(anchor_hash)?;
162162
Ok(spaces)
163163
}
164164

165165
fn get_spaces_inner(base: EntryHash) -> WhereResult<Vec<SpaceOutput>> {
166-
let entries = get_links_and_load_type(base, None)?;
166+
let entries = get_links_and_load_type(base, None, false)?;
167167
let mut spaces = vec![];
168168
for e in entries {
169169
spaces.push(SpaceOutput {hash: hash_entry(&e)?.into(), content: e});

dna/zomes/where/src/svg_marker.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use hc_utils::*;
1+
use hc_utils::get_links_and_load_type;
22
use holo_hash::EntryHashB64;
33
pub use hdk::prelude::*;
44

@@ -29,7 +29,7 @@ fn create_svg_marker(input: SvgMarker) -> ExternResult<EntryHashB64> {
2929
let eh = hash_entry(input.clone())?;
3030
let path = get_svg_marker_path();
3131
path.ensure()?;
32-
let anchor_hash = path.hash()?;
32+
let anchor_hash = path.path_entry_hash()?;
3333
create_link(anchor_hash, eh.clone(), ())?;
3434
let eh64: EntryHashB64 = eh.clone().into();
3535
// let me = agent_info()?.agent_latest_pubkey.into();
@@ -52,12 +52,12 @@ fn get_svg_marker(input: EntryHashB64) -> ExternResult<Option<SvgMarker>> {
5252
#[hdk_extern]
5353
fn get_svg_markers(_: ()) -> ExternResult<Vec<SvgMarkerOutput>> {
5454
let path = get_svg_marker_path();
55-
let templates = get_inner(path.hash()?)?;
55+
let templates = get_inner(path.path_entry_hash()?)?;
5656
Ok(templates)
5757
}
5858

5959
fn get_inner(base: EntryHash) -> WhereResult<Vec<SvgMarkerOutput>> {
60-
let entries = get_links_and_load_type(base, None)?;
60+
let entries = get_links_and_load_type(base, None, false)?;
6161
let mut templates = vec![];
6262
for e in entries {
6363
templates.push(SvgMarkerOutput {hash: hash_entry(&e)?.into(), content: e});

dna/zomes/where/src/template.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use hc_utils::*;
1+
use hc_utils::get_links_and_load_type;
22
use holo_hash::EntryHashB64;
33
pub use hdk::prelude::*;
44

@@ -29,7 +29,7 @@ fn create_template(input: Template) -> ExternResult<EntryHashB64> {
2929
let eh = hash_entry(input.clone())?;
3030
let path = get_templates_path();
3131
path.ensure()?;
32-
let anchor_hash = path.hash()?;
32+
let anchor_hash = path.path_entry_hash()?;
3333
create_link(anchor_hash, eh.clone(), ())?;
3434
let eh64: EntryHashB64 = eh.clone().into();
3535
// let me = agent_info()?.agent_latest_pubkey.into();
@@ -52,12 +52,12 @@ fn get_template(input: EntryHashB64) -> ExternResult<Option<Template>> {
5252
#[hdk_extern]
5353
fn get_templates(_: ()) -> ExternResult<Vec<TemplateOutput>> {
5454
let path = get_templates_path();
55-
let templates = get_templates_inner(path.hash()?)?;
55+
let templates = get_templates_inner(path.path_entry_hash()?)?;
5656
Ok(templates)
5757
}
5858

5959
fn get_templates_inner(base: EntryHash) -> WhereResult<Vec<TemplateOutput>> {
60-
let entries = get_links_and_load_type(base, None)?;
60+
let entries = get_links_and_load_type(base, None, false)?;
6161
let mut templates = vec![];
6262
for e in entries {
6363
templates.push(TemplateOutput {hash: hash_entry(&e)?.into(), content: e});

0 commit comments

Comments
 (0)