Skip to content

Commit

Permalink
Merge pull request #176 from xclerc/4.13
Browse files Browse the repository at this point in the history
Support for 4.13
  • Loading branch information
akabe authored Dec 31, 2021
2 parents 683ceb4 + 17dcc15 commit 4787d88
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ matrix:
env: OCAML_VERSION=4.11.0 ARCHIMEDES=1
- os: linux
env: OCAML_VERSION=4.12.0 ARCHIMEDES=1
- os: linux
env: OCAML_VERSION=4.13.0 ARCHIMEDES=1
# allow_failures:
# - os: linux
# env: OPAM_VERSION=2.0.4 OCAML_VERSION=4.09.0
Expand Down
9 changes: 9 additions & 0 deletions jupyter/src/repl/caml_args.cppo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,17 @@ module Options = Main_args.Make_bytetop_options (struct
let _version () = print_version ()
let _vnum () = print_version_num ()
let _no_version = set Clflags.noversion
#if OCAML_VERSION < (4,13,0)
let _w s = Warnings.parse_options false s
#else
let _w s = Warnings.parse_options false s |> Option.iter Location.(prerr_alert none)
#endif

#if OCAML_VERSION < (4,13,0)
let _warn_error s = Warnings.parse_options true s
#else
let _warn_error s = Warnings.parse_options true s |> Option.iter Location.(prerr_alert none)
#endif
let _warn_help = Warnings.help_warnings
let _dparsetree = set Clflags.dump_parsetree
let _dtypedtree = set Clflags.dump_typedtree
Expand Down
9 changes: 8 additions & 1 deletion test/repl/test_evaluation.ml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,14 @@ let test__long_error_message ctxt =
let test__exception ctxt =
let status, actual = eval "failwith \"FAIL\"" in
let msg =
if Sys.ocaml_version >= "4.12"
if Sys.ocaml_version >= "4.13"
then "\x1b[31mException: Failure \"FAIL\".\n\
Raised at Stdlib.failwith in file \"stdlib.ml\", line 29, characters 17-33\n\
Called from Stdlib__Fun.protect in file \"fun.ml\", line 33, characters 8-15\n\
Re-raised at Stdlib__Fun.protect in file \"fun.ml\", line 38, characters 6-52\n\
Called from Topeval.load_lambda in file \"toplevel/byte/topeval.ml\", line 89, characters 4-150\n\
\x1b[0m"
else if Sys.ocaml_version >= "4.12"
then "\x1b[31mException: Failure \"FAIL\".\n\
Raised at Stdlib.failwith in file \"stdlib.ml\", line 29, characters 17-33\n\
Called from Stdlib__fun.protect in file \"fun.ml\", line 33, characters 8-15\n\
Expand Down

0 comments on commit 4787d88

Please sign in to comment.