Skip to content

Commit

Permalink
Recognize OCaml 5.0 cmi magic number
Browse files Browse the repository at this point in the history
And add an assertion that we can recognize our own magic number that we
got compiled with.

Fixes ocaml#1553

Signed-off-by: Edwin Török <[email protected]>
  • Loading branch information
edwintorok authored and voodoos committed May 2, 2024
1 parent c56e58a commit fbfe810
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ocaml/typing/magic_numbers.ml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ module Cmi = struct
| "Caml1999I029" -> Some "4.12"
| "Caml1999I030" -> Some "4.13"
| "Caml1999I031" -> Some "4.14"
| "Caml1999I032" -> Some "5.0"
| _ -> None

let () = assert (to_version_opt Config.cmi_magic_number <> None)

open Format

let report_error ppf = function
Expand Down

0 comments on commit fbfe810

Please sign in to comment.