dfinity / dfinity/sdk

Parse candid argument early

Open
#2,397 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

accepted triaged
Dominant language
Rust
Stars
204
Forks
98
PR merge metrics
No merged PRs in 30d

Description

I've noticed that the --argument is not parsed when invoked, but only later one when used. Here's an example:

dfx deploy --no-wallet --argument 'version_info = "hello"'

Doing this, my canister will be built (~2mn) before I get a parse error. It would be great to fail early.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the dfx deploy entry point and trace how the --argument value is handled. Run the shown dfx deploy command with the invalid candid argument and observe when parsing fails relative to the build. Done means the parse error is reported before the canister build begins.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.