diff --git a/.travis.yml b/.travis.yml index f5c714fb2..e01eac64b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install opam; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then opam init; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then opam switch 4.02.3; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then opam switch 4.04.0; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then eval `opam config env`; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then opam update; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then opam install -y depext; fi diff --git a/build-infer.sh b/build-infer.sh index 74b984288..986865c0e 100755 --- a/build-infer.sh +++ b/build-infer.sh @@ -16,7 +16,7 @@ INFER_ROOT="$SCRIPT_DIR" INFER_DEPS_DIR="$INFER_ROOT/dependencies/infer-deps" PLATFORM="$(uname)" NCPU="$(getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)" -OCAML_VERSION="4.02.3" +OCAML_VERSION="4.04.0" INFER_OPAM_SWITCH_DEFAULT=infer-"$OCAML_VERSION" function usage() { diff --git a/configure.ac b/configure.ac index 5bf9619af..d1735f942 100644 --- a/configure.ac +++ b/configure.ac @@ -170,7 +170,7 @@ fi AC_PROG_OCAML AC_ASSERT_PROG([ocamlc], [$OCAMLC]) # check the version of OCaml -AC_ASSERT_OCAML_MIN_VERSION([4.02.3]) +AC_ASSERT_OCAML_MIN_VERSION([4.04.0]) AC_ASSERT_PROG([ocamlopt], [$OCAMLOPT]) AC_ASSERT_PROG([ocamlbuild], [$OCAMLBUILD]) AC_PROG_FINDLIB diff --git a/infer/src/backend/mergeCapture.ml b/infer/src/backend/mergeCapture.ml index 7bff1fe7a..e12e2b990 100644 --- a/infer/src/backend/mergeCapture.ml +++ b/infer/src/backend/mergeCapture.ml @@ -84,7 +84,7 @@ let add_multilink_attr ~stats src dst = let create_link ~stats src dst = if link_exists dst then Unix.unlink dst; - Unix.symlink ~src ~dst; + Unix_.symlink ~src ~dst; (* Set the accessed and modified time of the original file slightly in the past. Due to the coarse precision of the timestamps, it is possible for the source and destination of a link to have the same modification time. When this happens, the files will be considered to diff --git a/infer/src/base/DB.ml b/infer/src/base/DB.ml index 76ad62b68..415cfb329 100644 --- a/infer/src/base/DB.ml +++ b/infer/src/base/DB.ml @@ -70,7 +70,7 @@ let source_dir_to_string source_dir = source_dir (** get the path to an internal file with the given extention (.cfg, .cg, .tenv) *) let source_dir_get_internal_file source_dir extension = let source_dir_name = - append_crc_cutoff (Filename.chop_extension (Filename.basename source_dir)) in + append_crc_cutoff (Caml.Filename.remove_extension (Filename.basename source_dir)) in let fname = source_dir_name ^ extension in Filename.concat source_dir fname diff --git a/infer/src/base/IStd.ml b/infer/src/base/IStd.ml index 4ecf456c4..fe4f7c3bf 100644 --- a/infer/src/base/IStd.ml +++ b/infer/src/base/IStd.ml @@ -40,6 +40,10 @@ module Unix_ = struct Unix.waitpid (create_process_redirect ~prog ~args ?stdin ?stdout ?stderr ()) |> Unix.Exit_or_signal.or_error |> ok_exn + (* Unix.symlink has ambiguous function application when the optional argument is not provided, but + the optional argument is not used in the implementation anyway. *) + let symlink ~src ~dst = Unix.symlink ?to_dir:None ~src ~dst + end let ( @ ) = Caml.List.append diff --git a/opam b/opam index 18341d350..292905d75 100644 --- a/opam +++ b/opam @@ -24,11 +24,11 @@ remove: [ "--prefix=%{prefix}%"] ["make" "uninstall"] ] -ocaml-version: [ >= "4.02.1" ] +ocaml-version: [ >= "4.04.0" ] depends: [ "ANSITerminal" {>="0.7"} "atdgen" {>="1.6.0"} - "core" {>="113.33.03"} + "core" "conf-autoconf" "ctypes" {>="0.9.2"} "extlib-compat"