Releases: dfinity/motoko
0.6.12
-
for
loops over arrays are now converted to more efficient
index-based iteration (#2831). This can result in significant cycle
savings for tight loops, as well as slightly less memory usage. -
Add type union and intersection. The type expression
T and U
produces the greatest lower bound of types
T
andU
, that is,
the greatest type that is a subtype of both. Dually,T or U
produces the least upper bound of types
T
andU
, that is,
the smallest type that is a supertype of both.One use case of the former is "extending" an existing object type:
type Person = {name : Text; address : Text}; type Manager = Person and {underlings : [Person]};
Similarly, the latter can be used to "extend" a variant type:
type Workday = {#mon; #tue; #wed; #thu; #fri}; type Weekday = Workday or {#sat; #sun};
0.6.11
0.6.10
-
moc
- documentation changes
-
motoko-base
- documentation changes
0.6.9
-
motoko-base
- add Debug.trap : Text -> None (dfinity/motoko-base#288)
0.6.8
0.6.7
-
moc
-
motoko-base:
- Fix bug in
AssocList.diff
(#277) - Deprecate unsafe or redundant functions in library
Option
(unwrap
,assertSome
,assertNull
) (dfinity/motoko-base#275)
- Fix bug in
0.6.6
-
Vastly improved garbage collection scheduling: previously Motoko runtime would do GC
after every update message. We now schedule a GC when- Heap grows more than 50% and 10 MiB since the last GC, or
- Heap size is more than 3 GiB
(1) is to make sure we don't do GC on tiny heaps or after only small amounts of allocation.
(2) is to make sure that on large heaps we will have enough allocation space during the next message.This scheduling reduces cycles substantially, but may moderately increase memory usage.
New flag
--force-gc
restores the old behavior. -
Fix bug in compacting gc causing unnecessary memory growth (#2673)
-
Trap on attempt to upgrade when canister not stopped and there are outstanding callbacks.
(This failure mode can be avoided by stopping the canister before upgrade.) -
Fix issue #2640 (leaked
ClosureTable
entry when awaiting futures fails).
0.6.5
-
Add alternative, compacting gc, enabled with new moc flag
--compacting-gc
.
The compacting gc supports larger heap sizes than the default, 2-space copying collector.NOTE: Dfx 0.7.6 adds optional field
"args"
todfx.json
files,
so Motoko canisters can specifymoc
command-line arguments. E.g.,... "type" : "motoko" ... "args" : "--compacting-gc" ...
-
Documentation fixes.
-
Command line tools:
--help
option provides better documentation of command line
options that have arguments. -
Fix issue #2319 (crash on import of Candid class).
0.6.4
-
For release builds, the banner (
moc --version
) now includes the release
version. -
Fix MacOS release builds (the 0.6.3 tarball for MacOS contained the linux binaries)
0.6.3
-
Motoko is now open source!
-
Better internal consistency checking of the intermediate representation