Unified symbol-to-docblock server command
[hiphop-php.git] / hphp / hack / src / server / serverInit.mli
blob62d88fd2315766a2be911846ed84334977102abe
1 (**
2 * Copyright (c) 2015, Facebook, Inc.
3 * All rights reserved.
5 * This source code is licensed under the MIT license found in the
6 * LICENSE file in the "hack" directory of this source tree.
8 *)
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
19 type init_approach =
20 | Full_init
21 | Parse_only_init
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. *)
26 val save_state:
27 ServerEnv.genv ->
28 ServerEnv.env ->
29 string ->
30 ServerEnv.env * SaveStateServiceTypes.save_state_result option
32 type init_result =
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
36 (** Loading error *)
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 *)