-
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): add error variant for file not found on get path #2169
chore(infra): add error variant for file not found on get path #2169
Conversation
Artifacts upload triggered. View details here |
Benchmark movements: |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2169 +/- ##
===========================================
+ Coverage 40.10% 77.21% +37.10%
===========================================
Files 26 386 +360
Lines 1895 40412 +38517
Branches 1895 40412 +38517
===========================================
+ Hits 760 31203 +30443
- Misses 1100 6905 +5805
- Partials 35 2304 +2269 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
cb4bbcb
to
f154aa3
Compare
48c61ac
to
d9f1236
Compare
Artifacts upload triggered. View details here |
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.
Reviewable status: 0 of 11 files reviewed, 1 unresolved discussion (waiting on @ArniStarkware)
crates/infra_utils/src/path.rs
line 27 at r1 (raw file):
// If `CARGO_MANIFEST_DIR` isn't set, fall back to the current working directory .unwrap_or(env::current_dir().expect("Failed to get current directory")); let path_buf = base_dir.join(relative_path);
Please remove this suffix.
Code quote:
_buf
f154aa3
to
4ec2420
Compare
d9f1236
to
a731f1d
Compare
Artifacts upload triggered. View details here |
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.
Reviewable status: 0 of 11 files reviewed, 1 unresolved discussion (waiting on @Itay-Tsabary-Starkware)
crates/infra_utils/src/path.rs
line 27 at r1 (raw file):
Previously, Itay-Tsabary-Starkware wrote…
Please remove this suffix.
Done.
4ec2420
to
ca5efcc
Compare
a731f1d
to
07744c9
Compare
Artifacts upload triggered. View details here |
Benchmark movements: |
ca5efcc
to
4686fa7
Compare
07744c9
to
41012c8
Compare
Artifacts upload triggered. View details here |
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 9 files at r2.
Reviewable status: 1 of 11 files reviewed, 1 unresolved discussion (waiting on @ArniStarkware)
crates/infra_utils/src/path.rs
line 8 at r2 (raw file):
#[derive(Debug, Error)] pub enum GetPathError {
Maybe PathResolutionError
? WDYT?
Code quote:
GetPathError
crates/infra_utils/src/path.rs
line 15 at r2 (raw file):
IoError(#[from] std::io::Error), }
Please add a todo on me (tsabary): wrap path-related env::*
invocations in the repo as utility functions here
crates/infra_utils/src/path.rs
line 40 at r2 (raw file):
Ok(path) }
Please add tests for this: one that successfully resolves a path, one that returns PathDoesNotExist
, and one that results in IoError
.
Code quote:
pub fn resolve_project_relative_path(relative_path: &str) -> Result<PathBuf, GetPathError> {
let base_dir = path_of_project_root();
let path = base_dir.join(relative_path);
if !path.try_exists()? {
return Err(GetPathError::PathDoesNotExist { path });
}
Ok(path)
}
Artifacts upload triggered. View details here |
Benchmark movements: |
4686fa7
to
74b80c4
Compare
41012c8
to
dcd74fc
Compare
dcd74fc
to
622ea22
Compare
Artifacts upload triggered. View details here |
Artifacts upload triggered. View details here |
Artifacts upload triggered. View details here |
Artifacts upload triggered. View details here |
622ea22
to
2910d40
Compare
Artifacts upload triggered. View details here |
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: 1 of 11 files reviewed, 1 unresolved discussion (waiting on @Itay-Tsabary-Starkware)
crates/infra_utils/src/path.rs
line 8 at r2 (raw file):
Previously, Itay-Tsabary-Starkware wrote…
Maybe
PathResolutionError
? WDYT?
Done.
crates/infra_utils/src/path.rs
line 15 at r2 (raw file):
Previously, Itay-Tsabary-Starkware wrote…
Please add a todo on me (tsabary): wrap path-related
env::*
invocations in the repo as utility functions here
Done.
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 11 files at r1, 7 of 9 files at r2, 2 of 2 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @ArniStarkware)
crates/infra_utils/src/path.rs
line 40 at r2 (raw file):
Previously, Itay-Tsabary-Starkware wrote…
Please add tests for this: one that successfully resolves a path, one that returns
PathDoesNotExist
, and one that results inIoError
.
Will be in a different pr.
Previously, Itay-Tsabary-Starkware wrote…
See: #2210. |
No description provided.