Skip to content

fix: Upgrade to Fable 5.4 and drop unnecessary arg boxing#31

Merged
dbrattli merged 2 commits into
mainfrom
upgrade-fable-5.4-drop-arg-boxing
Jun 24, 2026
Merged

fix: Upgrade to Fable 5.4 and drop unnecessary arg boxing#31
dbrattli merged 2 commits into
mainfrom
upgrade-fable-5.4-drop-arg-boxing

Conversation

@dbrattli

Copy link
Copy Markdown
Collaborator

Summary

  • Upgrade the fable tool from 5.0.0-rc.3 to 5.4.0 and Fable.Core from 5.0.0-rc.1 to the 5.1.0 stable release (both dependency groups).
  • Drop the explicit box at log call sites in the README examples and tests.

Why drop the boxing

Downstream users flagged that having to write logger.LogInformation("Hello {Platform}!", box "JS") is awkward. It turns out the box was never required: F# auto-boxes [<ParamArray>] obj[] arguments, and Fable compiles the coercion to a no-op. Verified by transpiling real usage without box on JS, Python, and Rust backends — args pass straight through (LogDebug(..., 42, 7)).

The box was not a Beam requirement or an API constraint — it was cosmetic ceremony introduced when the test suite and README were authored (commit 10b0453), and consumers were copying it from the docs. The [<ParamArray>] obj[] API itself is unchanged.

Notes

  • Also upcasts the expected exception to exn in TestLogLevel so the comparison matches the exn option field.
  • No public API/signature changes — non-breaking.

Verification

  • just test49/49 tests pass
  • Fable 5.4 transpiles the library to JS and Python with no errors

🤖 Generated with Claude Code

dbrattli and others added 2 commits June 24, 2026 22:29
Bump the fable tool from 5.0.0-rc.3 to 5.4.0 and Fable.Core from
5.0.0-rc.1 to the 5.1.0 stable release across both dependency groups.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
F# auto-boxes [<ParamArray>] obj[] arguments and Fable compiles the
coercion to a no-op on every backend (JS, Python, Rust verified), so the
explicit box at log call sites was never required. Remove it from the
README examples and test call sites so consumers stop copying the
ceremony from the docs.

Also upcast the expected exception to exn in TestLogLevel so the
comparison matches the exn option field.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dbrattli dbrattli changed the title Upgrade to Fable 5.4 and drop unnecessary arg boxing fix: Upgrade to Fable 5.4 and drop unnecessary arg boxing Jun 24, 2026
@dbrattli dbrattli merged commit 532f0e6 into main Jun 24, 2026
2 of 3 checks passed
@dbrattli dbrattli deleted the upgrade-fable-5.4-drop-arg-boxing branch June 24, 2026 20:32
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