Add header to recording with metadata
[hiphop-php.git] / hphp / hack / src / debug / debug_event.ml
blob8e275b4c5cca9b230fd45c130d832668f03ca343
1 type saved_state_info = {
2 filename : string;
3 corresponding_base_revision: string;
4 (** During server initialization, there are files that need to be
5 * rechecked due to them being "dirtied" in various ways - already
6 * dirtied VCS working directory, modified while parsing FASTs or
7 * loading saved states, and build targetes that are not tracked. *)
8 dirty_files : Relative_path.Set.t;
9 changed_while_parsing : Relative_path.Set.t;
10 build_targets : Relative_path.Set.t;
13 (** The debug port on the server emits a sequence of significant events. *)
14 type event =
15 | Loaded_saved_state of saved_state_info * ServerGlobalState.t
16 (** The state name of the fresh VCS state. *)
17 | Fresh_vcs_state of string
18 (** Run a typecheck.
19 * TODO: This needs a lot more stuff in it, but is not yet implemented.
20 * Useful as an event for now for unit testing. *)
21 | Typecheck
22 | HandleServerCommand : 'a ServerCommandTypes.command -> event
23 (** List of files whose disk contents have changed. *)
24 | Disk_files_modified of Relative_path.S.t list
25 | Stop_recording
27 let to_string e = match e with
28 | Loaded_saved_state _ -> "Loaded_saved_state"
29 | Fresh_vcs_state _ -> "Fresh_vcs_state"
30 | Typecheck -> "Typecheck"
31 | HandleServerCommand cmd ->
32 Printf.sprintf "(HandleServerCommand %s)"
33 (ServerCommandTypesUtils.debug_describe_cmd cmd)
34 | Disk_files_modified _ -> "Disk_files_modified"
35 | Stop_recording -> "Stop_recording"