Skip to content

Tracking: Upgrading the OCaml version we use in tests to 5.1.1 #9954

@ElectreAAS

Description

@ElectreAAS

Right now, we use OCaml 4.14.1 in the tests of dune 👇

dune/Makefile

Line 35 in e0bd14d

TEST_OCAMLVERSION := 4.14.1

There's been an effort to bump that number to 5.1.1. I'll let other maintainers fill in the rationale below.
This is the list of tests that pass on main with 4.14.1, but don't with 5.1.1.

  • Bump the version number everywhere needed in the docs / comments
  • Bump the version number in the Makefile.
  • Update hashes in
    • test/expect-tests/persistent_tests.ml
    • test/blackbox-tests/test-cases/patch-back-source-tree.t
    • test/blackbox-tests/test-cases/dune-cache/mode-copy.t
    • test/blackbox-tests/test-cases/dune-cache/mode-hardlink.t
    • test/blackbox-tests/test-cases/dune-cache/repro-check.t
    • test/blackbox-tests/test-cases/dune-cache/trim.t
  • error_messages_separated: Since Insert a blank line between consecutive compiler messages ocaml#12024 (included in 5.1.0), there are newlines inserted in between errors for a given file. We just need to update the comments and promote.
    • Thanks to the above, test/blackbox-tests/test-cases/wrapped-transition.t/run.t just needs some newlines added in the expect portion.
    • Same for test/blackbox-tests/test-cases/vendor/alerts.t/run.t
  • test/blackbox-tests/test-cases/bigarray.t/run.t incorrectly checks whether bigarray is available or not. In 5.0+, bigarray is part of the stdlib and not a separate library anymore, but isn't detected by the call to select. See also Remove Stream, Genlex, Pervasives & the legacy bigarray library ocaml#10896. Would be fixed by fix: select with bigarray in OCaml 5 #10011.
  • test/blackbox-tests/test-cases/describe/{describe-workspace-pp.t & describe.t}: the diff says (source_dir /FINDLIB/ocaml/compiler-libs) -> (source_dir /FINDLIB/compiler-libs) in several places. I have no clue what this means.
  • test/blackbox-tests/test-cases/findlib-dynload.t/run.t: we have something that also looks findlib-related: a line about findlib finding threads.posix is removed.
  • test/blackbox-tests/test-cases/jsoo/inline-tests.t/run.t: there is a line added: Warning: your program contains effect handlers; you should probably run js_of_ocaml with option '--enable=effects'. This looks weird to me as I don't think there are effects in the program?
  • test/blackbox-tests/test-cases/melange/flags.t: the warning emitted by the compiler is now slightly more verbose. Imo this can be safely promoted.
  • test/blackbox-tests/test-cases/menhir/library-interface.t: This one is weird, on 4.14 there is nothing printed, whereas on 5.1 it triggers warning 63: The printed interface differs from the inferred interface. The inferred interface contained items which could not be printed properly due to name collisions between identifiers. I don't know enough about menhir to tell is this is normal or not.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions