-
Notifications
You must be signed in to change notification settings - Fork 44
ensure callers of BuildDirectory::run
can determine if the source of the error is in Prepare::prepare
#103
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
base: master
Are you sure you want to change the base?
Conversation
Making it a draft while I add tests (rebasing on top of the first two commit of #98) |
if a more specifc one hasn't already been provided this way we can easily distinguish BuildDirectory::run failing due to Prepare::prepare failing from it failing for other reasons
8bd1691
to
f25d523
Compare
to discourage explicitly matching this variant explicitly. As the enum is non_exhaustive a wildcard pattern is required anyway.
to match std::io::ErrorKind::Uncategorized
Renamed the added |
@syphar ping for review, as it has been two weeks. |
Hi! I see the same issue as with #98, where I don't know much about the new failure cases, and if they are correct. The team owning this library is our infra-team, so either one of them, or help from the cargo team is necessary. I can review the rest if someone approves the failure cases and their detection. |
I don't see how cargo is involved in this one. I thought in the other cargo was involved as there was matching on the cargo error messages, but no matching on error messages is done here. The main functional change is Were all added test cases go from not having a PrepareError context to having a catch-all PrepareError::Unspecified context. Given that there's only one place this can come from I would have thought it's clearly correct. Is there some information/context I can provide to help get this review? Any info on getting a review from a cargo team member? I tried asking on Zulip under t-cargo but didn't get any response till now. |
I can check again, I was coming from the new cargo |
I'm not sure what I'm missing. There are a bunch of new cargo.toml error test cases added, and I can't really judge if all is correct here. |
Ah, I think I misunderstood what the problem was and oversimplified my explanation, sorry. For this PR they don't really make a difference so I could remove all but one. I would expect checking out the commit adding the tests and running them should confirm that the tests have a correct baseline expectation. And one could just run While yes cargo as a tool is involved I don't see where this requires special cargo expertise. |
Without this can be difficult to distinguish whether
BuildDirectory::run
failed due tof
failing or due toPrepare::prepare
failing.Related to #98 as it helps with errors not easily sub-categorized to at least get them into the general category of prepare failures.