From 5014e7d9eb94c9ba5febab549745d91b6647e202 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Wed, 21 Mar 2018 08:13:18 -0700 Subject: [PATCH] upgrade ocaml version to 4.06.1 Summary: The future is now. Reviewed By: mbouaziz Differential Revision: D7326135 fbshipit-source-id: 9034962 --- .travis.yml | 2 +- Makefile | 2 +- build-infer.sh | 2 +- configure.ac | 2 +- infer/src/.merlin | 8 +++++--- infer/src/atd/.merlin | 2 +- infer/src/base/Logging.ml | 4 +++- infer/src/istd/.merlin | 2 +- infer/src/jbuild-workspace.in | 5 +++++ opam.lock | 34 +++++++++++++++++----------------- 10 files changed, 36 insertions(+), 27 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4229c296b..44d826d56 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install opam; fi install: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then travis_wait 60 ./build-infer.sh --yes java --opam-switch 4.05.0 --only-setup-opam; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then travis_wait 60 ./build-infer.sh --yes java --opam-switch 4.06.1 --only-setup-opam; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then eval `opam config env`; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then opam pin add -y --no-action -k git infer .; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then opam install -y infer; fi diff --git a/Makefile b/Makefile index e531fecd8..f9ecc842d 100644 --- a/Makefile +++ b/Makefile @@ -608,7 +608,7 @@ opam.lock: opam # This is a magical version number that doesn't reinstall the world when added on top of what we # have in opam.lock. To upgrade this version number, manually try to install several utop versions # until you find one that doesn't recompile the world. TODO(t20828442): get rid of magic -OPAM_DEV_DEPS = ocamlformat.$$(grep version .ocamlformat | cut -d ' ' -f 2) ocp-indent merlin utop.2.0.1 +OPAM_DEV_DEPS = ocamlformat.$$(grep version .ocamlformat | cut -d ' ' -f 2) ocp-indent merlin utop.2.1.0 ifneq ($(EMACS),no) OPAM_DEV_DEPS += tuareg diff --git a/build-infer.sh b/build-infer.sh index 378f328ed..620e95ac1 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=${OCAML_VERSION:-"4.05.0+flambda"} +OCAML_VERSION=${OCAML_VERSION:-"4.06.1+flambda"} OPAM_LOCK_URL=${OPAM_LOCK_URL:-"https://github.com/rgrinberg/opam-lock"} INFER_OPAM_SWITCH_DEFAULT=infer-"$OCAML_VERSION" diff --git a/configure.ac b/configure.ac index 67a79610d..1631621d4 100644 --- a/configure.ac +++ b/configure.ac @@ -182,7 +182,7 @@ fi AC_PROG_OCAML AC_ASSERT_PROG([ocamlc], [$OCAMLC]) # check the version of OCaml -AC_ASSERT_OCAML_MIN_VERSION([4.05.0]) +AC_ASSERT_OCAML_MIN_VERSION([4.06.1]) AC_ASSERT_PROG([ocamlopt], [$OCAMLOPT]) AC_CHECK_TOOL([OCAMLBUILD], [ocamlbuild], [no]) AC_ASSERT_PROG([ocamlbuild], [$OCAMLBUILD]) diff --git a/infer/src/.merlin b/infer/src/.merlin index 0b82821a4..228778e87 100644 --- a/infer/src/.merlin +++ b/infer/src/.merlin @@ -1,6 +1,8 @@ -B _build/default -B _build/default/atd -B _build/default/istd +B _build/default/.InferModules.objs +B _build/default/.infer.eobjs +B _build/default/.infertop.eobjs +B _build/default/atd/.InferGenerated.objs +B _build/default/istd/.InferStdlib.objs FLG -principal -safe-string -short-paths -strict-formats -strict-sequence FLG -w +a-4-9-40-41-42-44-45-48-60 FLG -open InferStdlib -open InferGenerated -open InferModules -open IStd diff --git a/infer/src/atd/.merlin b/infer/src/atd/.merlin index c147db547..a3beae63b 100644 --- a/infer/src/atd/.merlin +++ b/infer/src/atd/.merlin @@ -1,4 +1,4 @@ -B ../_build/default/atd +B ../_build/default/atd/.InferGenerated.objs FLG -open InferGenerated -g -short-paths -safe-string -principal -strict-formats -strict-sequence -bin-annot -w +3+5+6+8+10+11+12+18+19+20+21+23+26+29+27+32+33+34+35+37+38+39+50+52+57-4-9-40-41-42-45-48 -w -27-32-34-35-39 PKG atd PKG atdgen diff --git a/infer/src/base/Logging.ml b/infer/src/base/Logging.ml index 030e12b50..97cae35be 100644 --- a/infer/src/base/Logging.ml +++ b/infer/src/base/Logging.ml @@ -33,6 +33,7 @@ let dup_formatter fmt1 fmt2 = let f = copy_formatter fmt1 in F.pp_set_formatter_out_functions f { F.out_string= (fun s p n -> out_funs1.out_string s p n ; out_funs2.out_string s p n) + ; out_indent= (fun n -> out_funs1.out_indent n ; out_funs2.out_indent n) ; out_flush= (fun () -> out_funs1.out_flush () ; out_funs2.out_flush ()) ; out_newline= (fun () -> out_funs1.out_newline () ; out_funs2.out_newline ()) ; out_spaces= (fun n -> out_funs1.out_spaces n ; out_funs2.out_spaces n) } ; @@ -74,6 +75,7 @@ let mk_file_formatter file_fmt category0 = print_prefix_if_newline () ; out_functions_orig.out_string s p n in + let out_indent n = print_prefix_if_newline () ; out_functions_orig.out_indent n in let out_newline () = print_prefix_if_newline () ; out_functions_orig.out_newline () ; @@ -81,7 +83,7 @@ let mk_file_formatter file_fmt category0 = in let out_spaces n = print_prefix_if_newline () ; out_functions_orig.out_spaces n in F.pp_set_formatter_out_functions f - {F.out_string; out_flush= out_functions_orig.out_flush; out_newline; out_spaces} ; + {F.out_string; out_flush= out_functions_orig.out_flush; out_indent; out_newline; out_spaces} ; f diff --git a/infer/src/istd/.merlin b/infer/src/istd/.merlin index d1672dfcc..61702e145 100644 --- a/infer/src/istd/.merlin +++ b/infer/src/istd/.merlin @@ -1,4 +1,4 @@ -B ../_build/default/istd +B _build/default/istd/.InferStdlib.objs PKG ANSITerminal PKG atdgen PKG cmdliner diff --git a/infer/src/jbuild-workspace.in b/infer/src/jbuild-workspace.in index a4d347424..82a57a6de 100644 --- a/infer/src/jbuild-workspace.in +++ b/infer/src/jbuild-workspace.in @@ -4,6 +4,11 @@ ;; wants to write "S ." in .merlin but that makes merlin use the ;; copied source files in _build/ instead of only using the original ;; files. +;; +;; The generated .merlin also doesn't know about the ppx used. This is +;; because some of our source files use some ppx and others do not, and +;; since jbuilder is trying to find a configuration that works for all the +;; files it only keeps the pxx common to all files. (context ((switch @OPAMSWITCH@) (name default))) (context ((switch @OPAMSWITCH@) (name opt))) diff --git a/opam.lock b/opam.lock index 94dd127b7..62e30148d 100644 --- a/opam.lock +++ b/opam.lock @@ -5,7 +5,7 @@ base = v0.10.0 base64 = 2.2.0 bin_prot = v0.10.0 biniou = 1.2.0 -camlp4 = 4.05+1 +camlp4 = 4.06+1 camlzip = 1.07 cmdliner = 1.0.2 conf-aclocal = 1.0.0 @@ -16,26 +16,26 @@ conf-which = 1 configurator = v0.10.0 core = v0.10.0 core_kernel = v0.10.0 -cppo = 1.6.0 +cppo = 1.6.4 cppo_ocamlbuild = 1.6.0 ctypes = 0.13.1 -easy-format = 1.3.0 +easy-format = 1.3.1 extlib-compat = 1.7.2 fieldslib = v0.10.0 integers = 0.2.2 jane-street-headers = v0.10.0 javalib = 2.3.4 -jbuilder = 1.0+beta16 -menhir = 20171206 +jbuilder = 1.0+beta19 +menhir = 20171222 mtime = 1.1.0 -num = 0 +num = 1.1 ocaml-compiler-libs = v0.10.0 -ocaml-migrate-parsetree = 1.0.7 +ocaml-migrate-parsetree = 1.0.8 ocamlbuild = 0.12.0 -ocamlfind = 1.7.3 +ocamlfind = 1.7.3-1 octavius = 1.2.0 ounit = 2.0.5 -parmap = 1.0-rc8 +parmap = 1.0-rc9 ppx_assert = v0.10.0 ppx_ast = v0.10.0 ppx_base = v0.10.0 @@ -46,14 +46,14 @@ ppx_core = v0.10.0 ppx_custom_printf = v0.10.0 ppx_derivers = 1.0 ppx_deriving = 4.2.1 -ppx_driver = v0.10.1 +ppx_driver = v0.10.3 ppx_enumerate = v0.10.0 -ppx_expect = v0.10.0 +ppx_expect = v0.10.1 ppx_fail = v0.10.0 ppx_fields_conv = v0.10.0 ppx_hash = v0.10.0 ppx_here = v0.10.0 -ppx_inline_test = v0.10.0 +ppx_inline_test = v0.10.1 ppx_jane = v0.10.0 ppx_js_style = v0.10.0 ppx_let = v0.10.0 @@ -64,15 +64,15 @@ ppx_pipebang = v0.10.0 ppx_sexp_conv = v0.10.0 ppx_sexp_message = v0.10.0 ppx_sexp_value = v0.10.0 -ppx_tools = 5.0+4.05.0 +ppx_tools = 5.1+4.06.0 ppx_traverse = v0.10.0 ppx_traverse_builtins = v0.10.0 ppx_type_conv = v0.10.0 ppx_typerep_conv = v0.10.0 ppx_variants_conv = v0.10.0 -re = 1.7.1 -result = 1.2 -sawja = 1.5.2 +re = 1.7.3 +result = 1.3 +sawja = 1.5.3 sexplib = v0.10.0 spawn = v0.10.1 sqlite3 = 4.3.2 @@ -81,4 +81,4 @@ topkg = 0.9.1 typerep = v0.10.0 variantslib = v0.10.0 xmlm = 1.3.0 -yojson = 1.4.0 +yojson = 1.4.1