Collect XHP attribute ancestors when exporting decls
Summary:
It looks like T39730034 was caused by failing to store all ancestors of hot classes whose decls we store in the saved state. When exporting declarations, we store all ancestors in the dc_ancestors collection on each hot class. This collection includes parents, interfaces and traits, but does not include XHP classes whose attributes are used by the hot class--those ancestors are stored in dc_xhp_attr_deps. This means that we fail to store the types of XHP attributes inherited via an XHP-attribute-use, resulting in raising Decl_heap_elems_bug when we attempt to use the hot class which had a cold XHP-attribute-use ancestor. Evidently, we did not have any hot classes which used the XHP-attribute-inclusion feature on a cold class until this morning.
The fix is straightforward--we just need to store xhp_attr_deps ancestors in addition to dc_ancestors.
Reviewed By: 2BitSalute
Differential Revision:
D13870852
fbshipit-source-id:
27b9d81ce5a11381f0531ae3576b9258e5d1a7e7