Skip to content

0.16.0

Compare
Choose a tag to compare
@SeanTAllen SeanTAllen released this 28 Jul 18:46

Pony 0.16.0 is an awesome step forward but its also going to be a painful step forward. 0.16.0 features the implementation of the "Explicit partial calls" RFC. It is going to break almost every single Pony codebase out there. There are no high priority bug fixes in this release so, you can take your time upgrading.

Explicit partial calls

In Pony 0.16.0, we've introduced a breaking syntax change that affects all
calls to partial functions (functions that can raise an error).

All partial function calls are now required to be followed by a question mark.

For example, iterator.next() is now iterator.next()?, providing a visual
indication at the call site of any places where an error may be raised.

Call sites to partial functions that fail to include the question mark
will result in a compiler error that looks like this:

  /tmp/test.pony:5:19: call is not partial but the method is - a question mark
  is required after this call
      iterator.next()
                    ^
      Info:
      /tmp/ponyc/packages/builtin/array.pony:578:24: method is here
        fun ref next(): B->A ? =>
                             ^

See the RFC for more details: https://github.com/ponylang/rfcs/blob/master/text/0039-explicit-partial-calls.md

As you might imagine, this change will affect nearly every Pony codebase,
so we want to provide support for developers who are making this transition.

We've created migration scripts for the convenience of developers making the
transition. These scripts can ingest Pony compiler errors in the format emitted
by ponyc to STDERR and make the necessary modifications to the Pony source code
files that caused the errors, adding the question mark wherever it is needed
for compliance with the new syntax requirement.

If you need any other assistance with this transition, please reach out to
us. We're here to help!

[0.16.0] - 2017-07-28

Fixed

  • Fix compiler assertion failure on unused reference to _ (PR #2091)
  • Destroy all actors on runtime termination (PR #2058)
  • Fixed compiler segfault on empty triple quote comment. (PR #2053)
  • Fix compiler crash on exhaustive match where last case is a union subset (PR #2049)
  • Make pony_os_std_print() write a newline when given empty input. (PR #2050)
  • Fix boxed tuple identity when type identifiers differ (PR #2009)
  • Fix crash on interface function pointer generation (PR #2025)

Added

  • Alpine Linux compatibility for pony (PR #1844)
  • Add cli package implementing the CLI syntax (RFC #38)
    • Initial (PR #1897) implemented the full RFC and contained:
      • Enhanced Posix / GNU program argument syntax.
      • Commands and sub-commands.
      • Bool, String, I64 and F64 option / arg types.
      • Help command and syntax errors with formatted output.
    • Update (PR #2019) added:
      • String-seq (ReadSeq[String]) types for repeated string options / args.
      • Command fullname() to make it easier to match on unique command names.
      • Checking that commands are leaves so that partial commands return syntax errors.

Changed

  • Forbid returning and passing tuples to FFI functions (PR #2012)
  • Deprecate support of Clang 3.3
  • Explicit partial calls - a question mark is now required to be at the call site for every call to a partial function.
    • See RFC 39.
    • Migration scripts for user code, for convenience, are provided here: