Skip to content

feat(js/ts/python/beam): support Async.TryCancelled - #5083

Merged
dbrattli merged 5 commits into
mainfrom
feat/async-try-cancelled
Oct 15, 2026
Merged

dbrattli merged 5 commits into
mainfrom
feat/async-try-cancelled

Conversation

@dbrattli

@dbrattli dbrattli commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Adds support for FSharp.Core’s existing Async.TryCancelled API to JavaScript/TypeScript, Python, and BEAM. Calls currently compile to runtime functions that do not exist.

The cancellation handler receives the original exception before cancellation continues. Success and ordinary errors pass through unchanged, and an exception from the handler does not replace cancellation. Nested handlers are installed before cancellation is checked; JavaScript and Python preserve the existing trampoline when unwinding them.

@dbrattli
dbrattli force-pushed the feat/async-try-cancelled branch from fe2a041 to 8c63510 Compare October 15, 2026 19:11
@dbrattli
dbrattli force-pushed the fix/python-async-reply-reuse branch from 6b81384 to 14df95b Compare October 15, 2026 19:11
@dbrattli
dbrattli marked this pull request as ready for review October 15, 2026 19:12
@dbrattli
dbrattli force-pushed the fix/python-async-reply-reuse branch from 14df95b to a20e7c2 Compare October 15, 2026 20:25
@dbrattli
dbrattli force-pushed the feat/async-try-cancelled branch from 8c63510 to 68c41a6 Compare October 15, 2026 20:25
@dbrattli
dbrattli force-pushed the feat/async-try-cancelled branch from 68c41a6 to 5d19ae3 Compare October 15, 2026 20:33
@dbrattli
dbrattli changed the base branch from fix/python-async-reply-reuse to main October 15, 2026 20:34
@dbrattli dbrattli changed the title feat: support Async.TryCancelled on JS, Python and BEAM feat(js/ts/python/beam): support Async.TryCancelled on JS, Python and BEAM Oct 15, 2026
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Python Type Checking Results (Pyright)

Metric Value
Total errors 33
Files with errors 4
Excluded files 4
New errors ✅ No
Excluded files with errors (4 files)

These files have known type errors and are excluded from CI. Remove from pyrightconfig.ci.json as errors are fixed.

File Errors Status
temp/tests/Python/test_hash_set.py 18 Excluded
temp/tests/Python/test_applicative.py 11 Excluded
temp/tests/Python/test_nested_and_recursive_pattern.py 2 Excluded
temp/tests/Python/fable_modules/thoth_json_python/encode.py 2 Excluded

@dbrattli dbrattli changed the title feat(js/ts/python/beam): support Async.TryCancelled on JS, Python and BEAM feat(js/ts/python/beam): support Async.TryCancelled Oct 15, 2026
@dbrattli
dbrattli merged commit 1643297 into main Oct 15, 2026
44 checks passed
@dbrattli
dbrattli deleted the feat/async-try-cancelled branch October 15, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant