fix(foreign): keep Windows temp paths non-verbatim
CI / schema instance validation + consumers (push) Waiting to run
CI / runtime contract (macos-latest) (push) Waiting to run
CI / runtime contract (windows-latest) (push) Waiting to run
Linux strict security lane (G-C) / strict isolation escape matrix (push) Waiting to run
CI / fmt + clippy + test (Linux x86_64) (push) Waiting to run
ci/woodpecker/push/woodpecker Pipeline was successful
CI / schema instance validation + consumers (push) Waiting to run
CI / runtime contract (macos-latest) (push) Waiting to run
CI / runtime contract (windows-latest) (push) Waiting to run
Linux strict security lane (G-C) / strict isolation escape matrix (push) Waiting to run
CI / fmt + clippy + test (Linux x86_64) (push) Waiting to run
ci/woodpecker/push/woodpecker Pipeline was successful
fs::canonicalize on Windows returns a \\?\C:\... path. Node's module loader lstats the working/script path and rejects the verbatim form, so all Node foreign-kernel tests failed on windows-latest. Use the native temp directory on Windows and retain canonicalization on Unix for symlink safety; widen the CI annotator so any remaining native failure shows a full assertion block.
This commit is contained in:
1 parent
4265231a14
commit
a24161c934
2 files changed
+13
-2
No files matched your search
@@ -1058,6 +1058,14 @@ struct TempArtifacts {
|
||||
|
||||
impl TempArtifacts {
|
||||
fn create(extension: &str) -> Result<Self, ForeignError> {
|
||||
// `fs::canonicalize` on Windows returns a verbatim `\\?\C:\...`
|
||||
// path. Node's module loader uses the working directory/script path
|
||||
// with `lstat` and rejects that form (`node:fs` ENOENT/UNKNOWN), even
|
||||
// though Rust can open it. Use the native temp path on Windows and
|
||||
// keep canonicalization for Unix symlink safety.
|
||||
#[cfg(windows)]
|
||||
let base = std::env::temp_dir();
|
||||
#[cfg(not(windows))]
|
||||
let base = fs::canonicalize(std::env::temp_dir()).unwrap_or_else(|_| std::env::temp_dir());
|
||||
let mut last_error: Option<io::Error> = None;
|
||||
for _ in 0..16 {
|
||||
|
||||
@@ -31,8 +31,11 @@ def interesting_lines(lines: list[str]) -> list[tuple[int, str]]:
|
||||
if "panicked at" in line:
|
||||
for offset in range(-2, 19):
|
||||
add(index + offset)
|
||||
elif line.startswith("failures:") or line.startswith("---- "):
|
||||
for offset in range(0, 6):
|
||||
elif line.startswith("failures:"):
|
||||
for offset in range(0, 8):
|
||||
add(index + offset)
|
||||
elif line.startswith("---- "):
|
||||
for offset in range(0, 30):
|
||||
add(index + offset)
|
||||
elif re.match(r"^error(\[|:)", line):
|
||||
for offset in range(-1, 7):
|
||||
|
||||
Reference in new issue
Block a user