ORIGYN-SA / CanDB

CanDB - CanDB is a flexible, performant, and horizontally scalable non-relational multi-canister data storage framework built for the Internet Computer.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CanDB 1.0.7 HashTree bug

viktorkovarik opened this issue · comments

Hey I see this error when I try to build canDB with the latest version 1.0.7.

.mops/candb@1.0.7/src/HashTree.mo:156.9-156.41: type error [M0045], wrong number of type arguments: expected 0 but got 2
.mops/candb@1.0.7/src/HashTree.mo:160.16-160.48: type error [M0045], wrong number of type arguments: expected 0 but got 2

Can you check it out?

Hey @viktorkovarik sorry for the delayed response - that's peculiar you're running into an issue in HashTree, as that module shouldn't really be touched/used anywhere, as it's a deprecated artifact of an older version of CanDB. What version of dfx are you using?

CanDB 1.0.7 requires moc 0.9.8 or higher because of some of the APIs used by the map9 dependency it has. I'd recommend using dfx >= 0.16.1 if you aren't already using it.

If you want to use an earlier version of dfx, I'd recommend using CanDB 1.0.1.

@ByronBecker I probably know why it does not work. It seems that it fails only in SingleCanisterCanDB since you've updated code only in non-deprecated one. I believe when I finally which to orchestrated CanDB it won't give this error.

and error started happening after stable-hash-map dependency was bumped/changed to different commit hash
before:
https://github.com/canscale/StableHashMap#v0.2.1@00243abd9541cbfb69c39647ec2475df6ab893f6
currently:
https://github.com/canscale/StableHashMap#v0.2.1@eb7edf4127233f2b1f3732ede7e2c55827ac6886

I believe when I finally which to orchestrated CanDB it won't give this error

Thanks for digging into this, and yes, I recommend using CanDB, not SingleCanisterCanDB. SingleCanisterCanDB was originally a Proof of Concept for the eventual CanDB library.

I'm assuming you were able to get things working then?