Skip to content

Commit df15948

Browse files
Merge branch 'main' into dimitri/lockfile-states
2 parents e83f303 + 9cc30e0 commit df15948

File tree

47 files changed

+454
-159
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+454
-159
lines changed

Cargo.lock

+50-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ turborepo-fs = { path = "crates/turborepo-fs" }
6161
turborepo-lib = { path = "crates/turborepo-lib", default-features = false }
6262
turborepo-lockfiles = { path = "crates/turborepo-lockfiles" }
6363
turborepo-microfrontends = { path = "crates/turborepo-microfrontends" }
64+
turborepo-process = { path = "crates/turborepo-process" }
6465
turborepo-repository = { path = "crates/turborepo-repository" }
6566
turborepo-ui = { path = "crates/turborepo-ui" }
6667
turborepo-unescape = { path = "crates/turborepo-unescape" }
@@ -108,7 +109,7 @@ dunce = "1.0.3"
108109
either = "1.9.0"
109110
futures = "0.3.26"
110111
futures-retry = "0.6.0"
111-
git2 = { version = "0.20.0", default-features = false }
112+
git2 = { version = "0.19.0", default-features = false }
112113
hex = "0.4.3"
113114
httpmock = { version = "0.6.8", default-features = false }
114115
indexmap = "1.9.2"
@@ -123,7 +124,7 @@ notify = "6.1.1"
123124
num_cpus = "1.15.0"
124125
once_cell = "1.17.1"
125126
owo-colors = "3.5.0"
126-
oxc_resolver = { version = "2.1.0" }
127+
oxc_resolver = "4.2.0"
127128
parking_lot = "0.12.1"
128129
path-clean = "1.0.1"
129130
pathdiff = "0.2.1"

crates/turbo-trace/src/tracer.rs

+18-3
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,22 @@ impl Tracer {
453453
return (errors, None);
454454
};
455455

456-
for import in imported_files {
456+
for mut import in imported_files {
457+
// Windows has this annoying habit of abbreviating paths
458+
// like `C:\Users\Admini~1` instead of `C:\Users\Administrator`
459+
// We canonicalize to get the proper, full length path
460+
if cfg!(windows) {
461+
match import.to_realpath() {
462+
Ok(path) => {
463+
import = path;
464+
}
465+
Err(err) => {
466+
errors.push(TraceError::PathError(Arc::new(err)));
467+
return (errors, None);
468+
}
469+
}
470+
}
471+
457472
if shared_self
458473
.files
459474
.iter()

0 commit comments

Comments
 (0)