-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
I've been trying to track down an annoying issue in vendoring, where we're using the crate-dir layout as described here
As part of the build process, we invoke cargo package at some point to give us an image that we then roll out to the crate-dir to the vendor layout prefix.
An annoying recurring problem is dependencies listed as "dev-dependencies" turn out to be necessary to be pre-provided somewhere( for metadata purposes, due to the absence of the crates.io registry index/cache thing ), and this is leading to fun problems with them becoming cyclical dependencies that thwart the build system.
Testing has shown that the presence of the "examples/" directory with literally any ".rs" file is sufficient for this to happen.
One could possibly argue that examples and tests are similar in both requiring dev-dependencies in some regard, but oddly, only examples are tripping up the "dev-dependencies required" issue.
You can soft-demonstrate this issue in some regards by checking out a copy of a crate (itertools is my example), and making sure there is no Cargo.lock file, and running:
cargo package --no-verify --no-metadata
With the examples/ directory present, every invocation of that command will trip it up with emitting:
Updating crates.io index
At the end of the task.
Removing the examples directory makes this problem go away.