Skip to content

Releases: dfinity/motoko

0.14.7

04 Apr 10:55
15b91cb
Compare
Choose a tag to compare
  • motoko (moc)

    • Preserve and infer named types both to improve displayed types in error messages, and to preserve function signatures when deriving Candid types (#4943).
      The names remain semantically insignificant and are ignored when comparing types for subtyping and equality.

      For example,

      func add(x : Int, y : Int) : (res : Int) = x + y;

      now has inferred type:

      (x : Int, y: Int) -> (res : Int)

      Previously, the type would be inferred as:

      (Int, Int) -> Int
    • Refine the *.most stable signature file format to distinguish stable variables that are strictly required by the migration function rather than propagated from the actor body (#4991).
      This enables the stable compatibility check to verify that a migration function will not fail due to missing required fields.
      Required fields are declared in, not stable, in the actor's pre-signature.

    • Added improved LSP cache for typechecking (thanks to Serokell) (#4931).

    • Reduce enhanced-orthogonal-persistence memory requirements using incremental allocation within partitions (#4979).

  • motoko-base

    • Deprecated ExperimentalCycles.add, use a parenthetical (with cycles = <amount>) <send> instead (dfinity/motoko-base#703).

0.14.6

01 Apr 07:56
668bcde
Compare
Choose a tag to compare
  • motoko (moc)

    • To prevent implicit data loss due to upgrades, stable fields may no longer be dropped or promoted to lossy supertypes (#4970).
      Removing a stable variable, or promoting its type to a lossy supertype by, for example, dropping nested record fields,
      now requires an explicit migration expression.
      Promotion to non-lossy supertypes, such as Nat to Int or {#version1} to {#version1; #version2}, is still supported.

    • Now we detect (and warn for) fields in literal objects and record extensions,
      (as well as public fields or types in object and class) that are inaccessible
      due to a user-specified type constraint (#4978, #4981).

    • We now provide release artefacts for Darwin-arm64 and Linux-aarch64 platforms (#4952).

0.14.5

25 Mar 16:28
51fa746
Compare
Choose a tag to compare
  • motoko (moc)

    • Performance improvements to the default timer mechanism (#3872, #4967).
  • documentation (mo-doc)

    • Changed extracted let bindings with manifest function type to appear as funcs (#4963).

0.14.4

18 Mar 00:47
da8eea0
Compare
Choose a tag to compare

0.14.3

04 Mar 12:25
429e9fb
Compare
Choose a tag to compare
  • motoko (moc)

    • Added primitive predicate isReplicatedExecution (#4929).
  • motoko-base

    • Added isRetryPossible : Error -> Bool to Error (dfinity/motoko-base⁠#692).

    • Made ExperimentalInternetComputer.replyDeadline to return
      an optional return type (dfinity/motoko-base⁠#693).
      Caveat: Breaking change (minor).

    • Added isReplicated : () -> Bool to ExperimentalInternetComputer (dfinity/motoko-base#694).

0.14.2

26 Feb 21:28
8add58e
Compare
Choose a tag to compare
  • motoko (moc)

    • Added support for sending cycles and setting a timeout in parentheticals.
      This is an experimental feature, with new syntax, and now also allowing best-effort
      message sends. The legacy call Cycles.add<system> is still supported (#4608).

      For example, if one wants to attach cycles to a message send, one can prefix it with a parenthetical

      (with cycles = 5_000) Coins.mine(forMe);

      Similarly a timeout for best-effort execution (also called bounded-wait) can be specified like

      let worker = (with timeout = 15) async { /* worker loop */ };

      A common base for fields optionally goes before the with and can be customised with both fields
      after it. Please consult the documentation for more usage information.

    • bugfix: mo-doc will now generate documentation for actors and actor classes (#4905).

    • bugfix: Error messages now won't suggest privileged/internal names (#4916).

0.14.1

13 Feb 09:44
ee6f75f
Compare
Choose a tag to compare
  • motoko (moc)

    • bugfix: Be more precise when reporting type errors in migration fields (#4888).

0.14.0

05 Feb 08:37
b0123f5
Compare
Choose a tag to compare
  • motoko (moc)

    • Add .values() as an alias to .vals() for arrays and Blobs (#4876).

    • Support explicit, safe migration of persistent data allowing arbitrary
      transformations on a selected subset of stable variables.
      Additional static checks warn against possible data loss (#4812).

      As a very simple example:

      import Nat32 "mo:base/Nat32";
      
      (with migration =
        func (old : { var size : Nat32 }) : { var length : Nat } =
          { var length = Nat32.toNat(old.size) }
      )
      persistent actor {
        var length : Nat = 0;
      }

      may be used during an upgrade to rename the stable field size to length,
      and change its type from Nat32 to Nat.

      See the documentation for full details.

0.13.7

03 Feb 12:11
80ba70c
Compare
Choose a tag to compare
  • motoko (moc)

    • Support passing cycles in primitive call_raw (resp. ExperimentalInternetComputer.call) (#4868).

0.13.6

20 Jan 23:31
6cb13b5
Compare
Choose a tag to compare
  • motoko (moc)

    • Support the low Wasm memory hook: system func lowmemory() : async* () { ... } (#4849).

    • Breaking change (minor) (#4854):

      • For enhanced orthogonal persistence: The Wasm persistence modes used internally for canister upgrades have been changed to lower case names,
        keep and replace and instead of Keep and Replace:

        If using actor class instances with enhanced orthogonal persistence, you would need to recompile the program and upgrade with latest moc and dfx.
        Otherwise, no action is needed.

    • bugfix: Checks and mitigations that timer servicing works (#4846).

    • bugfix: Some valid upgrades deleting a stable variable could fail the --enhanced-orthogonal-persistence stable compatibility check due to a bug (#4855).