Pony 0.18.0 contains a high priority compiler bug fix. We recommend updating as soon as possible. Note, however, that there is a small breaking change in this release as well. It should be a quick upgrade if you are impacted.
Fix compiler crash on union-of-tuples to tuple conversions
Previously, when trying to compile a union-of-tuples, the compiler would segfault. Very annoying if you had a reasonable program like:
primitive Add primitive Dec type AddOrDec is (Add | Dec) type CmRDTCounterOp is (AddOrDec, U128) class CmRDTCounter var _value: U128 new create() => _value = 0 fun read(): U128 => _value fun ref add(number: U128): CmRDTCounterOp => let op: CmRDTCounterOp = if number >= 0 then (Add, number) else (Dec, number) end apply(op) op fun ref apply(op: CmRDTCounterOp) => match op | (Add, let number: U128) => _value = _value + number | (Dec, let number: U128) => _value = _value - number end actor Main new create(env: Env) => var counter = CmRDTCounter.create() let op1 = counter.add(10)
Change String.join to take Iterable
0.18.0 includes the implementation of RFC #48. It’s a nice improvement to the usability of
String.join. It is also, sadly, a breaking change. Such is life. Sometimes you break things to improve them. Upgrading should be straightforward.
Where you previously called
"_".join(["zomg"]), you would now call
"_".join(["zomg"].values()). Any place you hit a compiler error related to
String.join, add a
.values() to the
ReadSeq you are passing and everything will work.
- Fix compiler crash on union-of-tuples to tuple conversions (PR #2176)
- Fix compiler error on lambda capture of ‘_’ (PR #2171)
- Fix read past the end of a buffer in
pool.c. (PR #2139)