Skip to content
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

Backtrack through calls from @rules to synchronous engine methods (Cherry-pick of #15979) #16003

Closed

Conversation

stuhood
Copy link
Member

@stuhood stuhood commented Jun 29, 2022

As reported in #15954, backtracking doesn't currently work when a synchronous method like Workspace.write_digests is the source of a MissingDigest error. This was due to a TODO left behind in #15761, where we did not propagate the Failure type "through" @rule bodies.

To fix this, we add a conversion from Failure to PrErr which wraps in a well known exception type, and then look for that type when converting back from PyErr to Failure.

Fixes #15954.

…antsbuild#15979)

As reported in pantsbuild#15954, backtracking doesn't currently work when a synchronous method like `Workspace.write_digests` is the source of a `MissingDigest` error. This was due to a TODO left behind in pantsbuild#15761, where we did not propagate the `Failure` type "through" `@rule` bodies.

To fix this, we add a conversion from `Failure` to `PrErr` which wraps in a well known exception type, and then look for that type when converting back from `PyErr` to `Failure`.

Fixes pantsbuild#15954.
# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
@stuhood stuhood added the category:bugfix Bug fixes for released features label Jun 29, 2022
@tdyas
Copy link
Contributor

tdyas commented Jun 29, 2022

Duplicate of #16001.

@stuhood
Copy link
Member Author

stuhood commented Jun 29, 2022

Duplicate of #16001.

Heh, thanks.

@stuhood stuhood closed this Jun 29, 2022
@stuhood stuhood deleted the cherry-pick-15979-to-2.13.x branch June 29, 2022 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bugfix Bug fixes for released features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants