diff --git a/Makefile b/Makefile index ed74b1c32..3e60f6ca1 100644 --- a/Makefile +++ b/Makefile @@ -824,7 +824,7 @@ endif # This is a magical version number that doesn't reinstall the world when added on top of what we # have in opam.locked. 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 = ocp-indent merlin utop.2.4.0 webbrowser +OPAM_DEV_DEPS = ocp-indent merlin utop.2.4.2 webbrowser ifneq ($(EMACS),no) OPAM_DEV_DEPS += tuareg diff --git a/build-infer.sh b/build-infer.sh index d6b8cc848..4a0e7f90c 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.07.1+flambda" +INFER_OPAM_DEFAULT_SWITCH="ocaml-variants.4.08.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/backend/Differential.ml b/infer/src/backend/Differential.ml index e5702f6f6..3812388c0 100644 --- a/infer/src/backend/Differential.ml +++ b/infer/src/backend/Differential.ml @@ -29,7 +29,7 @@ let sort_by_decreasing_preference_to_report issues = if n <> 0 then n else let n = String.compare x.hash y.hash in - if n <> 0 then n else Pervasives.compare x y + if n <> 0 then n else Stdlib.compare x y in List.sort ~compare issues diff --git a/infer/src/backend/Tasks.ml b/infer/src/backend/Tasks.ml index 04bc87598..e994c4687 100644 --- a/infer/src/backend/Tasks.ml +++ b/infer/src/backend/Tasks.ml @@ -31,7 +31,7 @@ module Runner = struct let run runner = (* Flush here all buffers to avoid passing unflushed data to forked processes, leading to duplication *) - Pervasives.flush_all () ; + Stdlib.flush_all () ; (* Compact heap before forking *) Gc.compact () ; ProcessPool.run runner diff --git a/infer/src/base/CommandLineOption.ml b/infer/src/base/CommandLineOption.ml index 36b019032..849545242 100644 --- a/infer/src/base/CommandLineOption.ml +++ b/infer/src/base/CommandLineOption.ml @@ -742,7 +742,7 @@ let set_curr_speclist_for_parse_mode ~usage parse_mode = let curr_usage status = prerr_endline (String.concat_array ~sep:" " !args_to_parse) ; prerr_endline usage ; - Pervasives.exit status + Stdlib.exit status in (* "-help" and "--help" are automatically recognized by Arg.parse, so we have to give them special treatment *) @@ -963,7 +963,7 @@ let parse_args ~usage initial_action ?initial_command args = parse_loop () ) else ( ANSITerminal.prerr_string L.(term_styles_of_style Fatal) usage_msg ; - Pervasives.exit 1 ) + Stdlib.exit 1 ) | Arg.Help _ -> (* we handle --help by ourselves and error on -help, so Arg has no way to raise Help anymore *) diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index 8020e9288..a4c9a1bf3 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -1931,7 +1931,7 @@ and progress_bar = and progress_bar_style = CLOpt.mk_symbol ~long:"progress-bar-style" ~symbols:[("auto", `Auto); ("plain", `Plain); ("multiline", `MultiLine)] - ~eq:Pervasives.( = ) ~default:`Auto + ~eq:Stdlib.( = ) ~default:`Auto ~in_help:[(Analyze, manual_generic); (Capture, manual_generic)] "Style of the progress bar. $(b,auto) selects $(b,multiline) if connected to a tty, otherwise \ $(b,plain)." @@ -2604,7 +2604,7 @@ let post_parsing_initialization command_opt = CommandDoc.infer command_opt | `None -> () ) ; - if !version <> `None || !help <> `None then Pervasives.exit 0 ; + if !version <> `None || !help <> `None then Stdlib.exit 0 ; let uncaught_exception_handler exn raw_backtrace = let is_infer_exit_zero = match exn with L.InferExit 0 -> true | _ -> false in let should_print_backtrace_default = @@ -2646,7 +2646,7 @@ let post_parsing_initialization command_opt = let exitcode = L.exit_code_of_exception exn in L.log_uncaught_exception exn ~exitcode ; Epilogues.run () ; - Pervasives.exit exitcode + Stdlib.exit exitcode in Caml.Printexc.set_uncaught_exception_handler uncaught_exception_handler ; F.set_margin !margin ; diff --git a/infer/src/base/EventLogger.ml b/infer/src/base/EventLogger.ml index 24443c8d3..20fa17219 100644 --- a/infer/src/base/EventLogger.ml +++ b/infer/src/base/EventLogger.ml @@ -27,7 +27,7 @@ module IO = struct let prepare () = close () ; let fname = events_dir ^/ (Unix.getpid () |> Pid.to_string) ^ log_file_extension in - let oc = Pervasives.open_out_gen [Open_append; Open_creat] 0o666 fname in + let oc = Stdlib.open_out_gen [Open_append; Open_creat] 0o666 fname in out_chan := Some oc @@ -37,7 +37,7 @@ module IO = struct let write_skipped_pname pname = let fname = events_dir ^/ "skipped_functions" ^ log_file_extension in - let oc = Pervasives.open_out_gen [Open_append; Open_creat] 0o666 fname in + let oc = Stdlib.open_out_gen [Open_append; Open_creat] 0o666 fname in Out_channel.output_string oc pname ; Out_channel.output_char oc '\n' ; Out_channel.close oc diff --git a/infer/src/base/Logging.ml b/infer/src/base/Logging.ml index 9c3fb4cfa..bfa3001f8 100644 --- a/infer/src/base/Logging.ml +++ b/infer/src/base/Logging.ml @@ -320,7 +320,7 @@ let setup_log_file () = (* assumes the results dir exists already *) let logfile_path = Config.toplevel_results_dir ^/ Config.log_file in let preexisting_logfile = PolyVariantEqual.( = ) (Sys.file_exists logfile_path) `Yes in - let chan = Pervasives.open_out_gen [Open_append; Open_creat] 0o666 logfile_path in + let chan = Stdlib.open_out_gen [Open_append; Open_creat] 0o666 logfile_path in let file_fmt = let f = F.formatter_of_out_channel chan in if Config.print_logs then dup_formatter f F.err_formatter else f diff --git a/infer/src/base/PerfEvent.ml b/infer/src/base/PerfEvent.ml index 0ba116c70..61154b37b 100644 --- a/infer/src/base/PerfEvent.ml +++ b/infer/src/base/PerfEvent.ml @@ -231,7 +231,7 @@ let logger = ( if is_toplevel_process then let preexisting_logfile = PolyVariantEqual.( = ) (Sys.file_exists log_file) `Yes in if preexisting_logfile then Unix.unlink log_file ) ; - let out_channel = Pervasives.open_out_gen [Open_append; Open_creat] 0o666 log_file in + let out_channel = Stdlib.open_out_gen [Open_append; Open_creat] 0o666 log_file in let logger = F.formatter_of_out_channel out_channel in register_gc_stats logger ; ( if is_toplevel_process then ( diff --git a/infer/src/base/ProcessPool.ml b/infer/src/base/ProcessPool.ml index 67d2beb8f..6262198d2 100644 --- a/infer/src/base/ProcessPool.ml +++ b/infer/src/base/ProcessPool.ml @@ -402,7 +402,7 @@ let fork_child ~file_lock ~child_prelude ~slot (updates_r, updates_w) ~f ~epilog Out_channel.close updates_oc ; In_channel.close orders_ic ; Epilogues.run () ; - Pervasives.exit 0 + Stdlib.exit 0 | `In_the_parent pid -> let[@warning "-26"] to_child_r = Unix.close to_child_r in {pid; down_pipe= Unix.out_channel_of_descr to_child_w} diff --git a/infer/src/base/Utils.ml b/infer/src/base/Utils.ml index 4c774f2dd..8b8ac076d 100644 --- a/infer/src/base/Utils.ml +++ b/infer/src/base/Utils.ml @@ -193,7 +193,7 @@ let with_file_out file ~f = type file_lock = { file: string - ; oc: Pervasives.out_channel + ; oc: Stdlib.out_channel ; fd: Core.Unix.File_descr.t ; lock: unit -> unit ; unlock: unit -> unit } diff --git a/infer/src/base/Utils.mli b/infer/src/base/Utils.mli index 4c42d58e3..05d594846 100644 --- a/infer/src/base/Utils.mli +++ b/infer/src/base/Utils.mli @@ -59,7 +59,7 @@ val with_file_out : string -> f:(Out_channel.t -> 'a) -> 'a type file_lock = { file: string - ; oc: Pervasives.out_channel + ; oc: Stdlib.out_channel ; fd: Core.Unix.File_descr.t ; lock: unit -> unit ; unlock: unit -> unit } diff --git a/infer/src/istd/IStd.ml b/infer/src/istd/IStd.ml index 27e7544c3..1e03ad187 100644 --- a/infer/src/istd/IStd.ml +++ b/infer/src/istd/IStd.ml @@ -39,9 +39,9 @@ module ANSITerminal : module type of ANSITerminal = struct (* more careful about when the channel is connected to a tty *) - let print_string = if Unix.(isatty stdout) then print_string else fun _ -> Pervasives.print_string + let print_string = if Unix.(isatty stdout) then print_string else fun _ -> Stdlib.print_string - let prerr_string = if Unix.(isatty stderr) then prerr_string else fun _ -> Pervasives.prerr_string + let prerr_string = if Unix.(isatty stderr) then prerr_string else fun _ -> Stdlib.prerr_string let printf styles fmt = Format.ksprintf (fun s -> print_string styles s) fmt diff --git a/infer/src/istd/StatisticsToolbox.ml b/infer/src/istd/StatisticsToolbox.ml index 9d2315bc7..e4efcee8c 100644 --- a/infer/src/istd/StatisticsToolbox.ml +++ b/infer/src/istd/StatisticsToolbox.ml @@ -38,8 +38,8 @@ let compute_statistics values = assert (num_elements > 0) ; let max_index = num_elements - 1 in let pct_index = float_of_int max_index *. pct in - let low_index = int_of_float (Pervasives.floor pct_index) in - let high_index = int_of_float (Pervasives.ceil pct_index) in + let low_index = int_of_float (Stdlib.floor pct_index) in + let high_index = int_of_float (Stdlib.ceil pct_index) in let low = values_arr.(low_index) in let high = values_arr.(high_index) in (low +. high) /. 2.0 diff --git a/opam b/opam index cb56d459b..25d4733cf 100644 --- a/opam +++ b/opam @@ -21,7 +21,7 @@ install: [ ] depends: [ "ANSITerminal" {>="0.7"} - "apron" + "apron" {<"v0.9.12"} "async" {>="v0.12.0" & < "v0.13"} "atdgen" {>="2.0.0"} "base64" {>="3.0.0"} @@ -38,7 +38,7 @@ depends: [ "javalib" {>="3.1.1"} "mlgmpidl" {>="1.2.12"} "mtime" - "ocaml" {>="4.06.0"} + "ocaml" {>="4.08.0"} "ocamlfind" {build} "ocamlgraph" "ounit" {>="2.0.5"} diff --git a/opam.locked b/opam.locked index cf8864ee4..33b355bba 100644 --- a/opam.locked +++ b/opam.locked @@ -70,16 +70,15 @@ depends: [ "menhir" {= "20190924"} "mlgmpidl" {= "1.2.12"} "mtime" {= "1.2.0"} - "num" {= "1.2"} - "ocaml" {= "4.07.1"} + "num" {= "1.3"} + "ocaml" {= "4.08.1"} "ocaml-compiler-libs" {= "v0.12.1"} - "ocaml-config" {= "1"} - "ocaml-migrate-parsetree" {= "1.4.0"} - "ocaml-variants" {= "4.07.1+flambda"} + "ocaml-migrate-parsetree" {= "1.5.0"} + "ocaml-variants" {= "4.08.1+flambda"} "ocamlbuild" {= "0.14.0"} "ocamlfind" {= "1.8.1"} "ocamlgraph" {= "1.8.8"} - "octavius" {= "1.2.1"} + "octavius" {= "1.2.2"} "ounit" {= "2.2.1"} "ounit2" {= "2.2.1"} "parmap" {= "1.0-rc11"} @@ -110,7 +109,7 @@ depends: [ "ppx_sexp_message" {= "v0.12.0"} "ppx_sexp_value" {= "v0.12.0"} "ppx_stable" {= "v0.12.0"} - "ppx_tools" {= "5.1+4.06.0"} + "ppx_tools" {= "5.3+4.08.0"} "ppx_typerep_conv" {= "v0.12.0"} "ppx_variants_conv" {= "v0.12.0"} "ppxfind" {= "1.3"} @@ -124,7 +123,7 @@ depends: [ "sexplib0" {= "v0.12.0"} "spawn" {= "v0.13.0"} "splittable_random" {= "v0.12.0"} - "sqlite3" {= "4.4.1"} + "sqlite3" {= "5.0.1"} "stdio" {= "v0.12.0"} "stdlib-shims" {= "0.1.0"} "textutils" {= "v0.12.0"}