Turn FFP errors upto 11; report everything
commitf55d56eba265ac5f170dd97c44aaae97ccfe432c
authorPhilip Hölzenspies <drphil@fb.com>
Mon, 25 Sep 2017 12:28:18 +0000 (25 05:28 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Mon, 25 Sep 2017 12:37:27 +0000 (25 05:37 -0700)
tree13855923cf382168bc8940d68148faaad4c4cadb
parentfce4f279535bfd8dd77c909b6b0e97175842bc6b
Turn FFP errors upto 11; report everything

Summary:
So far, the lowerer for the Full Fidelity Parser propagated errors quietly. If the use site didn't ask for them, they would go unnoticed. To match the behaviour of `Parser_hack`, when `keep_errors` is set, no AST should be produced if there are parse errors.

This diff invokes `Full_fidelity_parser_errors.parse_errors` on the error at the bottom of the error stack (this was produced first). Since the desired behaviour is to bail without an AST, this is done prior to lowering.

Reviewed By: andrewjkennedy, hubyrod

Differential Revision: D5697549

fbshipit-source-id: 89aa9bd51e96df8a4bcd5cc8ef5f97d8531b65cd
321 files changed:
hphp/hack/src/parser/full_fidelity_ast.ml
hphp/hack/src/parser/full_fidelity_declaration_parser.ml
hphp/hack/src/parser/full_fidelity_parser_errors.ml
hphp/hack/test/full_fidelity/cases/context/test_method_decl_extra_token.exp
hphp/hack/test/full_fidelity/cases/context/test_method_decl_extra_token.php
hphp/hack/test/full_fidelity/cases/context/test_recovery_to_classish3.exp
hphp/hack/test/full_fidelity/cases/context/test_recovery_to_classish3.php
hphp/hack/test/full_fidelity/cases/test_classish_inside_function_errors.exp
hphp/hack/test/full_fidelity/cases/test_errors_class.exp
hphp/hack/test/full_fidelity/cases/test_errors_class.php
hphp/hack/test/full_fidelity/cases/test_method_modifier_errors.exp
hphp/hack/test/full_fidelity/cases/test_method_modifier_errors.php
hphp/test/hhcodegen_failing_tests_quick
hphp/test/hhcodegen_failing_tests_slow
hphp/test/quick/FPushCtor.php
hphp/test/quick/FPushObjMethod.php
hphp/test/quick/IncDecProp.php
hphp/test/quick/IncDecProp_nopt.php
hphp/test/quick/PropU.php
hphp/test/quick/SetOpProp.php
hphp/test/quick/Unset.php
hphp/test/quick/UnsetProp.php
hphp/test/quick/all_type_comparison_test.php
hphp/test/quick/apc-inner-uncounted.php
hphp/test/quick/autoload2.php
hphp/test/quick/autoload3.php
hphp/test/quick/autoload6.php
hphp/test/quick/autoload7.php
hphp/test/quick/boxed-array-isset.php
hphp/test/quick/builtin_extension_DOMXPath.php
hphp/test/quick/call10.php
hphp/test/quick/call11.php
hphp/test/quick/call12.php
hphp/test/quick/call13.php
hphp/test/quick/call14.php
hphp/test/quick/call_nonstatic_this.php
hphp/test/quick/callable-namespace.php
hphp/test/quick/catch-order.php
hphp/test/quick/class_inaccessible_private.php
hphp/test/quick/class_inaccessible_protected.php
hphp/test/quick/class_invalid_context.php
hphp/test/quick/clone.php
hphp/test/quick/closure_class.php
hphp/test/quick/closure_clone_2.php
hphp/test/quick/closure_gen.php
hphp/test/quick/closure_gen_scope.php
hphp/test/quick/closure_get_class.php
hphp/test/quick/closure_in_generator.php
hphp/test/quick/closure_in_generator2.php
hphp/test/quick/closure_noscope_arg_use_ctx.php
hphp/test/quick/closure_private.php
hphp/test/quick/closure_recursive.php
hphp/test/quick/closure_recursive_bad.php
hphp/test/quick/closure_static.php
hphp/test/quick/closure_use_immediately.php
hphp/test/quick/cnvArr.php
hphp/test/quick/cnvDbl.php
hphp/test/quick/cnvInt.php
hphp/test/quick/cnvObj.php
hphp/test/quick/cnvStr.php
hphp/test/quick/collection-initializer.php
hphp/test/quick/concat_equal.php
hphp/test/quick/constructor_throw.php
hphp/test/quick/continuation-funcname.php
hphp/test/quick/countable.php
hphp/test/quick/cse_fwdctx.php
hphp/test/quick/cuf-call10.php
hphp/test/quick/cuf-call11.php
hphp/test/quick/cuf-warning.php
hphp/test/quick/cuf01.php
hphp/test/quick/cuf03.php
hphp/test/quick/cuf__callStatic1.php
hphp/test/quick/cuf__callStatic2.php
hphp/test/quick/cuf__callStatic4.php
hphp/test/quick/cuf__callStatic5.php
hphp/test/quick/debug_backtrace_trait.php
hphp/test/quick/debugger/printThis.php
hphp/test/quick/define-array.php
hphp/test/quick/dict/comparisons.php
hphp/test/quick/dict/convert.php
hphp/test/quick/dict/invalid-key.php
hphp/test/quick/dict/invalid-scalar.php
hphp/test/quick/dict/is-a.php
hphp/test/quick/dict/static.php
hphp/test/quick/dict/type-hint.php
hphp/test/quick/fail_86pinit.php
hphp/test/quick/fatality.php
hphp/test/quick/fsc01.php
hphp/test/quick/fsc02.php
hphp/test/quick/get_called_class.php
hphp/test/quick/get_class_methods2.php
hphp/test/quick/getter-magic.php
hphp/test/quick/hh_softtype1.php
hphp/test/quick/hh_softtype4.php
hphp/test/quick/hh_typehint1.php
hphp/test/quick/hh_typehint4.php
hphp/test/quick/hoistable_e.php
hphp/test/quick/hopt-eqObj.php
hphp/test/quick/hopt-eqResources.php
hphp/test/quick/hopt-isset.php
hphp/test/quick/hopt-ret2.php
hphp/test/quick/hopt_array.php
hphp/test/quick/hopt_methodcall1.php
hphp/test/quick/impl_abstract_dv_2a.php
hphp/test/quick/impl_abstract_dv_3a.php
hphp/test/quick/incdec-magic.php
hphp/test/quick/incdec-magic2.php
hphp/test/quick/include3.php
hphp/test/quick/init-basic.php
hphp/test/quick/intercept.php
hphp/test/quick/interface4.php
hphp/test/quick/interface5.php
hphp/test/quick/interface7.php
hphp/test/quick/is_callable.php
hphp/test/quick/keyset/comparisons.php
hphp/test/quick/keyset/convert.php
hphp/test/quick/keyset/invalid-key.php
hphp/test/quick/keyset/invalid-scalar.php
hphp/test/quick/keyset/is-a.php
hphp/test/quick/keyset/static.php
hphp/test/quick/keyset/type-hint.php
hphp/test/quick/lambda8.php
hphp/test/quick/magic-get-set.php
hphp/test/quick/mediawikitest.php
hphp/test/quick/method.php
hphp/test/quick/method2.php
hphp/test/quick/method3.php
hphp/test/quick/methodcache_case.php
hphp/test/quick/methodcache_direct_magic.php
hphp/test/quick/methodcache_hit.php
hphp/test/quick/methodcache_magic.php
hphp/test/quick/methodcache_private.php
hphp/test/quick/methodcache_private_public.php
hphp/test/quick/methodcache_protected.php
hphp/test/quick/methodcache_static.php
hphp/test/quick/missing_arg_exception.php
hphp/test/quick/multiple_closures.php
hphp/test/quick/nested_parens.php
hphp/test/quick/no_more_id_clone.php
hphp/test/quick/no_more_id_func.php
hphp/test/quick/nonstatic_invname.php
hphp/test/quick/ns_invalid_class.php
hphp/test/quick/null_this.php
hphp/test/quick/objmethod.php
hphp/test/quick/on_list_assign.php
hphp/test/quick/pinit.php
hphp/test/quick/priv1.php
hphp/test/quick/priv2.php
hphp/test/quick/priv3.php
hphp/test/quick/priv4.php
hphp/test/quick/priv5.php
hphp/test/quick/priv6.php
hphp/test/quick/prop-access-error1.php
hphp/test/quick/prop-access-error2.php
hphp/test/quick/prop_order.php
hphp/test/quick/prop_order_parens.php
hphp/test/quick/properties2.php
hphp/test/quick/properties3.php
hphp/test/quick/properties4.php
hphp/test/quick/raise_array_index_notice.php
hphp/test/quick/recursive-getter.php
hphp/test/quick/recursive-isset.php
hphp/test/quick/recursive-setter.php
hphp/test/quick/recursive-unset.php
hphp/test/quick/redeclared_method1.php
hphp/test/quick/redeclared_method2.php
hphp/test/quick/redeclared_method3.php
hphp/test/quick/redeclared_method4.php
hphp/test/quick/refcount-static.php
hphp/test/quick/reqonce.php
hphp/test/quick/setm-method.php
hphp/test/quick/setmcrash.php
hphp/test/quick/setop-magic.php
hphp/test/quick/setop-magic2.php
hphp/test/quick/setter-magic.php
hphp/test/quick/setter-magic2.php
hphp/test/quick/sqrt.php
hphp/test/quick/static_clscns.php
hphp/test/quick/static_clsmethod.php
hphp/test/quick/static_fatal.php
hphp/test/quick/static_new.php
hphp/test/quick/static_sprop.php
hphp/test/quick/static_sprop2.php
hphp/test/quick/surprise_throw.php
hphp/test/quick/tobadtype.php
hphp/test/quick/trait_property_init.php
hphp/test/quick/trait_two_use_closure.php
hphp/test/quick/traits.php
hphp/test/quick/typehint_lsb_parent.php
hphp/test/quick/typehint_lsb_self.php
hphp/test/quick/undefined-index.php
hphp/test/quick/undefined_is_type.php
hphp/test/quick/unset-decl-prop.php
hphp/test/quick/vec/comparisons.php
hphp/test/quick/vec/convert.php
hphp/test/quick/vec/is-a.php
hphp/test/quick/vec/static.php
hphp/test/quick/vec/type-hint.php
hphp/test/quick/weird-isset-empty.php
hphp/test/quick/weird_properties.php
hphp/test/quick/xhp_file_line.php
hphp/test/quick/zend_closure_020.php
hphp/test/slow/apc/apc-object.php
hphp/test/slow/apc/sleep-throw.php
hphp/test/slow/apc_objects.php
hphp/test/slow/array/array_splice_destructors.php
hphp/test/slow/array_access/maybe_empty_array_get.php
hphp/test/slow/array_key_cast.php
hphp/test/slow/async/awaitable.php
hphp/test/slow/async/const_async.php
hphp/test/slow/async/fcall_await.php
hphp/test/slow/async/genva.php
hphp/test/slow/async/no-mock.php
hphp/test/slow/async/suspend_hook_throw2.php
hphp/test/slow/bug-5127251.php
hphp/test/slow/collection_classes/806.php
hphp/test/slow/collection_classes/807.php
hphp/test/slow/collection_classes/808.php
hphp/test/slow/collection_classes/813.php
hphp/test/slow/collection_classes/814.php
hphp/test/slow/collection_classes/823.php
hphp/test/slow/collection_classes/concat.php
hphp/test/slow/collection_classes/empty_vector.php
hphp/test/slow/collection_classes/vector-addall.php
hphp/test/slow/collection_classes/zip.php
hphp/test/slow/compilation/fpushclsmethod-unique-volatile.php
hphp/test/slow/compilation/refine_closure_crash.php
hphp/test/slow/compilation/side-effect-compares.php
hphp/test/slow/control-flow/test38.php
hphp/test/slow/debug_backtrace/backtrace_async_generators.php
hphp/test/slow/debug_backtrace/compact_crash.php
hphp/test/slow/dict/softcache.php
hphp/test/slow/dv_array/convert.php
hphp/test/slow/dv_array/literal.php
hphp/test/slow/ext_asio/backtrace.php
hphp/test/slow/ext_json/json_decode_hack_arrays.php
hphp/test/slow/ext_url/ext_url.php
hphp/test/slow/guard-relaxation/await-predict.php
hphp/test/slow/hack_arr_compat/compare.php
hphp/test/slow/hhbbc/abstract-ctor.php
hphp/test/slow/hhbbc/array-obj-key.php
hphp/test/slow/hhbbc/async_await_002.php
hphp/test/slow/hhbbc/cgetl.php
hphp/test/slow/hhbbc/closure_context_001.php
hphp/test/slow/hhbbc/closure_context_002.php
hphp/test/slow/hhbbc/closure_context_003.php
hphp/test/slow/hhbbc/closure_context_005.php
hphp/test/slow/hhbbc/diamond_call.php
hphp/test/slow/hhbbc/fcalld_lsb_001.php
hphp/test/slow/hhbbc/fpass_magic_call_001.php
hphp/test/slow/hhbbc/func_family_005.php
hphp/test/slow/hhbbc/func_family_006.php
hphp/test/slow/hhbbc/iteration.php
hphp/test/slow/hhbbc/jmp_type_003.php
hphp/test/slow/hhbbc/minstr_005.php
hphp/test/slow/hhbbc/minstr_007.php
hphp/test/slow/hhbbc/nullsafe_nullbase.php
hphp/test/slow/hhbbc/private_props_002.php
hphp/test/slow/hhbbc/private_props_003.php
hphp/test/slow/hhbbc/private_props_004.php
hphp/test/slow/hhbbc/private_props_008.php
hphp/test/slow/hhbbc/private_props_010.php
hphp/test/slow/hhbbc/private_props_011.php
hphp/test/slow/hhbbc/private_props_012.php
hphp/test/slow/hhbbc/private_props_013.php
hphp/test/slow/hhbbc/private_props_014.php
hphp/test/slow/hhbbc/private_props_018.php
hphp/test/slow/hhbbc/public_static_props_006.php
hphp/test/slow/hhbbc/public_static_props_007.php
hphp/test/slow/hhbbc/static_props_013.php
hphp/test/slow/hhbbc/trait_generator_closure_002.php
hphp/test/slow/hni/builtin_call_dtor_order.php
hphp/test/slow/hni/exception_dtor_order.php
hphp/test/slow/hni/exception_dtor_order2.php
hphp/test/slow/inlining/bug-8971002.php
hphp/test/slow/inlining/nullthrows1.php
hphp/test/slow/intercept/prolog.php
hphp/test/slow/ir_inlining/collection_literal.php
hphp/test/slow/ir_inlining/refcount-this.php
hphp/test/slow/lang/function_pointers.php
hphp/test/slow/lang/invariant.php
hphp/test/slow/lang/tuple.php
hphp/test/slow/memoize/clone_method.php
hphp/test/slow/memoize/no_serialize2.php
hphp/test/slow/nullsafe/cget-ref.php
hphp/test/slow/nullsafe/nullsafe-call-1.php
hphp/test/slow/nullsafe/nullsafe-call-2.php
hphp/test/slow/nullsafe/nullsafe-call-3.php
hphp/test/slow/nullsafe/nullsafe-call-4.php
hphp/test/slow/nullsafe/nullsafe-call-6.php
hphp/test/slow/nullsafe/nullsafe-prop-1.php
hphp/test/slow/nullsafe/nullsafe-prop-10.php
hphp/test/slow/nullsafe/nullsafe-prop-12.php
hphp/test/slow/nullsafe/nullsafe-prop-13.php
hphp/test/slow/nullsafe/nullsafe-prop-5.php
hphp/test/slow/nullsafe/nullsafe-prop-7.php
hphp/test/slow/object_magic_method/has_tostring.php
hphp/test/slow/object_prop_array.php
hphp/test/slow/objprof/dead-static-props.php
hphp/test/slow/parser/async-constructor.php
hphp/test/slow/reflection/ReflectionProperty_defaultValue.php
hphp/test/slow/reflection/ReflectionType-detailed.php
hphp/test/slow/reflection/dynamic_property2.php
hphp/test/slow/return_statement/finally-typecheck.php
hphp/test/slow/return_statement/hard-return-type-throw.php
hphp/test/slow/shapes/type-param.php
hphp/test/slow/shuffle.php
hphp/test/slow/traits/const-from-trait-interface.php
hphp/test/slow/traits/error_file.php
hphp/test/slow/traits/non-unique-base.php
hphp/test/slow/type_annotation/type_annotation2.php
hphp/test/slow/type_annotation/type_annotation7.php
hphp/test/slow/type_annotation/type_annotation_shape1.php
hphp/test/slow/type_constraint/prop-fail.php
hphp/test/slow/type_constraint/verify-class-alias.php
hphp/test/slow/typedef/system-type.php
hphp/test/slow/typedef/typedef_mixed_obj.php
hphp/test/slow/types/alias_parameter_check.php
hphp/test/slow/unpack_args/unpack_call.php
hphp/test/slow/vec/bad-type-conversion.php
hphp/test/slow/yield/yield-suspend-hook.php