Add unique ids to each Hack build, and handle sigint
[hiphop-php.git] / hphp / hack / src / client / clientLogCommand.ml
blobe788da6d691233fd26ae02f25ea16b38fc11aaf6
1 (**
2 * Copyright (c) 2014, Facebook, Inc.
3 * All rights reserved.
5 * This source code is licensed under the BSD-style license found in the
6 * LICENSE file in the "hack" directory of this source tree. An additional grant
7 * of patent rights can be found in the PATENTS file in the same directory.
9 *)
11 (* The full type ClientCommand.command refers to environment types in
12 * other client modules like ClientStart.env, ClientBuild.env, etc. If
13 * we want to do logging from, e.g. inside ClientBuild, then the fact
14 * that EventLogger's logging functions take the current client
15 * command as an argument, this creates a circular dependency
17 * ClientBuild -> EventLogger -> ClientCommand
18 * ^-------------------------------v
20 * To avoid this, we have here a stripped-down version of
21 * ClientCommand.command where the data carried by each branch is only
22 * the data required for logging. *)
24 type build_kind =
25 | Push
26 | Full
27 | Incremental
28 | Steps
30 type log_command =
31 | LCCheck of Path.t * (* from *) string * (* mode *) string
32 | LCStart of Path.t
33 | LCStop of Path.t
34 | LCRestart of Path.t
35 | LCBuild of Path.t * build_kind * (* random id *) string