From 109e35be17deb6eb1411a75780dabff6ee2ae1da Mon Sep 17 00:00:00 2001 From: "Sean T. Allen" Date: Sat, 15 Jan 2022 11:59:51 -0500 Subject: [PATCH] Update for change in type of Env.root The type of Env.root was changed as part of RFC #65: https://github.com/ponylang/rfcs/blob/main/text/0065-env-root-not-optional.md --- .release-notes/env-root.md | 5 +++++ examples/async_tcp_property.pony | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .release-notes/env-root.md diff --git a/.release-notes/env-root.md b/.release-notes/env-root.md new file mode 100644 index 0000000..9a0c711 --- /dev/null +++ b/.release-notes/env-root.md @@ -0,0 +1,5 @@ +## Update to work with latest ponyc + +The most recent ponyc implements [RFC #65](https://github.com/ponylang/rfcs/blob/main/text/0065-env-root-not-optional.md) which changes the type of `Env.root`. + +We've updated accordingly. You won't be able to use this and future versions of the library without a corresponding update to your ponyc version. diff --git a/examples/async_tcp_property.pony b/examples/async_tcp_property.pony index 434b1b8..c84dcbf 100644 --- a/examples/async_tcp_property.pony +++ b/examples/async_tcp_property.pony @@ -123,11 +123,11 @@ class _AsyncTCPSenderProperty is Property1[String] fun gen(): Generator[String] => Generators.unicode() - fun ref property(sample: String, ph: PropertyHelper) ? => - let sender = TCPSender(ph.env.root as AmbientAuth) + fun ref property(sample: String, ph: PropertyHelper) => + let sender = TCPSender(ph.env.root) ph.dispose_when_done( TCPListener( - ph.env.root as AmbientAuth, + ph.env.root, recover MyTCPListenNotify(sender, ph, "PONYCHECK") end, "127.0.0.1", "0"))