The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
Revision history for Future-AsyncAwait

0.45    2020-10-22
        [CHANGES]
         * Have Test::Future::AsyncAwait::Awaitable check for the suggested
           new `AWAIT_CHAIN_CANCEL` method

        [BUGFIXES]
         * Avoid refcounting bug when cancelling a suspended SAVEt_SPTR
           (RT133564)
         * Turn on SvPADMY on precancel AV to keep -DDEBUGGING perl happy
           (RT133517)

0.44    2020-10-09
        [CHANGES]
         * Added initial attempt at `CANCEL` blocks for handling Future
           cancellation - experimental
         * Announce upcoming API method rename of `AWAIT_ON_CANCEL` to
           `AWAIT_CHAIN_CANCEL`

0.43    2020-07-06
        [CHANGES]
         * Added explicit use VERSION declarations to every perl file

        [BUGFIXES]
         * Don't segfault when awaiting in closures that capture outer 'our'
           variables (RT132945)

0.42    2020-06-29
        [BUGFIXES]
         * Fixes for assert failures on -DDEBUGGING perls:
            + Workarounds for perl versions prior to 5.22 that get upset about
              new*OP() being invoked with OP_CUSTOM
            + Remember to set SVs_PADMY flag on newly-generated pad slot SVs
              during suspend
         * Don't leak SVs when cleaning up SAVEt_FREESV during cancellation

0.41    2020-06-20
        [CHANGES]
         * Updates for XS::Parse::Sublike 0.10

        [BUGFIXES]
         * Fix Build.PL declaration on XS::Parse::Sublike that it needs to be
           configure_requires

0.40    2020-04-15
        [CHANGES]
         * Support a limited form of SAVEt_SPTR when the var is within the
           current pad; this supports SAVESPTR(PAD_SVl(padix)) as may be used
           by Object::Pad et.al.

0.39    2020-03-27
        [CHANGES]
         * Updated for XS::Parse::Sublike 0.06 API

0.38    2020-03-24
        [CHANGES]
         * Use XS::Parse::Sublike for `async sub` parsing. This makes it
           possible to coƶperate with other sub-like keyword modules
         * Add cross-module test sthat module works correctly with Object::Pad,
           and additionally Syntax::Keyword::Dynamically as well

0.37    2020-03-10
        [CHANGES]
         * Minor reƤrrangement of internal stages to closer match core's
           sub parser and allow more generic hooking in future

        [BUGFIXES]
         * Don't allow a space between attr name and optional parenthesized
           argument (RT131571)

0.36    2020-01-16
        [CHANGES]
         * Add an optional 'force' callback to test_awaitable()

        [BUGFIXES]
         * Fix more segfault cases during compile failures
           (RT129987, RT131487)

0.35    2020-01-07
        [CHANGES]
         * Support lexical scopes declaring a different class of future
         * Document the required API for awaitable objects
         * Provide an API conformance test for implementors of alternative
           future classes

        [BUGFIXES]
         * Provide scalar context to controlling expression of `await`

0.34    2019-12-01 01:45:23
        [CHANGES]
         * Various internal changes to neaten up the hax/ directory of C
           source files, letting them be more shareable with other XS dists

        [BUGFIXES]
         * Fix (some of the cases of) RT129987
         * Only fetch CX_CUR() after the future_done_from_stack() call
           (RT131118)

0.33    2019-09-08 05:16:05
        [BUGFIXES]
         * Remember to SPAGAIN after future_done_from_stack() in case the
           stack array was moved (RT130464)

0.32    2019-09-03 17:00:35
        [CHANGES]
         * Define a super-experimental C-level API for other modules to hook
           parts of the suspend/resume lifecycle to provide extension
           behaviour.

        [BUGFIXES]
         * Actually use perl's own `wrap_keyword_plugin()`
         * Avoid compiler warning about int/IV mismatch in printf (RT130285)
         * Use warn_sv() to avoid compiler wraning about formatless warn() on
           a plain PV (RT130285)
         * Don't segfault on parse errors from parse_block() (RT130417)

0.31    2019-07-25 15:09:04
        [CHANGES]
         * Use `parse_subsignature()` on bleadperl and backport it to
           perl 5.26, allowing parsing of subroutine signatures (RT123465)

0.30    2019-07-05 16:09:02
        [CHANGES]
         * Parse attribute lists on `async sub`s (RT129985)

0.29    2019-06-26 20:23:12
        [CHANGES]
         * Further annotations in Devel::MAT::Dumper helper about loop state

        [BUGFIXES]
         * Fix various memory leaks of abandoned `async sub`s (RT129836)

0.28    2019-06-17 17:06:18
        [BUGFIXES]
         * Fix localisation of hints hash at compiletime so nested `async sub`
           works correctly (RT129836)

0.27    2019-06-04 20:48:42
        [CHANGES]
         * Detect certain forbidden constructs at compile-time; await inside:
            + non-lexical foreach
            + map and grep (RT129748)
            + string-eval (RT126036)

        [BUGFIXES]
         * Preserve regexp context across await boundary (RT129321)

0.26    2019-04-27 12:41:11
        [BUGFIXES]
         * Further fixes for foreach(LIST) handling (RT129319)
         * Handle SAVEt_FREEPV (RT129320)
         * Cleanup itervar and SAVEt_PADSV_AND_MORTALIZE of abandoned futures
           (RT129320)
         * Ensure body of async sub starts with OP_NEXSTATE so as not to upset
           Devel::Cover (thanks ilmari) (RT128309)

0.25    2019-04-24 15:46:15
        [BUGFIXES]
         * Print a warning but don't panic on resume with lost returning
           future (RT129303)

0.24    2019-04-18 23:47:56
        [CHANGES]
         * Stop `async sub`s on ->cancel (RT129202)
         * Propagate ->cancel requests back to awaiting future, though at
           present only on perl 5.24+ (RT129202)
         * Added more internal consistency checks and `panic()` assertions

        [BUGFIXES]
         * Further fixes for broken behaviour of `foreach(LIST)` (RT129215)
         * Fix Devel::MAT::Dumper helper for expired but unreclaimed magic

0.23    2019-04-16 01:08:34
        [BUGFIXES]
         * Many improvements to mortals handling, including workarounds for
           lack of cx->old_tmpsfloor on perls before 5.24 (RT128619)

0.22    2019-04-02 00:12:47
        [CHANGES]
         * More detailed annotations in Devel::MAT::Dumper helper

        [BUGFIXES]
         * Partial attempt at freeing things when dropping a pending await
           future (RT128620)
         * Fix for labeled loop controls (RT128205)

0.21    2019-02-02 17:19:35
        [BUGFIXES]
         * Fix more memory leaks - simple test case now executes cleanly
           (RT128222)

0.20    2019-01-16 22:34:20
        [BUGFIXES]
         * Ensure mortal SVs aren't reclaimed prematurely during
           suspend/resume
         * Fix several memory leaks. Some still remain but overall the
           situation is much improved (RT128222)

0.19    2019-01-08 23:49:03
        [BUGFIXES]
         * Replace stolen array or hash pad lexicals with newAV() / newHV() to
           maintain the expected SvTYPE() invariants (RT128176)

0.18    2019-01-05 20:08:38
        [CHANGES]
         * Declare threaded perls before version 5.22 as unsupported. The bug
           remains open but for now I'm disinclined to look into it. (RT124351)

        [BUGFIXES]
         * Don't panic about blk_eval.old_eval_root or .cur_text fields, as it
           seems we can safely ignore those (RT126036)

0.17    2019-01-04 18:45:22
        [BUGFIXES]
         * Perl 5.26 and above still needs SvREFCNT_inc() on the state array
           in CXt_LOOP_ARR (RT124353)
         * Better fix for scopestack name tracking under -DDEBUGGING
           (RT128164)
         * Set -DNO_XSLOCKS in order to get working JMPENV on MSWin32
           (RT128163)

0.16    2019-01-03 22:09:28
        [CHANGES]
         * Use ENTER_with_name/LEAVE_with_name variants for easier debug (thanks
           ilmari)
         * Don't clone the CVf_CVGV_RC flag
         * Unit-test that async/await also behaves fine through nested named
           method calls
         * Unit-test die after single await()

        [BUGFIXES]
         * Avoid call to non-public unshare_hek() function (RT125613)
         * Remember to wrap pp_await in docatch() if CATCH_GET is true. Fixes
           many failing test cases (double-nested await, RT126037, RT123062)

0.15    2018-01-24 04:12:04
        [CHANGES]
         * Support older perls back to 5.16 (continues work on RT122252). Just
           5.14 remains unsupported now
         * Neater implementation which avoids hacky workarounds from abusing
           `cv_clone()`

        [BUGFIXES]
         * Avoid using anonymous union in struct SuspendedFrame (thanks ilmari)
           (RT124171)

0.14    2018-01-22 04:42:02
        [CHANGES]
         * Document and test that 'await' works from inside 'do {}'
         * Test that two nested 'async sub's can await nicely

        [BUGFIXES]
         * Fix for 'await' twice inside the same 'foreach' loop (RT124144)
         * Fix handling of ITERVAR save/restore on perl 5.24+
         * Use correct printf format for IVs when debug printing
         * Ensure that captured lexicals from now-dead scopes remain working

0.13    2018-01-18 15:52:03
        [CHANGES]
         * Support older perls back to 5.18 (continues work on RT122252)
        
        [BUGFIXES]
         * Ensure that 'async sub' called in list context doesn't leak its
           input arguments as well as Future result

0.12    2018-01-15 19:02:42
        [CHANGES]
         * Support older perls back as far as 5.20 and 5.22
           (partly solves RT122252)
         * Link to TPCiA talk recording on youtube

0.11    2018-01-07 16:35:25
        [BUGFIXES]
         * Fixes for markstack restoration calculation
         * Don't save/restore PAD slots relating to outer captures or
           protosubs (RT124026)

0.10    2017-08-13 23:25:33
        [BUGFIXES]
         * Implement enough of SAVEt_DESTRUCTOR_X to make try/finally work
         * Fix the remaining integration tests with Syntax::Keyword::Try now
           latest version (0.07) works correctly

0.09    2017-08-13 17:44:48
        [CHANGES]
         * Link to TPCiA talk slides
         * Forbid the use of foreach loops on non-lexicals as that has
           semantic problems due to the implied 'local'
         * Unit-test that plain 'eval{}' works as expected
         * Allow specifically the use of 'local $@' to support common patterns
           around 'eval{}'
         * Unit-test that try/catch from Syntax::Keyword::Try works
        
        [BUGFIXES]
         * Save cx->blk_gimme on CXt_LOOP_* contexts (thanks rurban)
           (RT122673)

0.08    2017/08/10 16:48:52
        [CHANGES]
         * Handle the other CXt_LOOP_* context types, making foreach() loops
           work

0.07    2017/07/11 23:26:48
        [CHANGES]
         * Forbid the use of 'await' outside of 'async sub'
         * Handle CXt_BLOCK contexts
         * Handle SAVEt_CLEARSV and SAVEt_CLEARPADRANGE savestack entries
         * Further documentation rework

        [BUGFIXES]
         * Fix off-by-one error on reading the savestack, resulting in a
           number of false-"TODO" failures being fixed
         * Fix parser logic for parenthesized 'await( ... )' expressions

0.06    2017/06/29 17:43:19
        [CHANGES]
         * Support suspend/resume within while loops and plain loop blocks
         * Import the syntax keywords by default, rather than having to
           request them as an import symbol
         * Added some initial documentation to explain the new syntax

        [BUGFIXES]
         * Declare (for now) dependency on perl 5.24 to prevent older versions
           from attempting it and failing. We hope to support older versions
           back to 5.14 in due course.

0.05    2017/06/27 15:20:54
        [BUGFIXES]
         * Fix await op so it can await multiple times within the same sub

0.04    2017/06/06 18:42:15
        [CHANGES]
         * Suspend and resume the PAD around an await so lexical variables are
           preserved
         * Ensure that anon async subs can suspend/resume - see also
             https://rt.perl.org/Public/Bug/Display.html?id=131519
        
        [BUGFIXES]
         * Ensure MARK stack doesn't upset debugperl

0.03    2017/05/08 21:33:46
        [CHANGES]
         * Handle the value and mark stacks around suspend/await, allowing
           some stack temporaries to be preserved
         * Avoid naming internal functions "Perl_..."

        [BUGFIXES]
         * Ensure that die after await is still caught
         * Avoid C++-style comments and C99-style for() loop variable declarations
           (RT121569)

0.02    2017/05/08 16:55:38
        [CHANGES]
         * Initial tiny implementation of actual suspend/resume on 'await'