Skip to content

Instantly share code, notes, and snippets.

@dunkelhaus
Created November 7, 2018 01:11
Show Gist options
  • Save dunkelhaus/2531740b91a3cea5db8b9f5349156e89 to your computer and use it in GitHub Desktop.
Save dunkelhaus/2531740b91a3cea5db8b9f5349156e89 to your computer and use it in GitHub Desktop.
A result of manually pointing my Cargo.toml files in each zome to a local install of hdk-rust - toml files included below.
====================================================================================
BUILDING genome with 'hc package --output dist/app-spec-rust.hcpkg --strip-meta':
------------------------------------------------------------------------------------
> cargo build --target wasm32-unknown-unknown --release
Finished release [optimized] target(s) in 0.16s
> cargo build --release --target=wasm32-unknown-unknown
Finished release [optimized] target(s) in 0.49s
Created bundle file at "dist/app-spec-rust.hcpkg"
DONE.
====================================================================================
BUILDING JS test file with webpack:
------------------------------------------------------------------------------------
npm WARN test No description
npm WARN test No repository field.
npm WARN test No license field.
audited 5720 packages in 4.883s
found 0 vulnerabilities
> @ build /Volumes/TeraDrive/Code/holosqape/test
> webpack
Hash: 6a2dc63e8b4400359f3c
Version: webpack 4.20.2
Time: 1285ms
Built at: 11/06/2018 5:57:54 PM
Asset Size Chunks  Chunk Names
bundle.js 98.2 KiB 0 [emitted] main
Entrypoint main = bundle.js
[7] (webpack)/buildin/global.js 509 bytes {0} [built]
[25] ./test.js 5.02 KiB {0} [built]
[31] util (ignored) 15 bytes {0} [built]
[33] util (ignored) 15 bytes {0} [built]
[63] ./util.inspect (ignored) 15 bytes {0} [built]
+ 59 hidden modules
WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/
DONE.
RUNNING tests with hcshell...
------------------------------------------------------------------------------------
"rmdir: /var/folders/hv/p9qr2cn56sd61t8dk8q5__xw0000gn/T/�\u0016���כ\n����{\u0011�\t��\u0019&jۧ�0j���9�!: Directory not empty"
"mkdir: /var/folders/hv/p9qr2cn56sd61t8dk8q5__xw0000gn/T/�\u0016���כ\n����{\u0011�\t��\u0019&jۧ�0j���9�!: File exists"
# call
not ok 1 should be equal
⨯ call ---
operator: equal
expected: |-
'{"sum":"4"}'
actual: |-
'Error calling zome function: InternalFailure(Dna(CapabilityNotFound("Capability \\\'main\\\' not found in Zome \\\'blog\\\'")))'
stack: |-
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
t@test/dist/bundle.js:8
@test/dist/bundle.js:1
h@test/dist/bundle.js:1
...
# my_posts_as_committed
not ok 2 should be equal
⨯ my_posts_as_committed ---
operator: equal
expected: |-
'{"post_hashes":["Qme9vatSfYs7MpejUUrheYYUA1B2TYdVBDycuoimtHudMP","QmdJHaznj5rAtMV5nXLK87tdCBoc2NJRtQW4r3w7LZ6HSg"]}'
actual: |-
'Error calling zome function: InternalFailure(Dna(CapabilityNotFound("Capability \\\'main\\\' not found in Zome \\\'blog\\\'")))'
stack: |-
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
t@test/dist/bundle.js:8
@test/dist/bundle.js:1
h@test/dist/bundle.js:1
...
# get entry address
not ok 3 should be equal
⨯ get entry address ---
operator: equal
expected: |-
'{"address":"QmdJHaznj5rAtMV5nXLK87tdCBoc2NJRtQW4r3w7LZ6HSg"}'
actual: |-
'Error calling zome function: InternalFailure(Dna(CapabilityNotFound("Capability \\\'main\\\' not found in Zome \\\'blog\\\'")))'
stack: |-
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
t@test/dist/bundle.js:8
@test/dist/bundle.js:1
h@test/dist/bundle.js:1
...
# create_post
not ok 4 should be equal
⨯ create_post ---
operator: equal
expected: |-
'{"hash":"QmdJHaznj5rAtMV5nXLK87tdCBoc2NJRtQW4r3w7LZ6HSg"}'
actual: |-
'Error calling zome function: InternalFailure(Dna(CapabilityNotFound("Capability \\\'main\\\' not found in Zome \\\'blog\\\'")))'
stack: |-
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
t@test/dist/bundle.js:8
@test/dist/bundle.js:1
h@test/dist/bundle.js:1
...
# post max content size 280 characters
not ok 5 should be equal
⨯ post max content size 280 characters ---
operator: equal
expected: |-
'{"error":{"ValidationFailed":"\\"Content too long\\""}}'
actual: |-
'Error calling zome function: InternalFailure(Dna(CapabilityNotFound("Capability \\\'main\\\' not found in Zome \\\'blog\\\'")))'
stack: |-
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
t@test/dist/bundle.js:8
@test/dist/bundle.js:1
h@test/dist/bundle.js:1
...
# posts_by_agent
not ok 6 should be equal
⨯ posts_by_agent ---
operator: equal
expected: |-
'{"post_hashes":[]}'
actual: |-
'Error calling zome function: InternalFailure(Dna(CapabilityNotFound("Capability \\\'main\\\' not found in Zome \\\'blog\\\'")))'
stack: |-
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
t@test/dist/bundle.js:8
@test/dist/bundle.js:1
h@test/dist/bundle.js:1
...
# my_posts
not ok 7 Did not get post hashes ["QmdJHaznj5rAtMV5nXLK87tdCBoc2NJRtQW4r3w7LZ6HSg","Qme9vatSfYs7MpejUUrheYYUA1B2TYdVBDycuoimtHudMP"] in any ordering
⨯ my_posts ---
operator: ok
expected: true
actual: false
stack: |-
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
t@test/dist/bundle.js:8
@test/dist/bundle.js:1
h@test/dist/bundle.js:1
...
# create/get_post rountrip
not ok 8 should be equal
⨯ create/get_post rountrip ---
operator: equal
expected: |-
'{"hash":"QmdJHaznj5rAtMV5nXLK87tdCBoc2NJRtQW4r3w7LZ6HSg"}'
actual: |-
'Error calling zome function: InternalFailure(Dna(CapabilityNotFound("Capability \\\'main\\\' not found in Zome \\\'blog\\\'")))'
stack: |-
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
@test/dist/bundle.js:8
t@test/dist/bundle.js:8
@test/dist/bundle.js:1
Uncaught exception at line 8 : "SyntaxError: JSON.parse: Parse error"
"JSON.parse: Parse error"
"@test/dist/bundle.js:8\n@test/dist/bundle.js:8\n@test/dist/bundle.js:8\n@test/dist/bundle.js:8\nt@test/dist/bundle.js:8\n@test/dist/bundle.js:1\nh@test/dist/bundle.js:1"
h@test/dist/bundle.js:1
...
not ok 9 no plan found
⨯ fail 9
[package]
name = "code"
version = "0.0.1"
authors = ["Holochain Core Dev Team <devcore@holochain.org>"]
[dependencies]
serde = "1.0"
serde_json = "1.0"
hdk = { path = "/Volumes/TeraDrive/Code/holosqape/holochain-rust/hdk-rust" }
# hdk = { git = "https://github.com/holochain/holochain-rust" , branch = "develop" }
serde_derive = "1.0"
boolinator = "2.4"
[lib]
path = "src/lib.rs"
crate-type = ["cdylib"]
[package]
name = "code"
version = "0.0.1"
authors = ["Holochain Core Dev Team <devcore@holochain.org>"]
[dependencies]
serde = "1.0"
serde_json = "1.0"
hdk = { path = "/Volumes/TeraDrive/Code/holosqape/holochain-rust/hdk-rust" }
# hdk = { git = "https://github.com/holochain/holochain-rust" , branch = "develop" }
serde_derive = "1.0"
boolinator = "2.4"
[lib]
path = "src/lib.rs"
crate-type = ["cdylib"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment