dfinity / dfinity/sdk

`--mode reinstall` breaks regenerating lsp dids

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

Nobody has claimed this yet.

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

Description

when deploying the ledger locally using the ledger.private.did and after that swapping to ledger.public.did (no service arguments) and deploying a canister that has a dependency on the ledger, if i use
dfx deploy my_canister_that_depends_on_the_ledger --mode reinstall -y, the did file in .dfx/local/lsp/<ledger_canister_id>.did is not being updated to reflect the fact that no init args are needed. this leads to the motoko extension to complain.
if i use dfx deploy my_canister_that_depends_on_the_ledger instead, everything works as expected

I expected to see this happen:
the dids in the lsp folder are generated correctly, even if i use --mode reinstall

Instead, this happened:
the dids in the lsp folder still contain the service arguments, and therefore the motoko language extension complains.

Meta

dfx --version:

dfx 0.13.1
Screenshot 2023-03-02 at 16 00 12

tagging @rvanasa as this might also interesting for him

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

Reproduce the issue by deploying the local ledger with ledger.private.did, switching to ledger.public.did, and running dfx deploy my_canister_that_depends_on_the_ledger --mode reinstall -y. Inspect .dfx/local/lsp/<ledger_canister_id>.did and compare it with a normal deployment; done means reinstall regenerates the DID without service arguments.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.