Releases: dfinity/motoko
0.6.23
0.6.22
-
motoko (
moc
) -
Various reports from CI are now pushed to
https://dfinity.github.io/motoko (#3113)
0.6.21
-
motoko (
moc
)- Emit new ICP metadata custom section 'motoko:compiler' with compiler release or revision in UTF8 (e.g. "0.6.21"). Default is
icp:private
(#3091). - Generalized
import
supporting pattern matching and selective field imports (#3076). - Fix: insert critical overflow checks preventing rare heap corruptions
in out-of-memory allocation and stable variable serialization (#3077). - Implement support for 128-bit Cycles-API (#3042).
- Emit new ICP metadata custom section 'motoko:compiler' with compiler release or revision in UTF8 (e.g. "0.6.21"). Default is
-
motoko-base
ExperimentalInternetComputer
library, exposing low-level, binarycall
function (a.k.a. "raw calls") (dfinity/motoko-base#334, Motoko #3806).Principal.fromBlob
added (dfinity/motoko-base#331).
0.6.20
-
motoko
- Implement support for
heartbeat
system methods (thanks to ninegua) (#2971)
- Implement support for
-
motoko-base
- Add
Iter.filter : <A>(Iter<A>, A -> Bool) -> Iter<A>
(thanks to jzxchiang1) (dfinity/motoko-base#328).
- Add
0.6.19
-
motoko-base
- Fixed a bug in the
RBTree.size()
method.
- Fixed a bug in the
0.6.18
-
moc
- Add runtime support for low-level, direct access to 64-bit IC stable memory, including documentation.
- Add compiler flag
--max-stable-pages <n>
to cap any use ofExperimentalStableMemory.mo
(see below), while reserving space for stable variables.
Defaults to 65536 (4GiB).
-
motoko-base
- (Officially) add
ExperimentalStableMemory.mo
library, exposing 64-bit IC stable memory
- (Officially) add
-
BREAKING CHANGE (Minor):
The previously available (but unadvertised)ExperimentalStableMemory.mo
used
Nat32
offsets. This one usesNat64
offsets to (eventually) provide access to more address space.
0.6.17
0.6.16
- Minor performance improvement to the mark-compact garbage collector
0.6.15
0.6.14
-
The compiler now embeds the existing Candid interface and new
stable signature of a canister in additional Wasm custom sections,
to be selectively exposed by the IC, and to be used by tools such asdfx
to verify upgrade compatibility (see extended documentation).New compiler options:
--public-metadata <name>
: emit ICP custom section<name>
(candid:args
orcandid:service
ormotoko:stable-types
) aspublic
(default isprivate
)--stable-types
: emit signature of stable types to.most
file--stable-compatible <pre> <post>
: test upgrade compatibility between stable-type signatures<pre>
and<post>
A Motoko canister upgrade is safe provided:
- the canister's Candid interface evolves to a Candid subtype; and
- the canister's Motoko stable signature evolves to a stable-compatible one.
(Candid subtyping can be verified using tool
didc
available at:
https://github.com/dfinity/candid.) -
BREAKING CHANGE (Minor):
Tightened typing for type-annotated patterns (including function parameters)
to prevent some cases of unintended and counter-intuitive type propagation.This may break some rare programs that were accidentally relying on that
propagation. For example, the indexingxs[i]
in the following snippet
happend to type-check before, becausei
was given the more precise
typeNat
(inferred fromrun
's parameter type), regardless of the
overly liberal declaration as anInt
:func run(f : Nat -> Text) {...}; let xs = ["a", "b", "c"]; run(func(i : Int) { xs[i] });
This no longer works,
i
has to be declared asNat
(or the type omitted).If you encounter such cases, please adjust the type annotation.
-
Improved garbage collection scheduling
-
Miscellaneous performance improvements
- code generation for
for
-loops over arrays has improved - slightly sped up
Int
equality comparisons
- code generation for