-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
core: remove recoverOrThrow / err.fatal #6343
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lg though i want @brendankenny's 👍 for sure
Hmm. @brendankenny For some reason, some tests fail now. Related to the gather lifecycle. For example: |
8d3bef6
to
b7add1f
Compare
that promise still needs to be |
@@ -197,7 +183,7 @@ class GatherRunner { | |||
passContext.options = gathererDefn.options || {}; | |||
const artifactPromise = Promise.resolve().then(_ => gatherer.beforePass(passContext)); | |||
gathererResults[gatherer.name] = [artifactPromise]; | |||
await GatherRunner.recoverOrThrow(artifactPromise); | |||
await artifactPromise; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I looked too quickly :) I should have said it'll have to be something like await artifactPromise.catch(() => {});
(basically the equivalent of deleting just the if (err.fatal) {throw err;}
part of recoverOrThrow
).
gathererResults[gatherer.name]
needs to be set to the raw promise, which may resolve or reject, which will become either the artifact or an artifact error in collectArtifacts()
. But the await
needs to never throw so the failure of one gatherer won't prevent moving on to the next
Co-Authored-By: Hoten <cjamcl@gmail.com>
^That happened when I used GH's "apply change" feature ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!! one codebase wart removed, only 9000 to go :)
Co-Authored-By: Hoten <cjamcl@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! ✂️ ✂️
Fixes #6298