File tree Expand file tree Collapse file tree 10 files changed +26
-22
lines changed Expand file tree Collapse file tree 10 files changed +26
-22
lines changed Original file line number Diff line number Diff line change @@ -392,9 +392,13 @@ let parse_check_args cmd ~from_default =
392
392
" (mode) for each entry in input list get list of function dependencies [file:line:character list]"
393
393
);
394
394
( " --gen-prefetch-dir" ,
395
- Arg. String (fun x -> set_mode (MODE_GEN_PREFETCH_DIR x)),
396
- " generate a directory of decls and typecheck dependencies to use for prefetching"
397
- ^ " Usage: --gen-prefetch-dir ~/prefetched-dir" );
395
+ Arg. String (fun _x -> set_mode MODE_POPULATE_REMOTE_DECLS ),
396
+ " Compute all decls for the repo and upload them to the remote decl service."
397
+ ^ " Usage: --gen-prefetch-dir unused" );
398
+ ( " --populate-remote-decls" ,
399
+ Arg. Unit (fun () -> set_mode MODE_POPULATE_REMOTE_DECLS ),
400
+ " Compute all decls for the repo and upload them to the remote decl service."
401
+ );
398
402
( " --gen-saved-ignore-type-errors" ,
399
403
Arg. Set gen_saved_ignore_type_errors,
400
404
" generate a saved state even if there are type errors (default: false)."
Original file line number Diff line number Diff line change @@ -276,8 +276,8 @@ let main_internal
276
276
let % lwt results = rpc_with_retry args @@ Rpc. FIND_REFS action in
277
277
ClientFindRefs. go results args.output_json;
278
278
Lwt. return (Exit_status. No_error , Telemetry. create () )
279
- | MODE_GEN_PREFETCH_DIR dirname ->
280
- let % lwt (_, telemetry) = rpc args @@ Rpc. GEN_PREFETCH_DIR dirname in
279
+ | MODE_POPULATE_REMOTE_DECLS ->
280
+ let % lwt (_, telemetry) = rpc args Rpc. POPULATE_REMOTE_DECLS in
281
281
Lwt. return (Exit_status. No_error , telemetry)
282
282
| MODE_GO_TO_IMPL_CLASS class_name ->
283
283
let % lwt results =
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ type client_mode =
32
32
| MODE_FORMAT of int * int
33
33
| MODE_FULL_FIDELITY_PARSE of string
34
34
| MODE_FULL_FIDELITY_SCHEMA
35
- | MODE_GEN_PREFETCH_DIR of string
35
+ | MODE_POPULATE_REMOTE_DECLS
36
36
| MODE_GO_TO_IMPL_CLASS of string
37
37
| MODE_GO_TO_IMPL_CLASS_REMOTE of string
38
38
| MODE_GO_TO_IMPL_METHOD of string
Original file line number Diff line number Diff line change 463
463
serverFileDependents
464
464
serverFileSync
465
465
serverFormat
466
- serverGenPrefetchDir
467
466
serverIdle
468
467
serverInferTypeBatch
469
468
serverTastHolesBatch
472
471
serverLint
473
472
serverMethodJumps
474
473
serverMethodJumpsBatch
474
+ serverPopulateRemoteDecls
475
475
serverRage
476
476
serverRename
477
477
serverRewriteLambdaParameters
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ let rpc_command_needs_full_check : type a. a t -> bool =
46
46
| DELETE_CHECKPOINT _ -> true
47
47
| IN_MEMORY_DEP_TABLE_SIZE -> true
48
48
| NO_PRECHECKED_FILES -> true
49
- | GEN_PREFETCH_DIR _ -> false
49
+ | POPULATE_REMOTE_DECLS -> false
50
50
| STATS -> false
51
51
| DISCONNECT -> false
52
52
| STATUS_SINGLE _ -> false
Original file line number Diff line number Diff line change @@ -556,7 +556,7 @@ type _ t =
556
556
| RAGE : ServerRageTypes .result t
557
557
| CST_SEARCH : cst_search_input -> (Hh_json .json , string ) result t
558
558
| NO_PRECHECKED_FILES : unit t
559
- | GEN_PREFETCH_DIR : string -> unit t
559
+ | POPULATE_REMOTE_DECLS : unit t
560
560
| FUN_DEPS_BATCH : (string * int * int ) list -> string list t
561
561
| LIST_FILES_WITH_ERRORS : string list t
562
562
| FILE_DEPENDENTS : string list -> string list t
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ let debug_describe_t : type a. a t -> string = function
59
59
| RAGE -> " RAGE"
60
60
| CST_SEARCH _ -> " CST_SEARCH"
61
61
| NO_PRECHECKED_FILES -> " NO_PRECHECKED_FILES"
62
- | GEN_PREFETCH_DIR _ -> " GEN_PREFETCH_DIR "
62
+ | POPULATE_REMOTE_DECLS -> " POPULATE_REMOTE_DECLS "
63
63
| FUN_DEPS_BATCH _ -> " FUN_DEPS_BATCH"
64
64
| LIST_FILES_WITH_ERRORS -> " LIST_FILES_WITH_ERRORS"
65
65
| FILE_DEPENDENTS _ -> " FILE_DEPENDENTS"
Original file line number Diff line number Diff line change @@ -22,18 +22,10 @@ let ( >>= ) res f =
22
22
| Ok r -> f r
23
23
| Error e -> Future.Promise. return (Error e))
24
24
25
- let ( > |= ) = Future.Promise. bind
26
-
27
25
let return_ok x = Future.Promise. return (Ok x)
28
26
29
27
let return_err x = Future.Promise. return (Error x)
30
28
31
- let get_name_and_decl_hashes_from_decls decls : (string * Int64.t) list =
32
- List. filter_map decls ~f: (fun (name , decl , decl_hash ) ->
33
- match decl with
34
- | Shallow_decl_defs. Class _ -> Some (name, decl_hash)
35
- | _ -> None )
36
-
37
29
let get_hhconfig_version ~(repo : Path.t ) :
38
30
(string , string ) result Future.Promise. t =
39
31
let hhconfig_path =
Original file line number Diff line number Diff line change
1
+ (*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the "hack" directory of this source tree.
6
+ *
7
+ *)
8
+
9
+ val go :
10
+ ServerEnv .env -> ServerEnv .genv -> MultiWorker .worker list option -> unit
Original file line number Diff line number Diff line change @@ -411,10 +411,8 @@ let handle : type a. genv -> env -> is_stale:bool -> a t -> env * a =
411
411
(env, Error (Exception. to_string e))
412
412
end
413
413
| NO_PRECHECKED_FILES -> (ServerPrecheckedFiles. expand_all env, () )
414
- | GEN_PREFETCH_DIR dir ->
415
- (* TODO(bobren) remove dir entirely from saved state job invocation *)
416
- let _ = dir in
417
- (env, ServerGenPrefetchDir. go env genv genv.workers)
414
+ | POPULATE_REMOTE_DECLS ->
415
+ (env, ServerPopulateRemoteDecls. go env genv genv.workers)
418
416
| FUN_DEPS_BATCH positions ->
419
417
(env, ServerFunDepsBatch. go genv.workers positions env)
420
418
| LIST_FILES_WITH_ERRORS -> (env, ServerEnv. list_files env)
You can’t perform that action at this time.
0 commit comments