aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/skylark
diff options
context:
space:
mode:
authorGravatar Nathan Harmata <nharmata@google.com>2016-12-12 17:15:04 +0000
committerGravatar John Cater <jcater@google.com>2016-12-12 20:36:01 +0000
commitb11dd482eef2eb922686fb9ba96e39113cc1abd1 (patch)
tree7c2886d876310a638f74c054f80c2fd4910f037e /src/main/java/com/google/devtools/skylark
parent8e5f864a024bc21f332f997cc503c0ff2fff6926 (diff)
Fix bad bug with the parallel implementation of BinaryOperatorExpression. Turns out that ForkJoinTask#adapt(Callable) returns a ForkJoinTask whose Future#get on error throws a ExecutionException wrapping a RuntimeException wrapping the thrown checked exception from the callable. This is documented behavior [1] that I incorrectly didn't know about.
The additional level of wrapping meant that the catch-block of the parallel implementation of BinaryOperatorExpression wasn't rethrowing the InterruptedException/QueryException that the parallel task threw. The subtly in this bug is that the query expression being evaluated needs to be of the form "e1 + e2", where evaluation of "e1" throws a QueryException even in keepGoing mode (note that most of the query errors actually go through AbstractBlazeQueryEnvironment#reportBuildFileError). The test I wrote picks on LetExpression's evaluation-time (rather than e.g. parsing time) validation of the variable name. [1] https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ForkJoinTask.html#adapt(java.util.concurrent.Callable) -- PiperOrigin-RevId: 141772584 MOS_MIGRATED_REVID=141772584
Diffstat (limited to 'src/main/java/com/google/devtools/skylark')
0 files changed, 0 insertions, 0 deletions