Skip to content

0.16.3

Choose a tag to compare

@github-actions github-actions released this 29 Sep 14:23
· 410 commits to master since this release
bee6787
  • motoko (moc)

    • Added Prim.getSelfPrincipal<system>() : Principal to get the principal of the current actor (#5518).

    • EXPERIMENTAL: Contextual dot notation (#5458):
      Writing e0.f(<Ts>)(e1,...,en) is short-hand for M.f(<Ts>)(e0, e1, ..., en), provided:

      • f is not already a field or special member of e0.
      • There is a unique module M with member f in the context that declares:
        • a public type Self<T1,..., Tn> that can be instantiated to the type of e0;
        • a public field f that accepts (e0, e2, ..., en) as arguments.
    • Added an optional warning for redundant type instantiations in generic function calls (#5468).
      Note that this warning is off by default.
      It can be enabled with the -W M0223 flag.

    • Added -A and -W flags to disable and enable warnings given their message codes (#5496).

      For example, to disable the warning for redundant stable keyword, use -A M0217.
      To enable the warning for redundant type instantiations, use -W M0223.
      Multiple warnings can be disabled or enabled by comma-separating the message codes, e.g. -A M0217,M0218.
      Both flags can be used multiple times.

    • Added -E flag to treat specified warnings as errors given their message codes (#5502).

    • Added --warn-help flag to show available warning codes, current lint level (Allowed, Warn or Error), and descriptions (#5502).

    • moc.js : Added setExtraFlags method for passing some of the moc flags (#5506).