Skip to content

chore: drop the BEAM workarounds for upstream Fable bugs#38

Draft
dbrattli wants to merge 1 commit into
mainfrom
chore/drop-beam-fable-workarounds
Draft

chore: drop the BEAM workarounds for upstream Fable bugs#38
dbrattli wants to merge 1 commit into
mainfrom
chore/drop-beam-fable-workarounds

Conversation

@dbrattli

Copy link
Copy Markdown
Owner

Draft — blocked on an upstream Fable release. Do not merge yet.

Stacked on #37, which is where both workarounds are introduced. Base will retarget to main automatically once #37 merges.

Removes the two BEAM workarounds that exist only to paper over Fable bugs. Both are now fixed on Fable's main, but neither is in a release yet — and CI runs dotnet fable (currently 5.11.0), so merging this today turns CI red.

What this removes

workaround why it existed fixed upstream by
test-beam flatten step in the Justfile Fable wrote package modules to fable_modules/<pkg>/<subdir>/src/, which rebar3's project_app_dirs never scans — they compiled but were undef at runtime #4817 — modules now go to <pkg>/src/
#if FABLE_COMPILER_BEAM in test/shared/Helpers.fs Async.AwaitTask compiled to fable_async:await_task, which did not exist; the [<Emit("$0")>] identity stood in for it #4819 — adds await_task(Task) -> Task., the same identity

Net effect: Helpers.fs has no target fork at all, and test-beam is back to compile → rebar3 → run.

Verification

Green against a local Fable checkout carrying both fixes:

just dev=true test
  Python      50 passed (50)
  JavaScript  43 passed | 2 skipped (45)
  BEAM        37 passed | 8 skipped (45)

Red against released Fable 5.11.0, exactly as expected — Python and JS pass, BEAM dies on the missing Parchment sink:

just test
  Python      50 passed (50)
  JavaScript  43 passed | 2 skipped (45)
  BEAM        {undef,[{fable_async,run_synchronously,2, ...
              error: Recipe `test-beam` failed with exit code 1

(The undef surfacing as fable_async:run_synchronously rather than the real call site is itself an upstream artefact, fixed by #4818 — the async re-raise used to discard the original stacktrace.)

Merge checklist

🤖 Generated with Claude Code

Base automatically changed from test/scriptorium-quill-nib to main July 18, 2026 16:23
@dbrattli
dbrattli force-pushed the chore/drop-beam-fable-workarounds branch from 684d13c to 48d03e4 Compare July 18, 2026 16:24
BLOCKED: do not merge until a Fable release contains #4817 and #4819.
Against released Fable 5.11.0 this makes `just test-beam` fail.

Removes the two workarounds introduced alongside the Scriptorium migration,
both of which exist only to paper over Fable bugs that are now fixed on
Fable's main:

  * The `test-beam` flatten step, which copied package modules out of
    fable_modules/<pkg>/<subdir>/src/ into the package's own src/ so rebar3
    would compile them. Fixed upstream by #4817 — Fable now writes them to
    <pkg>/src/ directly.

  * The `#if FABLE_COMPILER_BEAM` fork in test/shared/Helpers.fs, whose
    [<Emit("$0")>] identity stood in for the missing Async.AwaitTask. Fixed
    upstream by #4819, which added `await_task(Task) -> Task.` — the same
    identity. Helpers.fs now has no target fork at all.

Verified against a local Fable checkout carrying both fixes:

    just dev=true test
    Python 50 passed | JavaScript 43 passed, 2 skipped | BEAM 37 passed, 8 skipped

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dbrattli
dbrattli force-pushed the chore/drop-beam-fable-workarounds branch from 48d03e4 to 84b2c5c Compare July 18, 2026 16:42
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