-
Notifications
You must be signed in to change notification settings - Fork 25
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
chore(infra): canonicalize path resolution #2254
Conversation
2463080
to
d54a6f8
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2254 +/- ##
===========================================
+ Coverage 40.10% 77.34% +37.23%
===========================================
Files 26 385 +359
Lines 1895 40296 +38401
Branches 1895 40296 +38401
===========================================
+ Hits 760 31165 +30405
- Misses 1100 6828 +5728
- Partials 35 2303 +2268 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
d54a6f8
to
684bf34
Compare
684bf34
to
7dd34ce
Compare
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.
Reviewed 1 of 2 files at r1.
Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @Itay-Tsabary-Starkware)
crates/infra_utils/src/path.rs
line 17 at r1 (raw file):
#[error(transparent)] IoError(#[from] std::io::Error), }
Should we delete this error variant and use std::io::Error as IOError
throughout?
Code quote:
#[derive(Debug, Error)]
pub enum PathResolutionError {
/// This error is raised when the file path does not exist, or when a non-final component in a
/// path is not a directory. See [`std::fs::canonicalize`] for more information.
#[error(transparent)]
IoError(#[from] std::io::Error),
}
crates/infra_utils/src/path_test.rs
line 3 at r1 (raw file):
use crate::path::{path_of_project_root, resolve_project_relative_path}; // TODO: Add a test for PathResolutionError::IoError.
Delete this TODO.
7dd34ce
to
fa27662
Compare
commit-id:c2547652
fa27662
to
4d734eb
Compare
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.
Reviewable status: 0 of 5 files reviewed, 2 unresolved discussions (waiting on @ArniStarkware)
crates/infra_utils/src/path.rs
line 17 at r1 (raw file):
Previously, ArniStarkware (Arnon Hod) wrote…
Should we delete this error variant and use
std::io::Error as IOError
throughout?
Yes. That also enabled the removal of GetPathError
הי"ד.
crates/infra_utils/src/path_test.rs
line 3 at r1 (raw file):
Previously, ArniStarkware (Arnon Hod) wrote…
Delete this TODO.
Done.
Artifacts upload workflows: |
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.
Reviewable status: 0 of 5 files reviewed, 1 unresolved discussion (waiting on @Itay-Tsabary-Starkware)
crates/infra_utils/src/path_test.rs
line 10 at r2 (raw file):
let result = resolve_project_relative_path(relative_path); assert!(result.is_err(), "Expected an non-existent path error, got {:?}", result);
Or is this an overkill?
Suggestion:
assert_eq!(result.unwrap_err().display(), "File not fount", "Expected an non-existent path error, got {:?}", result);
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.
Reviewed 4 of 5 files at r2, all commit messages.
Reviewable status: 4 of 5 files reviewed, 1 unresolved discussion (waiting on @Itay-Tsabary-Starkware)
Benchmark movements: |
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.
Reviewed 1 of 5 files at r2.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Itay-Tsabary-Starkware)
✓ Commit merged in pull request #2264 |
Stack: