diff --git a/CLAUDE.md b/CLAUDE.md index 58d7a29..0ce43c6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -110,7 +110,7 @@ than literals for this reason. **BEAM was unblocked by Fable 5.13.0** (`fix(beam)` #4849 made reflection value access agree with record *and union* codegen — `PropertyInfo.GetValue` / `FSharpValue.MakeRecord` / `MakeUnion` no -longer `{badkey,...}`). Remoting now runs on all three targets. Two BEAM-specific notes remain: +longer `{badkey,...}`). Remoting now runs on all three targets. One BEAM-specific note remains: - Reflection reports the pristine F# field name, not the record-map key, so `getJsonMember` reproduces `sanitizeFieldName` via `toWireKey` (see above). The Fable team **declined** to change @@ -118,11 +118,10 @@ longer `{badkey,...}`). Remoting now runs on all three targets. Two BEAM-specifi `toWireKey` is the **sanctioned** integration point — not a temporary shim to delete. `sanitizeFieldName` is stable; if it ever changes, the wire key is treated as contract. Background in `../Fable/BEAM-RECORD-FIELD-NAME-MANGLING-PROMPT.md`. -- The BEAM test runner wraps the suites in `testSequenced` (`test/beam/Main.fs`): every remoting test - passes in isolation, but under Quill's default cross-suite concurrency on BEAM the body assertions - intermittently fail with a garbled diff. This is a Scriptorium/BEAM concurrency+rendering gap - (Scriptorium PRs #13/#15); revert to plain parallel `runTests` once they release — tracked in - issue #54. + +The BEAM `testSequenced` workaround is **gone** (issue #54 closed): Quill 0.5.1 (Unicode output on +BEAM, Scriptorium #14) and Nib 0.4.1 (char-level diffs on BEAM, #15) fixed the garbled-diff failures, +so `test/beam/Main.fs` runs the three suites with plain parallel `runTests` like the other targets. **Python tripwire on the next `fable-library-py` bump.** The Fable team is fixing Python reflection to report the *pristine* F# field name (like BEAM) while keeping the snake_case runtime slot @@ -150,7 +149,7 @@ One behavioral suite in `test/shared/` (`HandlerTests.fs`, `RoutingTests.fs`) is per-target projects — `test/python`, `test/js`, `test/beam` — each supplying its own `TestContext.fs` (a `TestContext.create` factory building an isolated context without a real server) and a thin `Main.fs` entry point. `RemotingTests.fs` runs on all three targets as of Fable 5.13.0 (see the -Remoting note below for the two BEAM-specific caveats: `toWireKey` and the `testSequenced` runner). +Remoting note below for the remaining BEAM-specific caveat: `toWireKey`). Tests are written with [Scriptorium](https://github.com/fable-hub/Scriptorium) — Quill for the test DSL and runner, Nib for assertions — both of which compile to all three targets. `test/shared/Helpers.fs` diff --git a/test/beam/Fable.Giraffe.Tests.Beam.fsproj b/test/beam/Fable.Giraffe.Tests.Beam.fsproj index 285d135..3f525bf 100644 --- a/test/beam/Fable.Giraffe.Tests.Beam.fsproj +++ b/test/beam/Fable.Giraffe.Tests.Beam.fsproj @@ -16,8 +16,8 @@ - - + + diff --git a/test/beam/Main.fs b/test/beam/Main.fs index 0869981..3498564 100644 --- a/test/beam/Main.fs +++ b/test/beam/Main.fs @@ -1,19 +1,11 @@ module Fable.Giraffe.Tests.Main open type Scriptorium.Quill.Runner -open type Scriptorium.Quill.Test // BEAM runner. Quill runs the suite synchronously here and calls `halt/1` with the exit code, so // `erl` returns non-zero when tests fail. Fable >= 5.8 namespaces generated BEAM modules and emits // a `main.erl` shim that dispatches to [], so the entry point keeps the runner findable // across Fable versions. -// -// The three suites are wrapped in `testSequenced` so they run one-suite-at-a-time rather than all -// interleaved. Every remoting test passes on its own and the suite passes when run in isolation, but -// under Quill's default cross-suite concurrency on BEAM the remoting body assertions intermittently -// fail with a garbled diff (rendered as "1"). That is a Scriptorium/BEAM concurrency+rendering gap -// tracked in Scriptorium PRs #13 (Quill 0.5.1 Unicode output) and #15 (Nib char-level diffs); once -// those release, drop back to a plain parallel `runTests [ ...; RemotingTests.tests ]`. See #54. [] let main _ = - runTests [ testSequenced ("suite", [ HandlerTests.tests; RoutingTests.tests; RemotingTests.tests ]) ] + runTests [ HandlerTests.tests; RoutingTests.tests; RemotingTests.tests ] diff --git a/test/js/Tests.fsproj b/test/js/Tests.fsproj index eea4163..bff9c6a 100644 --- a/test/js/Tests.fsproj +++ b/test/js/Tests.fsproj @@ -16,8 +16,8 @@ - - + + diff --git a/test/python/Fable.Giraffe.Tests.Python.fsproj b/test/python/Fable.Giraffe.Tests.Python.fsproj index cf71b32..055923d 100644 --- a/test/python/Fable.Giraffe.Tests.Python.fsproj +++ b/test/python/Fable.Giraffe.Tests.Python.fsproj @@ -17,8 +17,8 @@ - - + +