Closed ByronBecker closed 8 months ago
Note that this bug was found in the context of trying to solve https://github.com/dfinity/motoko/issues/3857 🙂
I don't see a problem here. You are changing the return type, which is a breaking change. Maybe we should error out in install instead of a warning?
I don't argue that the change is breaking, but the "FIX ME!" comment/error messaging feedback feels like a todo that wasn't handled.
Instead I'd expect this to show up like all other breaking changes, where dfx would tell me that I'm making a breaking change, and prompt me enter "yes"
to force through the upgrade
Yeah, I agree. FIX ME
is a warning to the user to fix the "almost" breaking change. Because you are returning an option type, result from the old version always becomes null
with the new client, so it's technically not a breaking change, but nice to fix. I will file a ticket to promote this warning to error in dfx, so that users can enter "yes".
I was upgrading a canister and ran into this issue.
Prior to the upgrade, this is the code that was changed.
Became