Repository navigation
Conversation
Handlers in Flow are strictly tail-resumptive. This commit formally restricts usage of Koka/Eff style continuations by introducing compiler checks in `typecheck.flow` that recursively scan capability method bodies for the `resume` and `resume_multi` identifiers. If encountered, the compiler now correctly fails with a specific diagnostic outlining the limitation and linking to the official documentation. The PR also includes comprehensive documentation updates (e.g. `docs/language/effects-continuations.md`) describing the decision and alternate coding patterns to achieve timeout, loop retry, and continuation via manual polling. Co-authored-by: godofecht <[email protected]>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Superseded by #1349 (merged as cbe3e62). The typecheck rejection of |
Understood. Acknowledging that this work is now obsolete and stopping work on this task. |
…om closed PRs Salvaged from closed pull requests whose code already landed: - #1360 (region inference, code merged as #1390): region-inference.md, the tests/cgen region_inference and region_unproven goldens, and the spec, book, spans, lifetime-domains, README, spec-index, nav and CHANGELOG lines. - #1368 (noalias, code merged as #1388): the spans.md paragraph on restrict .data temporaries and its noalias.md link. - #1380 (tail-resumptive effects, code merged as #1349): the spec-index row for effects-continuations.md. #1417 landed after #1360 and keeps an unproven forward copy as an ordered element loop. The region_inference golden and the docs now say that, in place of the memmove the closed branch expected. The golden fails on the pre-#1417 compiler, which emitted memmove.
…om closed PRs (#1425) Salvaged from closed #1360 (region-inference.md, region_inference and region_unproven goldens, spec/book/index lines), #1368 (spans.md restrict .data paragraph) and #1380 (spec-index row for effects-continuations.md). The region_inference golden and docs follow #1417: an unproven parameter copy stays an ordered loop.
Closes #564
Re-implements the feature requested cleanly from
mainto address massive regressions introduced in the previouscursor-effects-tail-resumptive-2586branch. The current implementation uses AST scanning insidetypecheck.flowto fail compilation whenresumeorresume_multiis found within a capability method (AST_CAP_METHOD).Changes
compiler/src/typecheck.flowto enforce tail-resumption.compiler/bootstrap/flowc_stage_a.c.docs/language/effects-continuations.md).tests/lang/test_effects_tail_resumptive.flow) and negative path tests (tests/lang/test_effects_continuations_error.flow,tests/lang/test_effects_continuations_multi_error.flow) verified and passing.No features from subsequent pull requests were inadvertently reverted.
PR created automatically by Jules for task 8072556545414131140 started by @godofecht