Don't quote assert expressions in DairikiDiff
authorOri Livneh <ori@wikimedia.org>
Wed, 9 Mar 2016 01:58:36 +0000 (17:58 -0800)
committerOri Livneh <ori@wikimedia.org>
Wed, 9 Mar 2016 02:10:52 +0000 (18:10 -0800)
commit9e867b07b8cc42370c358fc0b25679920ceb8e62
tree28bdd2c12c530ecd5cbefb281b90da76ee1df5b9
parent65e4a41e96da6937d8e7155d81b635ba0e124d85
Don't quote assert expressions in DairikiDiff

Per HHVM issue 5128, it is not possible to use '$this' in string-literal
assert() expressions. We can either wait for this to be fixed (unlikely to
happen soon, since it involves deep interpreter internals), comment out or
remove the asserts, or simply unquote them, so that they are actual expressions
rather than strings. The downside to this is that assertions will always be
evaluated (but so what, they are extremely cheap), and that when an assertion
fail the error message will simply read 'assert(): Assertion failed in
/path/to/file on line XXX' as opposed to including the expression in the
output. Fair trade, IMO.

See: https://github.com/facebook/hhvm/issues/5128

Bug: T124163
Change-Id: Ib458b1b0c28f8d38e9df427196ae79814f6dc0c2
includes/diff/DairikiDiff.php