Skip to content

Releases: dfinity/motoko

0.6.23

05 Mar 22:08
650e3bf
Compare
Choose a tag to compare
  • motoko (moc)

    • bugfix: fix pretty printing of (stable) types and #3128 (#3130)

      • Collect constructors transitively before emitting a .most file.
      • Modifies type pretty printer to produce well-formed types and stable type signatures.

0.6.22

24 Feb 12:44
a39386f
Compare
Choose a tag to compare
  • motoko (moc)

    • Fix: remove bogus error when transitively importing module with
      selective field imports (#3121)
    • Fix: Treating eponymous types from separate candid files (#3103)
  • Various reports from CI are now pushed to
    https://dfinity.github.io/motoko (#3113)

0.6.21

31 Jan 17:41
198d617
Compare
Choose a tag to compare
  • 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).
  • motoko-base

0.6.20

11 Jan 11:43
6a6cb0f
Compare
Choose a tag to compare
  • motoko

    • Implement support for heartbeat system methods (thanks to ninegua) (#2971)
  • motoko-base

0.6.19

05 Jan 16:42
37e179d
Compare
Choose a tag to compare
  • motoko-base

    • Fixed a bug in the RBTree.size() method.

0.6.18

20 Dec 09:56
adeaef1
Compare
Choose a tag to compare
  • 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 of ExperimentalStableMemory.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
  • BREAKING CHANGE (Minor):
    The previously available (but unadvertised) ExperimentalStableMemory.mo used
    Nat32 offsets. This one uses Nat64 offsets to (eventually) provide access to more address space.

0.6.17

10 Dec 13:23
ee30fbc
Compare
Choose a tag to compare
  • Improved handling of one-shot messages facilitating zero-downtime
    upgrades (#2938).
  • Further performance improvements to the mark-compact garbage
    collector (#2952, #2973).
  • Stable variable checking for moc.js (#2969).
  • A bug was fixed in the scoping checker (#2977).

0.6.16

03 Dec 13:41
47d18eb
Compare
Choose a tag to compare
  • Minor performance improvement to the mark-compact garbage collector

0.6.15

26 Nov 20:59
0ac042a
Compare
Choose a tag to compare
  • Fixes crash when (ill-typed) switch expression on non-variant
    value has variant alternatives (#2934)

0.6.14

19 Nov 17:31
8459514
Compare
Choose a tag to compare
  • 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 as dfx
    to verify upgrade compatibility (see extended documentation).

    New compiler options:

    • --public-metadata <name>: emit ICP custom section <name> (candid:args or candid:service or motoko:stable-types) as public (default is private)
    • --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 indexing xs[i] in the following snippet
    happend to type-check before, because i was given the more precise
    type Nat (inferred from run's parameter type), regardless of the
    overly liberal declaration as an Int:

    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 as Nat (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