Repository navigation
Expand file tree
/
Copy pathserverCommandTypes.ml
More file actions
86 lines (75 loc) · 3.07 KB
/
Copy pathserverCommandTypes.ml
File metadata and controls
86 lines (75 loc) · 3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
open Ide_api_types
type connection_type =
| Persistent
| Non_persistent
type connection_response =
| Connected
type status_liveness =
| Stale_status
| Live_status
(* The following datatypes can be interpreted as follows:
* MESSAGE_TAG : Argument type (sent from client to server) -> return type t *)
type _ t =
| STATUS : (status_liveness * Pos.absolute Errors.error_ list) t
| INFER_TYPE : ServerUtils.file_input * int * int ->
InferAtPosService.result t
| COVERAGE_LEVELS : ServerUtils.file_input -> Coverage_level.result t
| AUTOCOMPLETE : string -> AutocompleteService.result t
| IDENTIFY_FUNCTION : ServerUtils.file_input * int * int ->
IdentifySymbolService.result t
| GET_DEFINITION_BY_ID : string -> string SymbolDefinition.t option t
| METHOD_JUMP : (string * bool) -> MethodJumps.result list t
| FIND_DEPENDENT_FILES: string list -> string list t
| FIND_REFS : FindRefsService.action -> FindRefsService.result t
| IDE_FIND_REFS : string * int * int -> FindRefsService.ide_result t
| IDE_HIGHLIGHT_REFS : string * int * int -> ServerHighlightRefsTypes.result t
| REFACTOR : ServerRefactorTypes.action -> ServerRefactorTypes.patch list t
| DUMP_SYMBOL_INFO : string list -> SymbolInfoServiceTypes.result t
| DUMP_AI_INFO : string list -> Ai.InfoService.result t
| REMOVE_DEAD_FIXMES : int list -> ServerRefactorTypes.patch list t
| IGNORE_FIXMES : string list -> Pos.absolute Errors.error_ list t
| SEARCH : string * string -> HackSearchService.result t
| COVERAGE_COUNTS : string -> ServerCoverageMetricTypes.result t
| LINT : string list -> ServerLintTypes.result t
| LINT_ALL : int -> ServerLintTypes.result t
| CREATE_CHECKPOINT : string -> unit t
| RETRIEVE_CHECKPOINT : string -> string list option t
| DELETE_CHECKPOINT : string -> bool t
| STATS : Stats.t t
| KILL : unit t
| FORMAT : ServerFormatTypes.action -> ServerFormatTypes.result t
| IDE_FORMAT : ServerFormatTypes.ide_action -> ServerFormatTypes.ide_result t
| TRACE_AI : Ai.TraceService.action -> string t
| AI_QUERY : string -> string t
| DUMP_FULL_FIDELITY_PARSE : string -> string t
| OPEN_FILE : string * string -> unit t
| CLOSE_FILE : string -> unit t
| EDIT_FILE : string * (text_edit list) -> unit t
| IDE_AUTOCOMPLETE : string * position -> AutocompleteService.result t
| DISCONNECT : unit t
| SUBSCRIBE_DIAGNOSTIC : int -> unit t
| UNSUBSCRIBE_DIAGNOSTIC : int -> unit t
| OUTLINE : string -> FileOutline.outline t
let is_disconnect_rpc : type a. a t -> bool = function
| DISCONNECT -> true
| _ -> false
let is_kill_rpc : type a. a t -> bool = function
| KILL -> true
| _ -> false
type 'a command =
| Rpc of 'a t
| Stream of streamed
| Debug
and streamed =
| SHOW of string
| LIST_FILES
| LIST_MODES
| BUILD of ServerBuild.build_opts
type push =
| DIAGNOSTIC of int * (Pos.absolute Errors.error_ list) SMap.t
| NEW_CLIENT_CONNECTED
type 'a persistent_connection_message_type =
| Push of push
| Response of 'a
(** Timeout on reading the command from the client - client probably frozen. *)
exception Read_command_timeout