Candid file check failed: Cannot import
paulyoung opened this issue · comments
I recently started breaking up my Candid file into smaller files to make it more manageable.
For example, I moved everything related to Canistergeek to candid/canistergeek.did
and now do import "canistergeek.did";
in candid/codebase.did
.
My candid_interface_compatibility
test (similar to this one) supports this, and now also my ic-repl
tests (thanks to @chenyan2002 and dfinity/ic-repl#50)
However, dfx generate
now fails.
I tried the following:
dfx generate --verbose codebase_backend
I expected to see this happen:
Generating type declarations for canister codebase_backend:
frontend/declarations/codebase_backend/codebase_backend.did.js
Instead, this happened:
Error: (BFailed while trying to generate type declarations for 'codebase_backend'.
Caused by: (BFailed while trying to generate type declarations for 'codebase_backend'.
Candid file check failed for frontend/declarations/codebase_backend/codebase_backend.did.
Cannot import "canistergeek.did"
Lines 144 to 152 in fc6d589
Meta
dfx --version
:
dfx 0.12.0-beta.3
@chenyan-dfinity Is this something that we can fix by upgrading Motoko?