Problem
Given a library crate contains a symlink as a source file, i.e. something.rs -> ../other/something.rs, when another crate depends on the library via a { git = ".." } dependency, then on Windows, the cloned dependency fails to build.
An example error message:
error[E0583]: file not found for module `log_disabled`
--> D:\apps\gitlab_runner\.cargo\git\checkouts\rust-derive-builder-ac2766f218331415\67c9c95\derive_builder\src\lib.rs:576:5
|
576 | mod log_disabled;
| ^^^^^^^^^^^^
|
= help: name the file either log_disabled.rs or log_disabled\mod.rs inside the directory "D:\apps\gitlab_runner\.cargo\git\checkouts\rust-derive-builder-ac2766f218331415\67c9c95\derive_builder\src"
Steps
-
(On Windows!), create a crate with the following dependency:
[dependencies]
derive_builder = { git = "https://github.com/colin-kiegel/rust-derive-builder.git" }
# commands:
cargo init --lib builder_test
cd builder_test
cat >> Cargo.toml << EOF
derive_builder = { git = "https://github.com/colin-kiegel/rust-derive-builder.git" }
EOF
-
cargo build
Possible Solution(s)
Not sure, but whatever cargo publish does, the consuming crate is able to build -- on the same commit, derive_builder = "0.8.0" builds successfully.
Notes
Output of cargo version: cargo 1.37.0-nightly (4c1fa54d1 2019-06-24)
OS: Windows 10 x64
Git: git version 2.23.0.windows.1
git config core.symlinks: true
cc: colin-kiegel/rust-derive-builder#149
Problem
Given a library crate contains a symlink as a source file, i.e.
something.rs -> ../other/something.rs, when another crate depends on the library via a{ git = ".." }dependency, then on Windows, the cloned dependency fails to build.An example error message:
Steps
(On Windows!), create a crate with the following dependency:
cargo buildPossible Solution(s)
Not sure, but whatever
cargo publishdoes, the consuming crate is able to build -- on the same commit,derive_builder = "0.8.0"builds successfully.Notes
Output of
cargo version:cargo 1.37.0-nightly (4c1fa54d1 2019-06-24)OS: Windows 10 x64
Git:
git version 2.23.0.windows.1git config core.symlinks:truecc: colin-kiegel/rust-derive-builder#149