Skip to content

0.7.0

Choose a tag to compare

@github-actions github-actions released this 25 Aug 12:19
· 1487 commits to master since this release
0c6948b
  • motoko (moc)

    • BREAKING CHANGE (Minor):
      Adds new syntax for merging records (objects) and
      adding/overwriting fields. The expression

      { baseA and baseB with field1 = val1; field2 = val2 }

      creates a new record by joining all (statically known) fields from
      baseA/B and the explicitly specified field1/2.
      This is a breaking change, as a new keyword with has been added.
      Restrictions for ambiguous and var fields from bases apply. (#3084)

    • Add new support for installing actor class instances on the IC,
      enabling specification of canister settings, install, upgrade and
      reinstall. (#3386)

      A new expression

        (system <exp> . <id>)
      

      where <exp> is an imported library and <id> is the name of
      an actor class, accesses a secondary constructor of the class
      that takes an additional argument controlling the installation.

      For example,

        await (system Lib.Node)(#upgrade a)(i);

      upgrades actor a with the code for a new instance of class Lib.Node,
      passing constructor argument (i).

    • Performance improvements for assigment-heavy code (thanks to nomeata) (#3406)