Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

path {} should be relative In guppy-0.14.1\src\graph\build.rs:811:5 #642

Closed
indygreg opened this issue May 29, 2022 · 3 comments · Fixed by #648
Closed

path {} should be relative In guppy-0.14.1\src\graph\build.rs:811:5 #642

indygreg opened this issue May 29, 2022 · 3 comments · Fixed by #648

Comments

@indygreg
Copy link

I'm seeing a panic of the form path {} should be relative on Windows.

e.g. https://github.com/indygreg/PyOxidizer/runs/6640717731?check_suite_focus=true

I haven't verified this, but I have a strong hypothesis the root cause is failure to account for different volumes / drive letters on Windows.
e.g. if the manifest under evaluation is at C:\tmp\Cargo.toml and it references a package in D:\workspace via a [package] path = entry.

I only saw this on CI in GitHub Actions. And I made the error go away by switching from using a temporary directory for the Rust project being built to a sub-directory of the Cargo target directory the current test binary resides in. In GitHub Actions, it looks like the temporary directory was on C:\ and the main workspace (which the temporary Rust project referenced) was on D:. Since Guppy's code appears to insist on relative paths and you can't construct relative paths on Windows when paths span drives, I could easily see how this would lead to problems.

Filesystem paths are fun, right?

@sunshowers
Copy link
Contributor

sunshowers commented May 29, 2022

Thanks Greg... sigh, yeah, I'd forgotten that cross-drive paths can't be relative. As much as guppy tries, there's no platform-independent way to handle them sadly. I'll push an update to guppy that fixes this.

sunshowers added a commit to sunshowers/cargo-guppy that referenced this issue May 29, 2022
sunshowers added a commit to sunshowers/cargo-guppy that referenced this issue May 29, 2022
sunshowers added a commit that referenced this issue May 29, 2022
@indygreg
Copy link
Author

Thanks for the quick fix! Since I've already worked around this, there's no need to rush a release out the door.

@sunshowers
Copy link
Contributor

@indygreg well, just did in guppy 0.14.2, heh

indygreg added a commit to indygreg/PyOxidizer that referenced this issue May 29, 2022
This pulls in a fix for guppy that could result in run-time errors on
Windows. facebookarchive/cargo-guppy#642
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants