You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unhandled conditions manifest as task failure (as discussed in #9001), and because of workcache, rustpkg does most of its work that can raise conditions in separate paths. Thus, the main function in rustpkg can't handle these conditions. However, in test cases we sometimes want to check that rustpkg failed with a certain unhandled condition. The solution I came up with is, inside rustpkg, to use task::try to wrap the main work, then check whether the result is Err(()) and set the exit code, then exit without failing, if so. This isn't a great solution since it uses the same exit code for all possible unhandled conditions (in one of the tests, I specifically want to check that the copy_failed condition was raised). But, I can't do any better right now because of the return type of task::try.
The text was updated successfully, but these errors were encountered:
Unhandled conditions manifest as task failure (as discussed in #9001), and because of workcache, rustpkg does most of its work that can raise conditions in separate paths. Thus, the main function in rustpkg can't handle these conditions. However, in test cases we sometimes want to check that rustpkg failed with a certain unhandled condition. The solution I came up with is, inside rustpkg, to use task::try to wrap the main work, then check whether the result is
Err(())
and set the exit code, then exit without failing, if so. This isn't a great solution since it uses the same exit code for all possible unhandled conditions (in one of the tests, I specifically want to check that thecopy_failed
condition was raised). But, I can't do any better right now because of the return type oftask::try
.The text was updated successfully, but these errors were encountered: