1 // Copyright (c) Facebook, Inc. and its affiliates.
3 // This source code is licensed under the MIT license found in the
4 // LICENSE file in the "hack" directory of this source tree.
6 use crate::gen::global_options::GlobalOptions;
11 impl Default for GlobalOptions {
12 fn default() -> Self {
14 tco_experimental_features: s_set::SSet::new(),
15 tco_migration_flags: s_set::SSet::new(),
16 tco_num_local_workers: None,
17 tco_parallel_type_checking_threshold: 10,
18 tco_max_typechecker_worker_memory_mb: None,
19 tco_defer_class_declaration_threshold: None,
20 tco_prefetch_deferred_files: false,
21 tco_remote_type_check_threshold: 1_000_000,
22 tco_remote_type_check: true,
23 tco_remote_worker_key: None,
24 tco_remote_check_id: None,
25 tco_remote_max_batch_size: 8000,
26 tco_remote_min_batch_size: 5000,
27 tco_num_remote_workers: 0,
28 so_remote_version_specifier: None,
29 so_remote_worker_vfs_checkout_threshold: 0,
30 so_naming_sqlite_path: None,
31 po_auto_namespace_map: vec![],
33 po_deregister_php_stdlib: false,
34 po_disallow_toplevel_requires: false,
35 po_allow_unstable_features: false,
36 tco_log_large_fanouts_threshold: None,
37 tco_log_inference_constraints: false,
38 tco_language_feature_logging: false,
40 tco_disallow_invalid_arraykey: false,
41 tco_disallow_byref_dynamic_calls: false,
42 tco_disallow_byref_calls: true,
43 allowed_fixme_codes_strict: i_set::ISet::new(),
44 log_levels: s_map::SMap::new(),
45 po_disable_lval_as_an_expression: false,
46 tco_shallow_class_decl: false,
47 tco_force_shallow_decl_fanout: false,
48 tco_remote_old_decls_no_limit: false,
49 tco_fetch_remote_old_decls: false,
50 tco_force_load_hot_shallow_decls: false,
51 tco_populate_member_heaps: true,
52 tco_skip_hierarchy_checks: false,
53 tco_skip_tast_checks: false,
54 tco_like_type_hints: false,
55 tco_union_intersection_type_hints: false,
57 tco_coeffects_local: true,
58 tco_strict_contexts: true,
59 tco_like_casts: false,
60 tco_simple_pessimize: 0.0,
61 tco_complex_coercion: false,
62 tco_check_xhp_attribute: false,
63 tco_check_redundant_generics: false,
64 tco_disallow_unresolved_type_variables: false,
65 po_enable_class_level_where_clauses: false,
66 po_disable_legacy_soft_typehints: true,
67 po_allowed_decl_fixme_codes: i_set::ISet::new(),
68 po_allow_new_attribute_syntax: false,
69 tco_global_inference: false,
70 tco_gi_reinfer_types: vec![],
71 tco_ordered_solving: false,
72 tco_const_static_props: false,
73 po_disable_legacy_attribute_syntax: false,
74 tco_const_attribute: false,
75 po_const_default_func_args: false,
76 po_const_default_lambda_args: false,
77 po_disallow_silence: false,
78 po_abstract_static_props: false,
79 po_parser_errors_only: false,
80 tco_check_attribute_locations: true,
81 po_disallow_func_ptrs_in_constants: false,
82 tco_error_php_lambdas: false,
83 tco_disallow_discarded_nullable_awaitables: false,
84 po_enable_xhp_class_modifier: false,
85 po_disable_xhp_element_mangling: false,
86 po_disable_xhp_children_declarations: false,
87 glean_service: String::new(),
88 glean_hostname: String::new(),
90 glean_reponame: String::new(),
91 symbol_write_ownership: false,
92 symbol_write_root_path: String::new(),
93 symbol_write_hhi_path: String::new(),
94 symbol_write_ignore_paths: vec![],
95 symbol_write_index_paths: vec![],
96 symbol_write_index_paths_file: None,
97 symbol_write_include_hhi: true,
98 symbol_write_index_paths_file_output: None,
99 po_enable_enum_classes: true,
100 po_disable_hh_ignore_error: 0,
101 tco_is_systemlib: false,
102 tco_higher_kinded_types: false,
103 tco_method_call_inference: false,
104 tco_report_pos_from_reason: false,
105 tco_typecheck_sample_rate: 1.0,
106 tco_enable_sound_dynamic: false,
107 po_disallow_fun_and_cls_meth_pseudo_funcs: false,
108 po_disallow_inst_meth: false,
109 tco_use_direct_decl_parser: true,
110 tco_ifc_enabled: vec![],
111 tco_global_write_check_enabled: vec![],
112 tco_global_write_check_functions_enabled: s_set::SSet::new(),
113 po_enable_enum_supertyping: true,
114 po_interpret_soft_types_as_like_types: false,
115 tco_enable_strict_string_concat_interp: false,
116 tco_ignore_unsafe_cast: false,
117 tco_no_parser_readonly_check: false,
118 tco_enable_modules: false,
119 tco_enable_expression_trees: false,
120 tco_allowed_expression_tree_visitors: vec![],
121 tco_math_new_code: false,
122 tco_typeconst_concrete_concrete_error: false,
123 tco_enable_strict_const_semantics: 0,
124 tco_strict_wellformedness: 0,
125 tco_meth_caller_only_public_visibility: true,
126 tco_require_extends_implements_ancestors: false,
127 tco_strict_value_equality: false,
128 tco_enforce_sealed_subclasses: false,
129 tco_everything_sdt: false,
130 tco_pessimise_builtins: false,
131 tco_explicit_consistent_constructors: 0,
132 tco_require_types_class_consts: 0,
133 tco_type_printer_fuel: 100,
134 tco_log_saved_state_age_and_distance: false,
135 tco_specify_manifold_api_key: false,
136 tco_saved_state_manifold_api_key: None,
137 tco_profile_top_level_definitions: false,
138 tco_allow_all_files_for_module_declarations: false,
139 tco_allowed_files_for_module_declarations: vec![],
140 tco_use_manifold_cython_client: false,
141 tco_record_fine_grained_dependencies: false,
142 tco_loop_iteration_upper_bound: None,
143 tco_expression_tree_virtualize_functions: false,
144 tco_substitution_mutation: false,
145 tco_use_type_alias_heap: false,