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
171 stars 83 forks source link

feat: Also report Motoko stable compatibility warnings #3887

Closed luc-blaeser closed 2 weeks ago

luc-blaeser commented 3 weeks ago

Description

For Motoko programs, dfx calls the stable compatibility check of the Motoko compiler to see if the new program version's stable state is compatible with the existing state. This moc --stable-compatible check returns either success, a warning, or an error. While dfx currently already handles the errors, it should also display warnings in future. This would be relevant with future relaxed stable compatibility checks (https://github.com/dfinity/motoko/pull/4602).

How Has This Been Tested?

SDK unit tests SDK e2e tests (added test case) Manual tests with upgrade cases from Motoko documentation (successful, warning, error).

Checklist:

luc-blaeser commented 2 weeks ago

Thank you @lwshang