Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
fix:
fuels dev
hangs after compilation errors #3504base: master
Are you sure you want to change the base?
fix:
fuels dev
hangs after compilation errors #3504Changes from 25 commits
a34e804
e281623
4034899
3851e85
a1dac4b
4ce66e6
c5c693f
4319dd1
0d1e614
b7270c3
3a376f3
1054d91
a84fb39
81dceca
91b6a95
a918ab7
355b882
8319906
f702c91
5367dce
3ed5ff1
9e8d1e5
8a9eee9
5da0b2f
63ac164
dd84b63
7c333c9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
The
onErrorFn
would be aPromise
'sreject
callback for a failedforc build
spawn, and previously it'd reject with1
, which isn't possible to re-throw in thewithConfigErrorHandler
as I changed to be done now.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.
Why go from
async
tosync
?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.
It was always sync because
onFailure
returnsvoid
. refWe could change the signature to be
Promise<void> | void
in some other PR - it comes in handy to be able to pass async callbacks.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.
Got it. I think we could then fix the return type (still in this PR) and keep it
async
because the user may have anasync
tear-down routine for these failure scenarios, and if we don't wait, things may be left dirty.If we leave types aside for one second, we'd be doing something similar to what we did with the test utilities for asserting Fuel errors, although this case is much less convoluted. By considering it could always be
async
and alwaysawait
ing for it, we cover both cases.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.
I have reverted
withConfigErrorHandler
to beasync
again in 7c333c9, as well as all of the other related changes like thisawait
, and have created #3582 because all our event listeners are synchronous. I have included thisonFailure
listener there as well. I think it's better to cover it all in one PR for that issue. Sounds good?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.
This is an example test that benefits from the idea explained in
This file was deleted.