Cannot compile a non-created canister
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 204
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
Building canister is possible only after it's created. That's wrong, because the user may want for example receive WASM code of canister (e.g. for later installation, as I do in my IC package manager) without actually creating the canister.
This is especially bad on production where creating canister requires to spend funds.
I tried the following:
$ dfx new --no-frontend --type motoko build-bug
$ cd build-bug
$ dfx build build-bug-backend
Error: Cannot find canister id. Please issue 'dfx canister create build-bug-backend'.
I expected to see this happen: building the canister.
Instead, this happened: canister cannot be built.
Meta
dfx --version:
dfx 0.20.0-icsystemtest.0+rev636.dirty-76457e03
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue reproduces the problem with dfx build build-bug-backend after dfx new, and contrasts it with dfx canister create; start by reproducing those commands and tracing where the build requires a canister ID. Done means a canister can be built to obtain its WASM without creation, while the existing create-and-build workflow still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- blockchain, build-system, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100