Skip to content

Build the validation reference compiler with OCaml 5.5.2 - #95

Merged
jfrolich merged 1 commit into
ocaml-to-rust-rewritefrom
fix-repeated-name-diagnostic
Nov 11, 2026
Merged

jfrolich merged 1 commit into
ocaml-to-rust-rewritefrom
fix-repeated-name-diagnostic

Conversation

@jfrolich

Copy link
Copy Markdown
Owner

What

rust-rewrite-validation.yml builds its reference compiler with OCaml 5.5.2 instead of 5.3.0, the version ci.yml already uses.

Why

release-parity has failed in its "Diagnostic parity" step on every trunk commit since 4c8358d, and so on every PR based on them, with one difference in tests/error_output_parity/compiler/fixtures/repeated_module_name.res:

-  at tests/error_output_parity/compiler/fixtures/repeated_module_name.res:2:8
-   Names must be unique in a given structure or signature.
+  at tests/error_output_parity/compiler/fixtures/repeated_module_name.res:2:8 
+  Names must be unique in a given structure or signature.

The message has two consecutive break hints after the location. OCaml 5.3's Format sizes the first with the width of the second included and breaks there; OCaml 5.5 sizes it before adding that width and breaks at the second. The Rust formatter was moved to the 5.5 behaviour in 4ac5138, whose message says the reference compiler now builds with 5.5.2, but this workflow kept 5.3.0.

Verification

This PR's own release-parity run uses the changed workflow, so it passing is the test.


Created by this Assistant session

The Rust message formatter follows the break sizing of OCaml 5.5's
Format (4ac5138), and ci.yml builds the compiler with OCaml 5.5.2,
but this workflow still built its reference compiler with 5.3.0. Under
5.3 a break followed directly by another break is sized with the second
one's width, so the reference printed

    at .../repeated_module_name.res:2:8
     Names must be unique in a given structure or signature.

where the Rust compiler, like OCaml 5.5, prints the second line without
the extra space. Diagnostic parity failed on that fixture for every
commit since.

Co-authored-by: Jaap Frolich <jfrolich@gmail.com>
Session: https://jakes-mac-mini.tail23a77e.ts.net:8443/session/os-01a1c9fa-0c5d-7912-a93b-3e7f38e53547
Signed-off-by: open-session-submodule[bot] <341020755+open-session-submodule[bot]@users.noreply.github.com>
@jfrolich
jfrolich merged commit 91bf25f into ocaml-to-rust-rewrite Nov 11, 2026
2 of 4 checks passed
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