Hello everyone. Earlier this week, the Motoko team shipped the v0.11.0 version of Motoko. In addition to a few minor improvements, like the Option.equal
method, and warnings for unused identifiers, a new safety mechanism was introduced that could cause breaking changes to existing code.
Overview
In previous Motoko versions, third-party library functions could make calls to sensitive functions such as ExperimentalCycles.add(...)
and Timer.setTimer(...)
without providing any indication to the caller that sensitive system functionality was being used.
In Motoko 0.11.0 and newer, the type system is used to detect and prevent this scenario while still allowing developers to grant access to sensitive functions.
Migration
You can find the migration guide here: Motoko v0.11.0: Safety feature migration guide | Internet Computer. Please take a look and update your code if necessary. It may be especially impactful for certain library authors or any Motoko canisters that made use of those libraries.
This change will be bundled with version 0.18.0 of dfx
, which will be shipped by the end of the week, March 8, 2024.
If you have any questions, please drop them in the thread or email team-motoko@dfinity.org directly.