Closed as not planned
Description
Problem
When trying to build a crate on Windows that has dependencies with long file names, cargo
fails to pull dependencies with a "path too long" error. This issue does not seem to appear on Linux (tested with WSL).
The output I got from cargo build
error: failed to load source for a dependency on `curve25519-fiat`
Caused by:
Unable to update https://github.com/calibra/rust-curve25519-fiat.git#d7e30233
Caused by:
failed to update submodule `fiat-crypto`
Caused by:
failed to update submodule `coqprime`
Caused by:
invalid path '\\?\C:\Users\User\.cargo\git\checkouts\rust-curve25519-fiat-d934e46b8646fad1\d7e3023\curve25519-fiat\src\external\fiat-crypto\coqprime\src\Coqprime\examples\prime216656403549020227250327256032933021325435259861468456540459488823774358486649614451547405419273433458932168893949521787.v' (path too long); class=Filesystem (30)
Steps
- git clone https://github.com/libra/libra.git
- cargo build
Possible Solution(s)
- I assume this issue is related to this bug that exists in libgit2 since 2015: Support
core.longpaths
on Windows libgit2/libgit2#3053. If so, pushing for a fix in libgit2 may resolve this issue. - Make
cargo
use the system's git command, or add an option to use another binary instead of libgit2.
Notes
Output of cargo version
:
cargo 1.37.0-nightly (4c1fa54 2019-06-24)
As of today, libra is locked on rust nightly-2019-07-08.