2 * Copyright (c) 2015, Facebook, Inc.
5 * This source code is licensed under the MIT license found in the
6 * LICENSE file in the "hack" directory of this source tree.
10 type load_state_approach
=
11 | Precomputed
of ServerArgs.saved_state_target_info
12 (** Load a saved state using Ocaml implementation of saved state loader.
13 * Bool is true when using canary, i.e. look up saved state by hg commit
14 * hash instead of nearest SVN rev. *)
15 | Load_state_natively
of bool
16 (* Use the supplied saved state target to skip lookup in XDB. *)
17 | Load_state_natively_with_target
of ServerMonitorUtils.target_saved_state
22 | Saved_state_init
of load_state_approach
24 (* Saves the state that is used by init below and returns the number of
25 edges added to the saved state dependency table. *)
30 ServerEnv.env
* SaveStateServiceTypes.save_state_result
option
33 (** Loaded a saved saved state of this distance. Note: for older load scripts
34 * distance is unknown, thus None. *)
35 | Load_state_succeeded
of int option
37 | Load_state_failed
of string
38 (** This option means we didn't even try to load a saved state *)
39 | Load_state_declined
of string
41 (* will parse, name, typecheck, the next set of files
42 * and refresh the environment and update the many shared heaps
44 val init
: init_approach
:init_approach
-> ServerEnv.genv
45 -> ServerEnv.env
* init_result
(* If the script failed, the error message *)