hhvm / xhp-lib

Class libraries for XHP. XHP is a Hack feature that augments the syntax of the language such that XML document fragments become valid Hack expressions.
http://facebook.github.io/xhp-lib/
MIT License
1.38k stars 160 forks source link

Hack array types fail attribute validation #185

Closed simonwelsh closed 4 years ago

simonwelsh commented 6 years ago

With attribute validation turned on, the Hack array types fail to match vec with HH\vec (and similar for dict/keyset)

TJ09 commented 6 years ago

IIRC runtime validation is deprecated and slated for removal; the hack typechecker is aware of XHP attributes and provides static validation instead.

simonwelsh commented 6 years ago

It's now disabled by default. Since we dynamically create XHP instances, we've got it enabled in development where it does pick up things because the type checker can't.

fredemmott commented 6 years ago

completely removing it is definitely in the nearish future, though I'd take a PR for this.