New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore propagation of thrown exceptions between rust and python #4083

Merged
merged 10 commits into from Nov 22, 2016

Conversation

Projects
None yet
4 participants
@stuhood
Member

stuhood commented Nov 19, 2016

Problem

In the first implementation of the rust engine, I punted on passing thrown exception values back and forth between rust and python, to avoid dealing with string manipulation. A fair number of tests were disabled in order to account for that.

Solution

Rust Throw states now hold a Value representing a python exception, and a new extern was created to allow rust to instantiate an Exception for errors occurring in scheduling.

Result

Throw values always contain python objects, #4025 is fixed, and all tests that were disabled for #4025 are now reenabled.

Show outdated Hide outdated build-support/bin/native/bootstrap.sh
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
set -e

This comment has been minimized.

@jsirois

jsirois Nov 20, 2016

Member

This appears to be unrelated and on inspection it looks like it should interact OK with build-support/bin/native/generate-bintray-manifest.sh, which sources it, but it would be nice to separate the change.

@jsirois

jsirois Nov 20, 2016

Member

This appears to be unrelated and on inspection it looks like it should interact OK with build-support/bin/native/generate-bintray-manifest.sh, which sources it, but it would be nice to separate the change.

This comment has been minimized.

@stuhood

stuhood Nov 22, 2016

Member

Dropped.

@stuhood

stuhood Nov 22, 2016

Member

Dropped.

Show outdated Hide outdated src/python/pants/engine/engine.py
raise ExecutionError('received unexpected Throw state(s) for root(s): {}\n{}'
.format(stringified_throw_roots, cumulative_trace))
cumulative_trace = '\n'.join(self._scheduler.trace())
raise ExecutionError('received unexpected Throw state(s):\n{}'.format(cumulative_trace))

This comment has been minimized.

@jsirois

jsirois Nov 20, 2016

Member

Sentence cap?: 'Received ...'

@jsirois

jsirois Nov 20, 2016

Member

Sentence cap?: 'Received ...'

@baroquebobcat

LGTM

@JieGhost

Ship it!

@stuhood stuhood merged commit ab4902e into pantsbuild:master Nov 22, 2016

1 of 2 checks passed

coverage/coveralls Coverage pending from Coveralls.io
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment