Skip to content

Commit 3606f1d

Browse files
fix: update oxc-resolver and fix windows bug (#9754)
1 parent 453637f commit 3606f1d

File tree

4 files changed

+43
-10
lines changed

4 files changed

+43
-10
lines changed

Cargo.lock

Lines changed: 26 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ notify = "6.1.1"
123123
num_cpus = "1.15.0"
124124
once_cell = "1.17.1"
125125
owo-colors = "3.5.0"
126-
oxc_resolver = { version = "2.1.0" }
126+
oxc_resolver = "4.2.0"
127127
parking_lot = "0.12.1"
128128
path-clean = "1.0.1"
129129
pathdiff = "0.2.1"

crates/turbo-trace/src/tracer.rs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub enum TraceError {
4848
#[error("failed to read file: {0}")]
4949
FileNotFound(AbsoluteSystemPathBuf),
5050
#[error(transparent)]
51-
PathEncoding(Arc<PathError>),
51+
PathError(Arc<PathError>),
5252
#[error("tracing a root file `{0}`, no parent found")]
5353
RootFile(AbsoluteSystemPathBuf),
5454
#[error("failed to resolve import to `{import}` in `{file_path}`")]
@@ -212,7 +212,7 @@ impl Tracer {
212212
match resolved.into_path_buf().try_into().map_err(Arc::new) {
213213
Ok(path) => files.push(path),
214214
Err(err) => {
215-
errors.push(TraceError::PathEncoding(err));
215+
errors.push(TraceError::PathError(err));
216216
continue;
217217
}
218218
}
@@ -453,7 +453,19 @@ impl Tracer {
453453
return (errors, None);
454454
};
455455

456-
for import in imported_files {
456+
for mut import in imported_files {
457+
if cfg!(windows) {
458+
match import.to_realpath() {
459+
Ok(path) => {
460+
import = path;
461+
}
462+
Err(err) => {
463+
errors.push(TraceError::PathError(Arc::new(err)));
464+
return (errors, None);
465+
}
466+
}
467+
}
468+
457469
if shared_self
458470
.files
459471
.iter()

crates/turborepo-lib/src/query/file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ impl From<turbo_trace::TraceError> for Diagnostic {
8181
path: Some(file.to_string()),
8282
..Default::default()
8383
},
84-
turbo_trace::TraceError::PathEncoding(_) => Diagnostic {
84+
turbo_trace::TraceError::PathError(_) => Diagnostic {
8585
message,
8686
..Default::default()
8787
},

0 commit comments

Comments
 (0)