From 7a416739d66cdb502439c92046fdd22e3d177c96 Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Fri, 11 Sep 2020 04:10:26 -0700 Subject: [PATCH] [ocaml] Upgrade to OCaml 4.11.1 and dune 2.7.1 Summary: and update versions of other dependencies. Reviewed By: martintrojer, jvillard Differential Revision: D23460338 fbshipit-source-id: d0bc5b130 --- .github/workflows/install.yml | 2 +- build-infer.sh | 2 +- infer/src/base/Config.ml | 1 + infer/src/istd/UnionFind.ml | 4 --- infer/src/istd/UnionFind.mli | 4 +-- opam.locked | 53 ++++++++++++++++++----------------- 6 files changed, 31 insertions(+), 35 deletions(-) diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 718ed7dd5..36e6648c0 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -13,7 +13,7 @@ jobs: - macOS-latest - ubuntu-latest ocaml-version: - - 4.09.1 + - 4.11.1 runs-on: ${{ matrix.os }} diff --git a/build-infer.sh b/build-infer.sh index f900966a8..9a6b55290 100755 --- a/build-infer.sh +++ b/build-infer.sh @@ -17,7 +17,7 @@ DEPENDENCIES_DIR="$INFER_ROOT/facebook/dependencies" PLATFORM="$(uname)" SANDCASTLE=${SANDCASTLE:-} NCPU="$(getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)" -INFER_OPAM_DEFAULT_SWITCH="ocaml-variants.4.09.1+flambda" +INFER_OPAM_DEFAULT_SWITCH="ocaml-variants.4.11.1+flambda" INFER_OPAM_DEFAULT_COMPILER="$INFER_OPAM_DEFAULT_SWITCH" INFER_OPAM_SWITCH=${INFER_OPAM_SWITCH:-$INFER_OPAM_DEFAULT_SWITCH} INFER_OPAM_COMPILER=${INFER_OPAM_COMPILER:-$INFER_OPAM_DEFAULT_COMPILER} diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index 340bbc213..7a81acf2c 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -402,6 +402,7 @@ let startup_action = if infer_is_javac then Javac else if !Sys.interactive + || String.is_substring ~substring:"inline_test_runner" exe_basename || String.is_substring ~substring:"inferunit" exe_basename || String.equal "run.exe" exe_basename || String.equal "run.bc" exe_basename diff --git a/infer/src/istd/UnionFind.ml b/infer/src/istd/UnionFind.ml index 8dc827785..510cc9e47 100644 --- a/infer/src/istd/UnionFind.ml +++ b/infer/src/istd/UnionFind.ml @@ -28,8 +28,6 @@ module Make (X : Element) (XSet : Caml.Set.S with type elt = X.t) = struct val empty : t - val find_opt : t -> X.t -> repr option - val find : t -> X.t -> repr val merge : t -> repr -> into:repr -> t @@ -86,8 +84,6 @@ module Make (X : Element) (XSet : Caml.Set.S with type elt = X.t) = struct let empty = {reprs= UF.empty; classes= UF.Map.empty} - let find_opt uf x = UF.find_opt uf.reprs x - let find uf x = UF.find uf.reprs x let union uf x1 x2 = diff --git a/infer/src/istd/UnionFind.mli b/infer/src/istd/UnionFind.mli index 627fa8fbb..c09875c45 100644 --- a/infer/src/istd/UnionFind.mli +++ b/infer/src/istd/UnionFind.mli @@ -32,10 +32,8 @@ module Make (X : Element) (XSet : Caml.Set.S with type elt = X.t) : sig form of "old representative = new representative", [None] if they were already in the same congruence class *) - val find_opt : t -> X.t -> repr option - val find : t -> X.t -> repr - (** like [find_opt] but returns the element given if it wasn't found in the relation *) + (** return the element given if it wasn't found in the relation *) val fold_congruences : (t, repr * XSet.t, 'acc) Container.fold (** fold over the equivalence classes of the relation, singling out the representative for each diff --git a/opam.locked b/opam.locked index 0584f9c6b..bb48d9806 100644 --- a/opam.locked +++ b/opam.locked @@ -1,6 +1,6 @@ opam-version: "2.0" name: "infer" -version: "0.17.0" +version: "1.0.0" synopsis: "A static analyzer for Java, C, C++, and Objective-C" maintainer: "the infer team" authors: "Facebook" @@ -37,54 +37,55 @@ depends: [ "base_quickcheck" {= "v0.14.0"} "bin_prot" {= "v0.14.0"} "biniou" {= "1.2.1"} - "camlidl" {= "1.07"} + "camlidl" {= "1.09"} "camlzip" {= "1.10"} "cmdliner" {= "1.0.4"} "conf-autoconf" {= "0.1"} - "conf-gmp" {= "1"} + "conf-gmp" {= "2"} "conf-m4" {= "1"} "conf-mpfr" {= "2"} "conf-perl" {= "1"} - "conf-pkg-config" {= "1.2"} + "conf-pkg-config" {= "1.3"} "conf-sqlite3" {= "1"} "conf-which" {= "1"} "conf-zlib" {= "1"} "core" {= "v0.14.0"} "core_kernel" {= "v0.14.0"} "cppo" {= "1.6.6"} + "csexp" {= "1.3.1"} "ctypes" {= "0.17.1"} - "dune" {= "2.5.1"} - "dune-configurator" {= "2.5.1"} - "dune-private-libs" {= "2.5.1"} + "dune" {= "2.7.1"} + "dune-configurator" {= "2.7.1"} "easy-format" {= "1.3.2"} "extlib" {= "1.7.7"} "fieldslib" {= "v0.14.0"} "integers" {= "0.4.0"} + "iter" {= "1.2.1"} "jane-street-headers" {= "v0.14.0"} "javalib" {= "3.2.1"} "jst-config" {= "v0.14.0"} - "menhir" {= "20200211"} - "menhirLib" {= "20200211"} - "menhirSdk" {= "20200211"} + "menhir" {= "20200624"} + "menhirLib" {= "20200624"} + "menhirSdk" {= "20200624"} "mlgmpidl" {= "1.2.12"} "mtime" {= "1.2.0"} "num" {= "1.3"} - "ocaml" {= "4.09.1"} + "ocaml" {= "4.11.1"} "ocaml-compiler-libs" {= "v0.12.1"} "ocaml-config" {= "1"} "ocaml-migrate-parsetree" {= "1.7.3"} - "ocaml-variants" {= "4.09.1+flambda"} + "ocaml-variants" {= "4.11.1+flambda"} "ocamlbuild" {= "0.14.0"} "ocamlfind" {= "1.8.1"} "ocamlgraph" {= "1.8.8"} "octavius" {= "1.2.2"} - "ounit" {= "2.2.2"} - "ounit2" {= "2.2.2"} + "ounit" {= "2.2.3"} + "ounit2" {= "2.2.3"} "parmap" {= "1.1.1"} "parsexp" {= "v0.14.0"} "ppx_assert" {= "v0.14.0"} "ppx_base" {= "v0.14.0"} - "ppx_bench" {= "v0.14.0"} + "ppx_bench" {= "v0.14.1"} "ppx_bin_prot" {= "v0.14.0"} "ppx_blob" {= "0.7.0"} "ppx_cold" {= "v0.14.0"} @@ -94,11 +95,11 @@ depends: [ "ppx_deriving" {= "4.5"} "ppx_enumerate" {= "v0.14.0"} "ppx_expect" {= "v0.14.0"} - "ppx_fields_conv" {= "v0.14.0"} + "ppx_fields_conv" {= "v0.14.1"} "ppx_fixed_literal" {= "v0.14.0"} "ppx_hash" {= "v0.14.0"} "ppx_here" {= "v0.14.0"} - "ppx_inline_test" {= "v0.14.0"} + "ppx_inline_test" {= "v0.14.1"} "ppx_jane" {= "v0.14.0"} "ppx_js_style" {= "v0.14.0"} "ppx_let" {= "v0.14.0"} @@ -106,16 +107,16 @@ depends: [ "ppx_optcomp" {= "v0.14.0"} "ppx_optional" {= "v0.14.0"} "ppx_pipebang" {= "v0.14.0"} - "ppx_sexp_conv" {= "v0.14.0"} + "ppx_sexp_conv" {= "v0.14.1"} "ppx_sexp_message" {= "v0.14.0"} "ppx_sexp_value" {= "v0.14.0"} - "ppx_stable" {= "v0.14.0"} - "ppx_string" {= "v0.14.0"} - "ppx_tools" {= "6.0+4.08.0"} - "ppx_typerep_conv" {= "v0.14.0"} - "ppx_variants_conv" {= "v0.14.0"} + "ppx_stable" {= "v0.14.1"} + "ppx_string" {= "v0.14.1"} + "ppx_tools" {= "6.2"} + "ppx_typerep_conv" {= "v0.14.1"} + "ppx_variants_conv" {= "v0.14.1"} "ppxfind" {= "1.4"} - "ppxlib" {= "0.13.0"} + "ppxlib" {= "0.15.0"} "protocol_version_header" {= "v0.14.0"} "re" {= "1.9.0"} "result" {= "1.5"} @@ -125,13 +126,13 @@ depends: [ "sexplib0" {= "v0.14.0"} "spawn" {= "v0.13.0"} "splittable_random" {= "v0.14.0"} - "sqlite3" {= "5.0.1"} + "sqlite3" {= "5.0.2"} "stdio" {= "v0.14.0"} "stdlib-shims" {= "0.1.0"} "textutils" {= "v0.14.0"} "time_now" {= "v0.14.0"} "timezone" {= "v0.14.0"} - "topkg" {= "1.0.1"} + "topkg" {= "1.0.2"} "typerep" {= "v0.14.0"} "variantslib" {= "v0.14.0"} "xmlm" {= "1.3.0"}