Skip to content

refactor: use upstream async runtime fixes - #74

Merged
dbrattli merged 2 commits into
mainfrom
local/native-async-runtime
Oct 12, 2026
Merged

dbrattli merged 2 commits into
mainfrom
local/native-async-runtime

Conversation

@dbrattli

@dbrattli dbrattli commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Actor-owned lifetimes carry Python lock, cancellation-registration, timer and delayed-continuation workarounds for defects in the older Fable runtime. This change uses the fixes released in Fable 5.20.1 while preserving actor shutdown, request/reply settlement and cleanup behavior.

  • Use standard lock, disposable CancellationToken.Register, Async.Sleep and async.Delay; remove the corresponding Python platform helpers and cancellation guards.
  • Restore unit-valued continuations in the lifecycle tests and observation barrier. Normalize erased unit success callbacks at the remaining Python context adapters.
  • Keep the actor finalizer and shared-trampoline adapters, pending settlement gates and idle-mailbox cancellation wakeup. These enforce actor-specific guarantees that the upstream fixes do not provide.
  • Add a regression requiring a pre-cancelled lifetime registration to invoke its callback exactly once.
  • Update the compiler pin to Fable 5.20.1, the root and Timeflies Python runtime requirements to fable-library >=5.20.1, and both lockfiles to 5.20.1. The lifecycle ADC records the minimum fixed compiler/runtime version.

Upstream prerequisites

All required fixes are merged and included in Fable 5.20.1:

Validation

Executed using the released dotnet fable 5.20.1 and PyPI fable-library 5.20.1, with no local compiler or runtime overrides:

  • .NET: 63 passed.
  • Python 3.14: 61 passed, including all nine tests that failed in the previous 5.20.0 CI run.
  • JavaScript/Node: 61 passed.
  • BEAM: 53 passed; the generated library also compiles with rebar3.
  • just check, Fantomas 8.0.8 --check, git diff --check and NuGet packing passed.
  • Verified the installed Python runtime version/path, generated native registration and unit deadline callbacks, and packed Fable source containing the runtime requirement ADC.

Fantomas reports the existing unsupported .editorconfig setting; BEAM compilation reports existing unused-result warnings. Neither prevents validation.

@dbrattli
dbrattli marked this pull request as ready for review October 12, 2026 16:24
@dbrattli
dbrattli merged commit ebb93e6 into main Oct 12, 2026
4 checks passed
@dbrattli
dbrattli deleted the local/native-async-runtime branch October 12, 2026 16:24
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