dfinity / sdk

IC SDK: a Software Development Kit for creating and managing canister smart contracts on the ICP blockchain.
https://internetcomputer.org/developers
Apache License 2.0
167 stars 84 forks source link

feat: dfx start doesn't require --clean when changing replica versions or options #3777

Closed ericswanson-dfinity closed 1 month ago

ericswanson-dfinity commented 1 month ago

Description

For the shared local network, dfx now stores replica state in a subdirectory, where the subdirectory name is a hash of the replica version and options. This means it will no longer be necessary to pass --clean when switching between dfx versions.

dfx will still reset canister ids when it detects that the local network has changed. But it will now be possible to do something like work with projects A, B, and C with dfx 0.22.0, and projects E and F with dfx 0.23.0, with dfx +0.22.0 start / dfx +0.23.0 start, without --clean, in between them.

Fixes https://dfinity.atlassian.net/browse/SDK-1638

How Has This Been Tested?

Added e2e tests

Checklist: