Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Replaces fs-err for HardLinkStoragesToSnapshotErrors #34838

Merged

Conversation

brooksprumo
Copy link
Contributor

@brooksprumo brooksprumo commented Jan 18, 2024

Problem

The fs-err create does not include source errors when displaying the error. The solana repo's convention is to include the source error in the message, so we end up losing the underlying cause of an IO error if fs_err is used.

Here's more info about the issue that I raised on the fs-err repo: andrewhickman/fs-err#51. Turns out their behavior is desired, and likely the most idiomatically correct Rust way. But we're not going to change the solana repo's error reporting anytime soon. Instead, we should replace the use of fs-err with regular std::fs.

Related: #34799

Summary of Changes

Replace fs-err for all the HardlinkStoragesToSnapshotError errors

@brooksprumo brooksprumo self-assigned this Jan 18, 2024
@brooksprumo brooksprumo marked this pull request as ready for review January 18, 2024 20:29
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (8f9d915) 81.8% compared to head (37e439e) 81.7%.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #34838     +/-   ##
=========================================
- Coverage    81.8%    81.7%   -0.1%     
=========================================
  Files         825      825             
  Lines      223269   223274      +5     
=========================================
+ Hits       182635   182638      +3     
- Misses      40634    40636      +2     

@brooksprumo brooksprumo requested a review from HaoranYi January 18, 2024 21:19
Copy link
Contributor

@HaoranYi HaoranYi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants