Taint positions derived from reasons and report tainted primary error positions
Summary:
Introduce a new kind of position that is "tainted", meaning that it was derived from reason information inside a type.
Add a new option `--report-pos-from-reason` to `hh_single_type_check`, and `report_pos_from_reason` to `.hhconfig`. When set, this has two effects
(a) It adds a suffix "[FROM REASON]" to the raw error message output (with `--error-format raw`) if such a "tainted" position is the primary location of the error.
(b) It disables `HH_FIXME` having any effect on such errors, and reports it as "unFIXMEable".
The motivation for this is type checking in the absence of reason/position information in types. This will let us remove positions from decls, and still be able to type-check, *and* honour HH_FIXMEs, but with more spartan error messages. But in order to do that we must eliminate all places where we derive a primary position from the reason info in the type.
Reviewed By: CatherineGasnier
Differential Revision:
D23264461
fbshipit-source-id:
bfbf7bb5ccc4ca0eaf539c0a80cf4b48f1b0d7bc