Don't stop status iter on error, log warning instead #2821
Merged
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.
This is a workaround for #2820. The reported issue is that, under very specific circumstances that involve a symlink and a submodule (see the linked issue for details), the status tab is empty. This is due to the fact that the status iter that collects individual status items exits early when it encounters an error. In that instance, all other status items are discarded and
get_statusreturns just a single error.This PR changes the iter to discard errors, but log a warning using
log::warn!instead.get_statuswill then report all status items that didn’t error. That could potentially be confusing as the UI will not show any indicator that anything has gone wrong, but that seems an acceptable short-term trade-off, compared to showing nothing at all.