You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running dfx build,
Then the following canister is generated:
service: (func (bool) -> {
}
Resulting in the following error:
Building canisters...
Executing 'npx azle canister'
Building canister canister
Done in 3.41s
🎉 Built canister canister at .azle/canister/canister.wasm
error: parser error
┌─ /src/index.did:1:26
│
1 │ service: (func (bool) -> {
│ ^ Unexpected token
│
= Expects "("
Error: Failed while trying to build all canisters.
Caused by: Failed while trying to build all canisters.
The post-build step failed for canister 'bkyz2-fmaaa-aaaaa-qaaaq-cai' (canister) with an embedded error: Candid file check failed for /src/index.did.: Candid parser error: Unrecognized token `LBrace` found at 25:26
Expected one of "(": Unrecognized token `LBrace` found at 25:26
Expected one of "("
The text was updated successfully, but these errors were encountered:
The actual problem was that it was dropping everything after the -> because of how the service visitor works, after updating that I think it should work. Or in other words, my previous comment is wrong because we are also missing the return type of that func
Given the following canister:
When running
dfx build
,Then the following canister is generated:
Resulting in the following error:
The text was updated successfully, but these errors were encountered: