Skip to content

Upgrade the development toolchain to OCaml 5.5 - #8589

Open
cknitt wants to merge 4 commits into
codex/upgrade-ocamlformat-0.29from
codex/upgrade-ocaml-5.5
Open

Upgrade the development toolchain to OCaml 5.5#8589
cknitt wants to merge 4 commits into
codex/upgrade-ocamlformat-0.29from
codex/upgrade-ocaml-5.5

Conversation

@cknitt

@cknitt cknitt commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary

  • use OCaml 5.5 for local development, the development container, and primary CI builds
  • retain ocaml >= 5.0.0 as the package constraint and keep the dedicated OCaml 5.0 compatibility CI job
  • upgrade ppxlib to 0.38, setup-ocaml to 3.7.2, and js_of_ocaml and wasm_of_ocaml to 6.4.1
  • install a suitable Binaryen version for wasm_of_ocaml on CI and in the development container
  • adapt the compiler pretty-printer to the OCaml 5.4 Format behavior change while keeping syntax-test output stable
  • temporarily pin the pending bisect_ppx OCaml 5.5 compatibility fix for coverage builds

This is the fourth PR in the "Flow Forward" series. It is stacked on the OCamlformat 0.29 upgrade so the mechanical reformat and toolchain changes remain independently reviewable.

Related to #8567.

@cknitt
cknitt force-pushed the codex/upgrade-ocaml-5.5 branch 4 times, most recently from 862cd1d to a846121 Compare August 28, 2026 09:01
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (codex/upgrade-ocamlformat-0.29@dfadefd). Learn more about missing BASE report.

Additional details and impacted files
@@                        Coverage Diff                        @@
##             codex/upgrade-ocamlformat-0.29    #8589   +/-   ##
=================================================================
  Coverage                                  ?   75.92%           
=================================================================
  Files                                     ?      475           
  Lines                                     ?    63029           
  Branches                                  ?        0           
=================================================================
  Hits                                      ?    47854           
  Misses                                    ?    15175           
  Partials                                  ?        0           
Files with missing lines Coverage Δ
compiler/ml/pprintast.ml 90.85% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cknitt
cknitt force-pushed the codex/upgrade-ocaml-5.5 branch from a846121 to f14e320 Compare August 28, 2026 10:25
@pkg-pr-new

pkg-pr-new Bot commented Aug 28, 2026

Copy link
Copy Markdown

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript-lang/rescript@8589

@rescript/belt

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/belt@8589

@rescript/darwin-arm64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-arm64@8589

@rescript/darwin-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-x64@8589

@rescript/linux-arm64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-arm64@8589

@rescript/linux-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-x64@8589

@rescript/runtime

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/runtime@8589

@rescript/win32-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/win32-x64@8589

commit: aa9d92d

@cknitt
cknitt force-pushed the codex/upgrade-ocaml-5.5 branch 2 times, most recently from 99a735f to 0420f15 Compare August 28, 2026 12:06

@cristianoc cristianoc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are the formatting changes?

@cknitt

cknitt commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

what are the formatting changes?

Caused by upgrading ocamlformat.

@cristianoc

Copy link
Copy Markdown
Collaborator

what are the formatting changes?

Caused by upgrading ocamlformat.

That seems like a lot of churn on ocamlformat part. Strange. Isn't there a setting so we don't change everything?

@cristianoc cristianoc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there's no easy way out of the churn. If it turns out that there is, great. If not, OK.

@cknitt

cknitt commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

I checked this. OCamlformat 0.27 is constrained to OCaml <5.4, so we cannot keep it in the OCaml 5.5 toolchain. The newer formatter has changed some formatting rules, and there does not appear to be a compatibility setting for preserving the 0.27 output. I also tried restoring the previous exp-grouping default, but it produced the same changes.

To keep the OCaml 5.5 PR reviewable, I suggest moving the OCamlformat upgrade and mechanical reformatting into a separate PR in the stack.

cknitt added 4 commits August 28, 2026 15:32
Signed-off-by: Christoph Knittel <ck@cca.io>
Signed-off-by: Christoph Knittel <ck@cca.io>
Signed-off-by: Christoph Knittel <ck@cca.io>
Signed-off-by: Christoph Knittel <ck@cca.io>
@cknitt
cknitt force-pushed the codex/upgrade-ocaml-5.5 branch from 0420f15 to aa9d92d Compare August 28, 2026 13:32
@cknitt
cknitt changed the base branch from codex/upgrade-flow-parser-last-ocaml to codex/upgrade-ocamlformat-0.29 August 28, 2026 13:34
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.

2 participants