Skip to content

Commit a55be3b

Browse files
Chaoqiang Dengfacebook-github-bot
authored andcommitted
Rename the argument --enable-global-access-check-files
Summary: Rename the argument from "`--enable-global-access-check`" to "`--enable-global-access-check-files`" (which turns on the checker for the files with the given prefix), such that it can be easily distinguish from another argument "`--enable-global-access-check-functions`" (which turns on the checker for the functions in the given json file) by the name. Reviewed By: jamesjwu, yuxuanchen1997 Differential Revision: D40035427 fbshipit-source-id: e8b262f069ef0e24869bd709cb4cb88f2a531317
1 parent be9b3ed commit a55be3b

17 files changed

Lines changed: 61 additions & 54 deletions

File tree

‎hphp/hack/src/hackrs/compare_folded_decls_file.ml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ let () =
242242
(* The following options do not affect the direct decl parser and can be ignored
243243
(they are used by hh_single_type_check, and we run hh_single_decl over all of
244244
the typecheck test cases). *)
245-
ignored_arg "--enable-global-access-check";
245+
ignored_arg "--enable-global-access-check-files";
246246
ignored_arg "--enable-global-access-check-functions";
247247
ignored_flag "--abstract-static-props";
248248
ignored_arg "--allowed-decl-fixme-codes";

‎hphp/hack/src/hh_oxidize/convert_toplevel_phrase.ml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ let enum_modules =
7575
("error_codes", "NastCheck");
7676
("error_codes", "Typing");
7777
("error_codes", "Init");
78-
(* An optional error set that runs only for arg --enable-global-access-check
79-
or --enable-global-access-check-function. *)
78+
(* An optional error set that runs only for arg --enable-global-access-check-files
79+
or --enable-global-access-check-functions. *)
8080
("error_codes", "GlobalWriteCheck");
8181
]
8282

‎hphp/hack/src/hh_single_decl.ml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ let () =
241241
(* The following options do not affect the direct decl parser and can be ignored
242242
(they are used by hh_single_type_check, and we run hh_single_decl over all of
243243
the typecheck test cases). *)
244-
ignored_arg "--enable-global-access-check";
244+
ignored_arg "--enable-global-access-check-files";
245245
ignored_arg "--enable-global-access-check-functions";
246246
ignored_flag "--abstract-static-props";
247247
ignored_arg "--allowed-decl-fixme-codes";

‎hphp/hack/src/hh_single_type_check.ml‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ let parse_options () =
328328
ref (TypecheckerOptions.profile_top_level_definitions GlobalOptions.default)
329329
in
330330
let memtrace = ref None in
331-
let enable_global_access_check = ref [] in
331+
let enable_global_access_check_files = ref [] in
332332
let enable_global_access_check_functions = ref SSet.empty in
333333
let refactor_mode = ref "" in
334334
let refactor_analysis_mode = ref "" in
@@ -814,14 +814,15 @@ let parse_options () =
814814
" Sets the amount of fuel that the type printer can use to display an individual type. Default: "
815815
^ string_of_int
816816
(TypecheckerOptions.type_printer_fuel GlobalOptions.default) );
817-
( "--enable-global-access-check",
817+
( "--enable-global-access-check-files",
818818
Arg.String
819-
(fun s -> enable_global_access_check := String_utils.split ',' s),
820-
" Run global write checker on any file whose path is prefixed by the argument (use \"\\\" for hh_single_type_check)"
819+
(fun s ->
820+
enable_global_access_check_files := String_utils.split ',' s),
821+
" Run global access checker on any file whose path is prefixed by the argument (use \"\\\" for hh_single_type_check)"
821822
);
822823
( "--enable-global-access-check-functions",
823824
Arg.String set_enable_global_access_check_functions,
824-
" Run global write checker on functions listed in the given JSON file"
825+
" Run global access checker on functions listed in the given JSON file"
825826
);
826827
( "--overwrite-loop-iteration-upper-bound",
827828
Arg.Int (fun u -> loop_iteration_upper_bound := Some u),
@@ -965,7 +966,7 @@ let parse_options () =
965966
["/"]
966967
else
967968
[])
968-
~tco_global_access_check_enabled:!enable_global_access_check
969+
~tco_global_access_check_files_enabled:!enable_global_access_check_files
969970
~tco_global_access_check_functions_enabled:
970971
!enable_global_access_check_functions
971972
~tco_use_direct_decl_parser:!use_direct_decl_parser

‎hphp/hack/src/options/globalOptions.ml‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ type t = {
128128
po_disallow_inst_meth: bool;
129129
tco_use_direct_decl_parser: bool;
130130
tco_ifc_enabled: string list;
131-
tco_global_access_check_enabled: string list;
131+
tco_global_access_check_files_enabled: string list;
132132
tco_global_access_check_functions_enabled: SSet.t;
133133
po_enable_enum_supertyping: bool;
134134
po_interpret_soft_types_as_like_types: bool;
@@ -268,7 +268,7 @@ let default =
268268
po_disallow_inst_meth = false;
269269
tco_use_direct_decl_parser = true;
270270
tco_ifc_enabled = [];
271-
tco_global_access_check_enabled = [];
271+
tco_global_access_check_files_enabled = [];
272272
tco_global_access_check_functions_enabled = SSet.empty;
273273
po_enable_enum_supertyping = true;
274274
po_interpret_soft_types_as_like_types = false;
@@ -419,7 +419,8 @@ let make
419419
?(po_disallow_inst_meth = default.po_disallow_inst_meth)
420420
?(tco_use_direct_decl_parser = default.tco_use_direct_decl_parser)
421421
?(tco_ifc_enabled = default.tco_ifc_enabled)
422-
?(tco_global_access_check_enabled = default.tco_global_access_check_enabled)
422+
?(tco_global_access_check_files_enabled =
423+
default.tco_global_access_check_files_enabled)
423424
?(tco_global_access_check_functions_enabled =
424425
default.tco_global_access_check_functions_enabled)
425426
?(po_enable_enum_supertyping = default.po_enable_enum_supertyping)
@@ -572,7 +573,7 @@ let make
572573
po_disallow_inst_meth;
573574
tco_use_direct_decl_parser;
574575
tco_ifc_enabled;
575-
tco_global_access_check_enabled;
576+
tco_global_access_check_files_enabled;
576577
tco_global_access_check_functions_enabled;
577578
po_enable_enum_supertyping;
578579
po_interpret_soft_types_as_like_types;

‎hphp/hack/src/options/globalOptions.mli‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,11 @@ type t = {
257257
(a list containing the empty string would denote all files,
258258
an empty list denotes no files) *)
259259
tco_ifc_enabled: string list;
260-
(* Enable global write check on the specified list of path prefixes
260+
(* Enable global access check on the specified list of path prefixes
261261
(a list containing the empty string would denote all files,
262262
an empty list denotes no files) *)
263-
tco_global_access_check_enabled: string list;
264-
(* Enable global write check on the spcified set of functions
263+
tco_global_access_check_files_enabled: string list;
264+
(* Enable global access check on the spcified set of functions
265265
(Empty denotes no functions) *)
266266
tco_global_access_check_functions_enabled: SSet.t;
267267
(* Enables the enum supertyping extension *)
@@ -439,7 +439,7 @@ val make :
439439
?po_disallow_inst_meth:bool ->
440440
?tco_use_direct_decl_parser:bool ->
441441
?tco_ifc_enabled:string list ->
442-
?tco_global_access_check_enabled:string list ->
442+
?tco_global_access_check_files_enabled:string list ->
443443
?tco_global_access_check_functions_enabled:SSet.t ->
444444
?po_enable_enum_supertyping:bool ->
445445
?po_interpret_soft_types_as_like_types:bool ->

‎hphp/hack/src/options/typecheckerOptions.ml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,11 @@ let enable_ifc t = GlobalOptions.{ t with tco_ifc_enabled = ["/"] }
155155

156156
let ifc_enabled t = t.GlobalOptions.tco_ifc_enabled
157157

158-
let enable_global_access_check t =
159-
GlobalOptions.{ t with tco_global_access_check_enabled = ["/"] }
158+
let enable_global_access_check_files t =
159+
GlobalOptions.{ t with tco_global_access_check_files_enabled = ["/"] }
160160

161-
let global_access_check_enabled t =
162-
t.GlobalOptions.tco_global_access_check_enabled
161+
let global_access_check_files_enabled t =
162+
t.GlobalOptions.tco_global_access_check_files_enabled
163163

164164
let global_access_check_functions_enabled t =
165165
t.GlobalOptions.tco_global_access_check_functions_enabled

‎hphp/hack/src/oxidized/gen/global_options.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This source code is licensed under the MIT license found in the
44
// LICENSE file in the "hack" directory of this source tree.
55
//
6-
// @generated SignedSource<<618c9c7aba2f3189646de21f775d6491>>
6+
// @generated SignedSource<<d412f7aa311a71c04d8bef01eee2b491>>
77
//
88
// To regenerate this file, run:
99
// hphp/hack/src/oxidized_regen.sh
@@ -133,7 +133,7 @@ pub struct GlobalOptions {
133133
pub po_disallow_inst_meth: bool,
134134
pub tco_use_direct_decl_parser: bool,
135135
pub tco_ifc_enabled: Vec<String>,
136-
pub tco_global_access_check_enabled: Vec<String>,
136+
pub tco_global_access_check_files_enabled: Vec<String>,
137137
pub tco_global_access_check_functions_enabled: s_set::SSet,
138138
pub po_enable_enum_supertyping: bool,
139139
pub po_interpret_soft_types_as_like_types: bool,

‎hphp/hack/src/oxidized/manual/global_options_impl.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl Default for GlobalOptions {
111111
po_disallow_inst_meth: false,
112112
tco_use_direct_decl_parser: true,
113113
tco_ifc_enabled: vec![],
114-
tco_global_access_check_enabled: vec![],
114+
tco_global_access_check_files_enabled: vec![],
115115
tco_global_access_check_functions_enabled: s_set::SSet::new(),
116116
po_enable_enum_supertyping: true,
117117
po_interpret_soft_types_as_like_types: false,

‎hphp/hack/src/oxidized_by_ref/gen/global_options.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This source code is licensed under the MIT license found in the
44
// LICENSE file in the "hack" directory of this source tree.
55
//
6-
// @generated SignedSource<<7f2e8a77347250323dcd3eecaca58989>>
6+
// @generated SignedSource<<37e03868880ffb01ac0fe62911b0bb79>>
77
//
88
// To regenerate this file, run:
99
// hphp/hack/src/oxidized_regen.sh
@@ -158,7 +158,7 @@ pub struct GlobalOptions<'a> {
158158
#[serde(deserialize_with = "arena_deserializer::arena", borrow)]
159159
pub tco_ifc_enabled: &'a [&'a str],
160160
#[serde(deserialize_with = "arena_deserializer::arena", borrow)]
161-
pub tco_global_access_check_enabled: &'a [&'a str],
161+
pub tco_global_access_check_files_enabled: &'a [&'a str],
162162
#[serde(deserialize_with = "arena_deserializer::arena", borrow)]
163163
pub tco_global_access_check_functions_enabled: s_set::SSet<'a>,
164164
pub po_enable_enum_supertyping: bool,

0 commit comments

Comments
 (0)