From 3ecbeeaa174decc42839d7a04a95766f10084298 Mon Sep 17 00:00:00 2001 From: Guillaume Petiot Date: Tue, 8 Jan 2019 18:12:06 +0700 Subject: [PATCH 1/3] fix compilation with 4.03, 4.04 and 4.05 --- lib/compat.ml | 2 +- lib/top/mdx_top.ml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compat.ml b/lib/compat.ml index 767c09797..3c70201b6 100644 --- a/lib/compat.ml +++ b/lib/compat.ml @@ -99,7 +99,7 @@ end module Env = struct include Env -#if OCAML_MAJOR = 4 && OCAML_MINOR < 3 +#if OCAML_MAJOR = 4 && OCAML_MINOR < 4 (* Can't be overriden *) let without_cmis f x = f x #endif diff --git a/lib/top/mdx_top.ml b/lib/top/mdx_top.ml index 10300627e..539fa3c9f 100644 --- a/lib/top/mdx_top.ml +++ b/lib/top/mdx_top.ml @@ -124,7 +124,7 @@ module Phrase = struct | exception exn -> let exn = match Location.error_of_exn exn with | None -> raise exn -#if OCAML_MAJOR >= 4 && OCAML_MINOR > 2 +#if OCAML_MAJOR >= 4 && OCAML_MINOR > 5 | Some `Already_displayed -> raise exn | Some (`Ok error) -> Location.Error (Lexbuf.shift_location_error startpos error) From d27cb49be039f1d6660ca236152ddf140ea702d6 Mon Sep 17 00:00:00 2001 From: Guillaume Petiot Date: Tue, 8 Jan 2019 18:12:51 +0700 Subject: [PATCH 2/3] test all versions --- .travis.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e58d66742..e58d3fead 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,12 @@ language: c env: # Check build and unit tests # NOTE: testing needs OPAMBUILDTEST=true so that test deps are installed - - TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.02.3 - - TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.06.1 - - TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.07.0 + - TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.02 + - TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.03 + - TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.04 + - TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.05 + - TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.06 + - TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.07 before_install: # Download and use opam2 - wget -O ${HOME}/opam https://github.com/ocaml/opam/releases/download/2.0.2/opam-2.0.2-x86_64-linux From 036587fa41b2bf07b4c6b1d397d014df96e4bf5f Mon Sep 17 00:00:00 2001 From: Guillaume Petiot Date: Tue, 8 Jan 2019 19:39:36 +0700 Subject: [PATCH 3/3] full versions --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index e58d3fead..a9cfb599e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,12 +2,12 @@ language: c env: # Check build and unit tests # NOTE: testing needs OPAMBUILDTEST=true so that test deps are installed - - TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.02 - - TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.03 - - TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.04 - - TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.05 - - TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.06 - - TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.07 + - TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.02.3 + - TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.03.0 + - TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.04.2 + - TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.05.0 + - TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.06.1 + - TO_TEST=tests OPAMBUILDTEST=true OCAML_VERSION=4.07.0 before_install: # Download and use opam2 - wget -O ${HOME}/opam https://github.com/ocaml/opam/releases/download/2.0.2/opam-2.0.2-x86_64-linux