Skip to content

Fix OCaml 5.5 compatibility - #39

Closed
davesnx wants to merge 27 commits into
ocaml-mlx:ocaml-54-astfrom
davesnx:fix/ocaml-5.5-short-paths
Closed

davesnx wants to merge 27 commits into
ocaml-mlx:ocaml-54-astfrom
davesnx:fix/ocaml-5.5-short-paths

Conversation

@davesnx

@davesnx davesnx commented Aug 26, 2026 •

Copy link
Copy Markdown
Member

Summary

  • define the Merlin short-path GADT indices as distinct private types
  • test OCaml 5.5 in the CI matrix
  • use OCaml 5.5 for local development switches and releases
  • document OCaml 5.5 support

OCaml 5.5 removed special handling that assumed local abstract types were distinct. The private type definitions let the compiler prove that the Basis and Env constructors cannot share an index. This follows the upstream Merlin fix in ocaml/merlin@9310954.

Testing

  • OCaml 5.5 beta: OCAMLPARAM='_,warn-error=+8' dune build -p ocamlmerlin-mlx -j 1 @install
  • OCaml 4.14: dune build -p ocamlmerlin-mlx -j 1 @install
  • full build and test suite on OCaml 5.4 and 5.5

This PR is based on #29.

Fixes #31.

davesnx and others added 26 commits February 24, 2026 14:02
…-short-paths

* origin/ocaml-54-ast: (26 commits)
  Revert broken vendored source refresh
  wip
  Fix copy_files: exclude format_doc.ml and mocaml.ml from promotion
  Revert cosmetic changes in mocaml.ml, keep functional changes only
  Revert cosmetic changes in mconfig.mli, keep new fields only
  Revert extend_helper.ml parenthesization changes
  Revert remaining formatting-only changes
  Revert formatting-only changes in utils/ and kernel/
  Revert formatting in extend/, keep only functional changes
  Revert formatting-only changes in vendored files
  Fix parser.ml/mli: replace Ocaml_common.Longident.t with Longident.t
  Fix OCaml 4.14 compat: Longident, Utf8_lexeme, Builtin_attributes
  Fix Longident type for 4.14: remove Ocaml_common qualification
  Fix 4.14 compat: Format.utf_8_scalar_width and Path.Map.of_list
  Fix OCaml 4.14 compatibility in vendored files
  Bump ppxlib requirement to >= 0.37.0 for Ast_504
  Update test expectations for 504 error messages
  Update merlin kernel, extend, and utils for 504
  Update merlin preprocess with JSX for OCaml 5.4
  Update vendored merlin OCaml files to 504
  ...
Comment thread CHANGES Outdated
@davesnx

davesnx commented Sep 15, 2026

Copy link
Copy Markdown
Member Author

Included in #44

@davesnx davesnx closed this Sep 15, 2026
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