Skip to content

Commit 38d8a8f

Browse files
grievejiafacebook-github-bot
authored andcommitted
Add back global_root and local_root to Info response
Reviewed By: dkgi Differential Revision: D30524486 fbshipit-source-id: 5b445127ba9e5b0c5a0232b8ebd16df553243ea8
1 parent 2a80487 commit 38d8a8f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

source/new_server/requestHandler.ml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,15 @@ let process_request
145145
=
146146
match request with
147147
| Request.GetInfo ->
148+
let { Configuration.Analysis.project_root; local_root; _ } = configuration in
148149
let response =
149150
Response.Info
150151
{
151152
version = Version.version ();
152153
pid = Unix.getpid () |> Pid.to_int;
153154
socket = Pyre.Path.absolute socket_path;
155+
global_root = Path.show project_root;
156+
relative_local_root = Path.get_relative_to_root ~root:project_root ~path:local_root;
154157
}
155158
in
156159
Lwt.return (state, response)

source/new_server/response.ml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ type t =
1111
| Ok
1212
| Error of string
1313
| Info of {
14+
(* All fields are required to implement `pyre servers` *)
1415
version: string;
1516
pid: int;
1617
socket: string;
18+
global_root: string;
19+
relative_local_root: string option;
1720
}
1821
| TypeErrors of Analysis.AnalysisError.Instantiated.t list
1922
| Query of Query.Response.t

0 commit comments

Comments
 (0)