(fix/refactor): rewrite some overbroad try/catches#500
(fix/refactor): rewrite some overbroad try/catches#500agilgur5 wants to merge 1 commit intojaredpalmer:masterfrom
Conversation
|
Welp, error is in the |
- so there's less silent failures that occur but don't error
- replace overbroad try/catch in getProjectPath with just an
fs.pathExists
- replace overbroad try/catch in cleanDistFolder with just an fs.remove
- fs.remove is like rimraf and `rm -rf` in that it won't error if the
file/dir doesn't exist
- if it does error, it's probably because it *failed* to remove the
dir, and that should error, because it's potentially a problem,
especially if you're publishing right after
- rewrite moveTypes() so it doesn't have an overbroad try/catch
- use fs.pathExists first and early return if it doesn't exist
- only check for known errors with fs.copy, and rethrow others
- this way if copy or remove actually fail, they will actually error
- before they would silently fail, which could similarly be pretty
bad if one were to publish right after a silent failure
d643b7c to
2441508
Compare
|
Ok fixed that to only catch some known errors that always occur for some reason (idk why), but |
|
these CI failures are annoying :( |
|
yea, it really hampers the usability 😞esp since GH Actions don't have a restart button 🙃 So I was gonna say that at this point it's so frequent I feel like we should try lots like #403, but that error actually hasn't happened in a bit and this one here I've gotten locally too... Now that I've seen the errors with |
|
Actually your UI looks a bit different in general 🤔 My own repos don't quite look that way maybe an A/B test? |
|
Shit. I didn't realize which was suposed to go first. Sorry about that |
|
Yeaaa... I try to split up commits so that the diffs are actually readable and that the commit messages are informative. When squashed, that information/history is lost, which is one reason why I split up some PRs so they could be merged in-order 😕 (merge or even better, rebase, is OK, but TSDX mostly does squashes) |
|
So I think the reason why In #367, I wrote a commit that ensures declarations are only output once (partially because it caused some errors with multi-entry, but I think that was before I code-split them properly, so it only caused errors with multi-"bundle") and makes |
|
So yupppp, my hunch was right: the reason The try-catch that was narrowed in I thought something was amiss when I was looking at those errors (see also #500 (comment)), I even checked out the So yea, #691 puts a lid on this CI errors saga with a root cause fix. |


so there's less silent failures that occur but don't error
replace overbroad try/catch in getProjectPath with just an
fs.pathExists
replace overbroad try/catch in cleanDistFolder with just an fs.remove
rm -rfin that it won't error if thefile/dir doesn't exist
dir, and that should error, because it's potentially a problem,
especially if you're publishing right after
rewrite moveTypes() so it doesn't have an overbroad try/catch
bad if one were to publish right after a silent failure
Follow-up to #499 around silent failures