bubble ctx for decls 4/4
[hiphop-php.git] / hphp / hack / src / stubs / remoteWorker.ml
blobc2c5c10818852ef52c702853bcdf0076286f6a72
1 (*
2 * Copyright (c) Facebook, Inc. and its affiliates.
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the "hack" directory of this source tree.
7 *)
9 module type RemoteServerApi = sig
10 type naming_table
12 (* Called by the worker to load the naming tabe base when first initializing *)
13 val load_naming_table_base :
14 naming_table_base:Path.t option -> (naming_table, string) result
16 (* Called by the worker to load the naming table before type checking *)
17 val load_naming_table_changes_since_baseline :
18 Provider_context.t ->
19 naming_table:naming_table ->
20 naming_table_diff:Naming_table.changes_since_baseline ->
21 (naming_table, string) result
23 (* Called by the worker to type check a list of files.
24 The state filename is where the type checker should save its state that
25 changed as a result of type checking the files
26 (i.e., the dependency graph) *)
27 val type_check : Relative_path.t list -> state_filename:string -> Errors.t
28 end
30 type 'naming_table work_env = {
31 bin_root: Path.t;
32 check_id: string;
33 key: string;
34 root: Path.t;
35 naming_table_base: 'naming_table;
36 timeout: int;
37 server: (module RemoteServerApi with type naming_table = 'naming_table);
40 let go _ = failwith "not implemented"