Skip to content
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

cargo vendor is not consistent about paths and symbolic links on Windows vs. other platforms #14965

Open
glandium opened this issue Dec 19, 2024 · 0 comments
Labels
C-bug Category: bug Command-vendor O-windows OS: Windows S-triage Status: This issue is waiting on initial triage.

Comments

@glandium
Copy link
Contributor

Problem

About paths:
when a crate contains paths for e.g. dependencies in a workspace, cargo vendor uses / on Unices and \ on Windows, changing whatever the original path was.

About symbolic links:
when a crate contains symbolic links to another file in a workspace, cargo vendor expands the content on Unices and replaces it with the path of the link target on Windows.

Steps

  1. cargo new foo
  2. cd foo
  3. cargo add libz-rs-sys
  4. cargo vendor

On Linux or Mac, you end up with a proper vendor/libz-rs-sys/LICENSE file, and vendor/libz-rs-sys/Cargo.toml has dependencies.zlib-rs.path = "../zlib-rs".
On Windows, vendor/libz-rs-sys/LICENSE literally contains ../LICENSE, and vendor/libz-rs-sys/Cargo.toml has dependencies.zlib-rs.path = "..\zlib-rs".

Possible Solution(s)

cargo vendor should be consistent, wherever it's run.

Notes

No response

Version


@glandium glandium added C-bug Category: bug S-triage Status: This issue is waiting on initial triage. labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug Command-vendor O-windows OS: Windows S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

No branches or pull requests

2 participants