|
| 1 | +(* |
| 2 | + * Copyright (c) Facebook, Inc. and its affiliates. |
| 3 | + * |
| 4 | + * This source code is licensed under the MIT license found in the |
| 5 | + * LICENSE file in the "hack" directory of this source tree. |
| 6 | + * |
| 7 | + *) |
| 8 | + |
| 9 | +type dirty_files = { |
| 10 | + master_changes: Relative_path.t list; |
| 11 | + local_changes: Relative_path.t list; |
| 12 | +} |
| 13 | + |
| 14 | +type hot_decls_paths = { |
| 15 | + legacy_hot_decls_path: string; |
| 16 | + shallow_hot_decls_path: string; |
| 17 | +} |
| 18 | + |
| 19 | +type native_load_result = { |
| 20 | + naming_table_path: string; |
| 21 | + corresponding_rev: Hg.rev; |
| 22 | + mergebase_rev: Hg.global_rev option; |
| 23 | + mergebase: Hg.Rev.t option Future.t; |
| 24 | + is_cached: bool; |
| 25 | + state_distance: int; |
| 26 | + deptable_fn: string; |
| 27 | + dirty_files: dirty_files Future.t; |
| 28 | + hot_decls_paths: hot_decls_paths; |
| 29 | + errors_path: string; |
| 30 | +} |
| 31 | + |
| 32 | +type saved_state_handle = { |
| 33 | + saved_state_for_rev: Hg.rev; |
| 34 | + saved_state_everstore_handle: string; |
| 35 | + watchman_mergebase: MonitorUtils.watchman_mergebase option; |
| 36 | +} |
| 37 | + |
| 38 | +type error = unit |
| 39 | + |
| 40 | +type verbose_error = { |
| 41 | + message: string; |
| 42 | + stack: Utils.callstack; |
| 43 | + auto_retry: bool; |
| 44 | + environment: string option; |
| 45 | +} |
| 46 | +[@@deriving show] |
| 47 | + |
| 48 | +val error_string_verbose : error -> verbose_error |
| 49 | + |
| 50 | +val cached_state : |
| 51 | + load_64bit:bool -> |
| 52 | + ?saved_state_handle:saved_state_handle -> |
| 53 | + config_hash:string -> |
| 54 | + rev:Hg.rev -> |
| 55 | + (Hg.rev * string * MonitorUtils.watchman_mergebase option) option |
| 56 | + |
| 57 | +val fetch_saved_state : |
| 58 | + load_64bit:bool -> |
| 59 | + ?cache_limit:int -> |
| 60 | + config:State_loader_config.timeouts -> |
| 61 | + config_hash:string -> |
| 62 | + saved_state_handle -> |
| 63 | + (string, error) result Future.t |
| 64 | + |
| 65 | +val mk_state_future : |
| 66 | + config:State_loader_config.timeouts -> |
| 67 | + load_64bit:bool -> |
| 68 | + ?saved_state_handle:saved_state_handle -> |
| 69 | + config_hash:string option -> |
| 70 | + ignore_hh_version:bool -> |
| 71 | + ignore_hhconfig:bool -> |
| 72 | + use_prechecked_files:bool -> |
| 73 | + Path.t -> |
| 74 | + (native_load_result, error) result Future.t |
0 commit comments