Skip to content

Commit 5df86e9

Browse files
committed
Update OCaml stubs
The OSS OCaml stubs under src/stubs have become out of sync with the code referencing them. Update the stubs to match. Split from #9564.
1 parent f016ebc commit 5df86e9

File tree

17 files changed

+276
-25
lines changed

17 files changed

+276
-25
lines changed

hphp/hack/src/client/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
pos
3030
rage
3131
redeclarations
32+
sandcastle
3233
server
3334
server_command_types
3435
server_monitor

hphp/hack/src/client_and_server/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@
396396
(libraries
397397
ci_util
398398
client_provider
399+
sandcastle
399400
server_config
400401
server_notifier)
401402
(preprocess

hphp/hack/src/hackc/compile/cargo/options/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@ oxidized = { version = "0.0.0", path = "../../../../oxidized" }
1919
serde = { version = "1.0.219", features = ["derive", "rc"] }
2020

2121
[build-dependencies]
22+
generate_configs_lib = { version = "0.0.0", path = "../../../../../../tools/configs" }
2223
nom = "8"
2324
nom-language = "0.1"
25+
nom = "7.1"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
let start _ ~file_whose_existence_indicates_hhvm_is_paused:_ = ()
2+
3+
let rename_decls ~rename:_ ~hack_source_code:_ = ""

hphp/hack/src/stubs/dune

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,16 @@
5959
(preprocess
6060
(pps lwt_ppx ppx_deriving.std)))
6161

62-
; this stub file is used by both buck2 and dune
63-
(rule
64-
(target remote_old_decls_ffi.ml)
65-
(action
66-
(copy# ../facebook/remote_old_decls/stubs/remote_old_decls_ffi.ml remote_old_decls_ffi.ml)))
62+
(library
63+
(name state_loader_stubs)
64+
(wrapped false)
65+
(modules saved_state_loader state_loader_futures state_loader_lwt)
66+
(libraries
67+
hg
68+
server_env
69+
typechecker_options)
70+
(preprocess
71+
(pps lwt_ppx ppx_deriving.std)))
6772

6873
(library
6974
(name remote_old_decls_ffi)
@@ -74,12 +79,6 @@
7479
(preprocess
7580
(pps lwt_ppx ppx_deriving.std)))
7681

77-
; this stub file is used by both buck2 and dune
78-
(rule
79-
(target hh_distc_ffi.ml)
80-
(action
81-
(copy# ../facebook/hh_distc/check_ffi/stubs/hh_distc_ffi.ml hh_distc_ffi.ml)))
82-
8382
(library
8483
(name hh_distc_ffi)
8584
(wrapped false)
@@ -159,6 +158,21 @@
159158
(preprocess
160159
(pps lwt_ppx ppx_deriving.std)))
161160

161+
(library
162+
(name redeclarations)
163+
(wrapped false)
164+
(modules declarationsRewriter))
165+
166+
(library
167+
(name linttool)
168+
(wrapped false)
169+
(modules linttool))
170+
171+
(library
172+
(name sandcastle_stubs)
173+
(wrapped false)
174+
(modules sandcastle))
175+
162176
(library
163177
(name startup_initializer_stubs)
164178
(wrapped false)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
(*
2+
* Copyright (c) Facebook, Inc. and its 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+
type handle
10+
11+
let spawn ~root:_ ~ss_dir:_ ~hhdg_path:_ ~fanout:_ _ = failwith "start not implemented"
12+
13+
let join _ = failwith "join_handle not implemented"
14+
15+
let cancel _ = failwith "cancel not implemented"
16+
17+
let is_finished _ = failwith "is_finished not implemented"
18+
19+
let get_fd _ = failwith "get_fd not implemented"
20+
21+
let get_re_session_id _ = failwith "get_re_session_id not implemented"
22+
23+
let recv _ = failwith "recv not implemented"

hphp/hack/src/stubs/linttool.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
let run _ ~severity:_ = ()

hphp/hack/src/stubs/logging/hackEventLogger.ml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ let set_changed_mergebase _ = ()
3131

3232
let set_hhconfig_version _ = ()
3333

34+
let set_mergebase_globalrev _ = ()
35+
3436
let set_rollout_group _ = ()
3537

3638
let set_rollout_flags _ = ()
@@ -111,7 +113,7 @@ let type_check_dirty ~start_t:_ ~dirty_count:_ ~recheck_count:_ = ()
111113

112114
let lock_stolen _ = ()
113115

114-
let client_init ~init_id:_ ~from:_ ~custom_columns:_ _ = ()
116+
let client_init ~init_id:_ ~from:_ ~is_interactive:_ ~custom_columns:_ _ = ()
115117

116118
let serverless_ide_init ~init_id:_ = ()
117119

@@ -585,3 +587,11 @@ module Fanouts = struct
585587
let log ~changes_cardinal:_ ~fanout_cardinal:_ ~max_class_fanout_cardinal:_ =
586588
()
587589
end
590+
591+
module TypingErrors = struct
592+
let log_errors ~type_check_end_id:_ ~data:_ = ()
593+
end
594+
595+
module Diagnostics = struct
596+
let log _ = ()
597+
end
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
(*
2+
* Copyright (c) Facebook, Inc. and its 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+
let get_decls_via_file_hashes _ _ =
10+
failwith "get_decls_via_file_hashes not implemented"

hphp/hack/src/stubs/sandcastle.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
let is_sandcastle(): bool = false

0 commit comments

Comments
 (0)