fix: Upgrade to Fable 5.4 and drop unnecessary arg boxing#31
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fabletool from5.0.0-rc.3to5.4.0andFable.Corefrom5.0.0-rc.1to the5.1.0stable release (both dependency groups).boxat 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 theboxwas never required: F# auto-boxes[<ParamArray>] obj[]arguments, and Fable compiles the coercion to a no-op. Verified by transpiling real usage withoutboxon JS, Python, and Rust backends — args pass straight through (LogDebug(..., 42, 7)).The
boxwas not a Beam requirement or an API constraint — it was cosmetic ceremony introduced when the test suite and README were authored (commit10b0453), and consumers were copying it from the docs. The[<ParamArray>] obj[]API itself is unchanged.Notes
exninTestLogLevelso the comparison matches theexn optionfield.Verification
just test→ 49/49 tests pass🤖 Generated with Claude Code