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).
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. Thismoc --stable-compatible
check returns either success, a warning, or an error. Whiledfx
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: