Skip to content

Releases: ponylang/ponyc

0.58.2

24 Feb 13:50
Compare
Choose a tag to compare

Fedora 39 added as a supported platform

We've added Fedora 39 as a supported platform. We'll be building ponyc releases for it until it stops receiving security updates at the end of 2024. At that point, we'll stop building releases for it.

Add support for MacOS on Apple Silicon

Back in August of 2023, we had to drop MacOS on Apple Silicon as a supported platform as we had no Apple Silicon test and build environment. We lost our existing environment when we had to migrate off of CirrusCI.

GitHub recently announced that they now have Apple Silicon MacOS machines so, we are back in business and MacOS on Apple Silicon is once again a supported platform.

Fix for potential memory corruption in Array.copy_to

Array.copy_to did not check whether the source or destination Arrays had been initialized or whether the requested number of elements to be copied exceeded the number of available elements (allocated memory). These issues would result in potential dereferencing of a null pointer or attempts to access unallocated memory.

Before this fix, the following code would print 11 then 0:

actor Main
  new create(e: Env) =>
    var src: Array[U8] = [1]
    var dest: Array[U8] = [11; 1; 2; 3; 4; 5; 6]

    try
      e.out.print(dest(0)?.string())
    end
    src.copy_to(dest, 11, 0, 10)

    try
      e.out.print(dest(0)?.string())
    end

After the fix, this code correctly prints 11 and 11.

Fix esoteric bug with serializing bare lambdas

Almost no one uses bare lambdas. And even fewer folks end up passing them through the Pony serialization code. So, of course, Red Davies did just that. And of course, he found a bug.

When we switched to LLVM 15 in 0.54.1, we had to account for a rather large change with how LLVM handles pointer and types. In the process of doing that update, a mistake was made and serializing of bare lambdas was broken.

We've made the fix and introduced a regression test. Enjoy your fix Red!

Add constrained types package to standard library

We've added a new package to the standard library: constrained_types.

The constrained_types package allows you to represent in the type system, domain rules like "Username must be 6 to 12 characters in length and only container lower case ASCII letters".

To learn more about the package, checkout its documentation on the standard library docs site.

You can learn more about the motivation behind the package by reading the RFC.

[0.58.2] - 2024-02-24

Fixed

  • Fix for potential memory corruption in Array.copy_to (PR #4490)
  • Fix bug when serializing bare lambdas (PR #4486)

Added

  • Add Fedora 39 as a supported platform (PR #4485)
  • Add MacOS on Apple Silicon as a supported platform (PR #4487)
  • Add constrained_types package to the standard library (PR #4493)

0.58.1

27 Jan 01:36
Compare
Choose a tag to compare

Fix missing "runtime_info" package documentation

The documentation for the "runtime_info" package wasn't being generated. We've fixed that oversight.

Use the correct LLVM intrinsics for powi on *nix.

We were using outdated LLVM intrinsics llvm.powi.f32j and llvm.powi.f64; updated to use llvm.powi.f32.i32 and llvm.powi.f64.i32.

[0.58.1] - 2024-01-27

Fixed

  • Fix missing "runtime_info" package documentation (PR #4476)
  • Use the correct LLVM intrinsics for powi on *nix. (PR #4481)

0.58.0

24 Nov 13:56
Compare
Choose a tag to compare

Disallow return at the end of a with block

When we reimplemented with blocks in 2022, we allowed the usage of return at the end of the block. Recent analysis of the generated LLVM flagged incorrect LLVM IR that was generated from such code.

Upon review, we realized that return at the end of a with block should be disallowed in the same way that return at the end of a method is disallowed.

This a breaking change. If you had code such as:

actor Main
  new create(env: Env) =>
    with d = Disposble do
      d.set_exit(10)
      return
    end

You'll need to update it to:

actor Main
  new create(env: Env) =>
    with d = Disposble do
      d.set_exit(10)
    end

The above examples are semantically the same. This also fixes a compiler crash if you had something along the lines of:

actor Main
  new create(env: Env) =>
    with d = Disposble do
      d.set_exit(10)
      return
    end
    let x = "foo"

Where you had code "after the return" which would be unexpected by the compiler.

Turn on verify pass by default

The verify compiler pass will check the LLVM IR generated for the program being compiled for errors. Previously, you had to turn verify on. It is now on by default and can be turned off using the new --noverify option.

We decided to turn on the pass for two reasons. The first is that it adds very little overhead to normal compilation times. The second is it will help generate error reports from Pony users for lurking bugs in our code generation.

The errors reported don't generally result in incorrect programs, but could under the right circumstance. We feel that turning on the reports will allow us to find and fix bugs quicker and help move us closer to Pony version 1.

[0.58.0] - 2023-11-24

Changed

  • Disallow return at the end of a with block (PR #4467)
  • Make the verify pass on by default (PR #4036)

0.57.1

29 Oct 02:18
Compare
Choose a tag to compare

Fix compiling Pony programs on x86 MacOS when XCode 15 is the linker

With the introduction of XCode 15, you could no longer link Pony programs on x86 MacOS. We've fixed the issue. Apple Silicon was uneffected.

[0.57.1] - 2023-10-29

Fixed

  • Fix compiling Pony programs on X86 MacOS when XCode 15 is the linker (PR #4466)

0.57.0

08 Oct 14:54
Compare
Choose a tag to compare

Fix broken DTrace support

Quite a while back, we broke the support in our Makefile for building the Pony runtime with support for DTrace. We've fixed that and added tests to assure it builds.

Fix compilation error when building with pool_memalign in release mode

When attempting to build the Pony runtime with the pool_memalign option, users would encounter a compilation error if building a release rather than debug version of the runtime. We've fixed the compilation error and added CI testing to verify we don't get a regression.

Fix compiler bug that allows an unsafe data access pattern

In November of last year, core team member Gordon Tisher identified a bug in the type system implementation that allowed sharing of data that shouldn't be shareable.

The following code should not compile:

class Foo
  let s: String box

  new create(s': String box) =>
    s = s'

  fun get_s(): String val =>
    // this is unsafe and shouldn't be allowed
    recover val s end

actor Main
  new create(env: Env) =>
    let s = String
    s.append("world")
    let foo = Foo(s)
    env.out.print("hello " + foo.get_s())

Upon investigation, we found that this bug goes back about 8 or 9 years to the when viewpoint adaptation was introduced into the Pony compiler.

We've fixed the logic flaw and added tests to verify that it can't be reintroduced.

This will potentially break your code if you coded an unsafe recover block that the compiler previously allowed.

[0.57.0] - 2023-10-08

Fixed

  • Fix broken DTrace support (PR #4453)
  • Fix compilation error when building with pool_memalign in release mode (PR #4455)
  • Fix compiler bug that allows an unsafe data access pattern (PR #4458)

Changed

  • Fix compiler bug that allows an unsafe data access pattern (PR #4458)

0.56.2

16 Sep 12:52
Compare
Choose a tag to compare

"No op" release to get Windows release out

When we moved from CirrusCI to GitHub Actions, we had some issues with the Windows releases that were do to tiny typos in the config that linting didn't catch.

This resulted in there being no 0.56.0 and 0.56.1 Windows releases. Because 0.56.1 was primarily to fix a Windows bug, we are doing a 0.56.2 release that should hopefully work for Windows as we think we have found all the tiny typos.

[0.56.2] - 2023-09-16

Added

  • "No op" release to get Windows release out

0.56.1

16 Sep 12:22
Compare
Choose a tag to compare

Fix "double socket close" issue with Windows version of TCPConnection

When fixing a number of "smaller" Windows TCP networking issues a couple years back, in addition to fixing those issues, we introduced a new bug. That bug lingered for two years. It lingered in large part because it would only become apparent in a low resource environment.

When we recently switched our Windows CI from CirrusCI to GitHub Actions, we went from a high-resource environment to a low-resource environment and started getting a ton of "random" Windows TCP test failures.

The problem that was fairly easy to recreate in a test environment would be fairly unlikely in most applications but existed nontheless. The scenario in our test environment was like this:

  • Test 1 runs and completes but hasn't done test teardown yet
  • Test 2 starts up
  • Test 1 runs the "buggy" line of code and closes the socket it has been using with OS, but doesn't reset its own internal record of the file descriptor for the socket.
  • Test 2 is gets a socket from the OS with the file descriptor for the socket just closed by Test 1
  • Test 1 still has a "valid" file descriptor and as part of full shutdown, closes the socket associated with "its" file descriptor. When Test 1 does this, test 2's socket closes and the test fails to complete successfully.

The problem would appear "in the wild" if a Windows application was quickly closing and opening TCP sockets in a manner similiar to the Pony standard library TCP tests.

[0.56.1] - 2023-09-16

Fixed

  • Fix "double socket close" issue with Windows version of TCPConnection (PR #4437)

0.56.0

30 Aug 14:16
Compare
Choose a tag to compare

N.B. There is no Windows version of this release due to a build system failure. The only change that is relevant to Windows is the pony_check fix that will be picked up in the next Windows release.

Update Pony musl Docker images to Alpine 3.18

We've updated our ponylang/ponyc:latest-alpine, ponylang/ponyc:release-alpine, and ponylang/ponyc:x.y.z-alpine images to be based on Alpine 3.18. Previously, we were using Alpine 3.16 as the base.

Drop support for Alpine versions prior to 3.17

We've dropped support for Alpine versions prior to 3.17. The ponyc compiler that we supply will not work on earlier Alpine versions. If you need to use on 3.16 or earlier, you'll need to patch the compiler and build from source.

The change is relatively straightforward and can be reverse engineered from the pull request that dropped 3.16 support.

FreeBSD is no longer a supported platform

We no longer have access to hardware that we can test FreeBSD on as part of our regular Continous Integration and Release cycles. As such, we are removing FreeBSD as a supported platform. We will make best effort attempts to not break FreeBSD, however, it is likely to fall behind and need maintenance from interested community members.

Add macOS on Intel support

We've re-added macOS on Intel as a fully supported platform. Nightly and release builds will are available via ponyup.

We plan on maintaining macOS on Intel support for as long as we are doing our builds on GitHub Actions and GitHub provides macOS Intel runners.

Drop macOS on Apple Silicon as a fully supported platform

We've dropped macOS on Apple Silicon as a fully supported platform.

At the moment, we don't have access to a CI environment with macOS on Apple Silicon. Until we have one, we can no longer maintain macOS as a fully supported platform.

We expect that we can start offering full macOS support on Apple Silicon in Q4 of 2023. This assumes that GitHub rolls out their delayed macOS on Apple Silicon hosted CI runners in Q4.

As of Pony 0.56.0, we are no longer providing prebuilt Apple Silicon builds of ponyc. You can still build from source. And, existing prebuilt release and nightly macOS binaries will remain available via ponyup and Cloudsmith.

Our plan is to maintain corral and ponyup on Apple Silicon as we don't expect any breaking changes to ponyc before GitHub offers Apple Silicon runners.

We will be doing our best to not break macOS on Apple Silicon during the transition. Hopefully, our macOS on Intel and Linux on aarch64 CI coverage will keep any accidental breakage from impacting on macOS on Apple Silicon. We can not guarantee that, so, community support in the form of PRs to keep macOS on Apple Silicon working are greatly appreciated.

Avoid hangs in async pony_check properties when using actions

Due to a logical flaw in the pony_check package regarding how the _PropertyRunner handles expect_action(...) and complete_action(...)/fail_action(...) calls, it was possible for lingering executions of previous runs to call into the _PropertyRunner instance that was already handling another run, completing or failing some actions of the current run. This has resulted in occasional hangs in CI.

With this change the hangs could not be reproduces locally or in CI.

[0.56.0] - 2023-08-30

Fixed

  • Avoid hangs in async pony_check properties when using actions (PR #4405)

Added

  • Add macOS on Intel as fully supported platform (PR #4390)

Changed

  • Drop support for Alpine versions prior to 3.17 (PR #4407)
  • Update Pony musl Docker images to Alpine 3.18 (PR #4407)
  • Drop FreeBSD as a supported platform (PR #4382)
  • Drop macOS on Apple Silicon as a fully supported platform (PR #4403)

0.55.1

16 Aug 17:29
Compare
Choose a tag to compare

Remove stable from Docker images

Previously, we were including our very old and very deprecated dependency management tool stable in our ponyc Docker images. We've stopped.

Fix broken linking when using a sanitizer

The internal link command used when building a Pony program with a sanitizer in place wasn't correctly generated and linking the program would fail. This has been fixed.

Fix memory errors with some --debug program builds

When we upgraded to LLVM 15, we accidentally changed the optimization level applied to --debug builds. That change in optimization levels surfaced a rather complicated bug that we've been looking into. The end result? Some programs would crash with memory errors like segfaults or bad access.

We've updated to go back to the optimization setup we had with LLVM 14. We recommend updating your ponyc installation as soon as possible.

Move heap ownership info from chunk to pagemap

An internal runtime change has been made around where/how heap chunk ownership information is stored in order to improve performance. The tradeoff is that this will now use a little more memory in order to realize the performance gains.

[0.55.1] - 2023-08-16

Fixed

  • Fix broken linking when using a sanitizer (PR #4393)
  • Fix memory errors with some --debug program builds (PR #4372)

Changed

  • Stop putting stable in ponyc Docker images (PR #4353)
  • Move heap ownership info from chunk to pagemap (PR #4371)

0.55.0

27 May 17:33
Compare
Choose a tag to compare

Switch supported MacOS version to Ventura

We've switched our supported MacOS version from Monterey to Ventura.

"Supported" means that all ponyc changes are tested on Ventura rather than Monterey and our pre-built ponyc distribution is built on Ventura.

Fixed a possible resource leak with with blocks

Previously, with blocks would allow the usage of _ as a variable in the with parameters.

A _ variable isn't usable within the block itself and dispose wasn't called on the variable as it isn't valid to call any methods on the special _ variable.

The lack of dispose call on objects that might control resources could result in a resource leak.

We've addressed the issue by disallowing _ as a variable name in with parameters.

This is a breaking change, albeit one we don't expect to have any "real-world" impact.

Drop Ubuntu 18.04 support

Ubuntu 18.04 has reached its end of life date. We've dropped it as a supported platform. That means, we no longer test against it when doing CI and we no longer create prebuilt binaries for installation via ponyup for Ubuntu 18.04.

We will maintain best effort to keep Ubuntu 18.04 continuing to work for anyone who wants to use it and builds ponyc from source.

[0.55.0] - 2023-05-27

Changed

  • Change supported MacOS version from Monterey to Ventura (PR #4349)
  • Fix a possible resource leak with with blocks (PR #4347)
  • Drop Ubuntu 18.04 support (PR #4351)