cargo publish ignores include
section and fails when submodule (maybe just subdirectory) contains a Cargo.toml
#8597
Labels
C-bug
Category: bug
Command-package
Command-publish
S-triage
Status: This issue is waiting on initial triage.
Problem
I'm trying to publish https://github.com/ZcashFoundation/zcashconsensus which compiles and re-exports a c++ library as a rust crate. This library is defined in another repository we do not control and we just include it as a git submodule. However, when attempting to publish the
build.rs
file fails because the c++ files it needs to build aren't pulled in with the rest of the files before packaging.I tried to fix this by explicitly specifying an
include
list in the[package]
section of myCargo.toml
but cargo seems to completely ignore theinclude
section for files in the git submodule. I believe this is the same issue as seen in this older issue #2657However, I cannot fix this the same way they did because the way brson fixed the issue was by using a previous version of cargo from before the feature to filter out files in subdirectories was introduced, and presumably such a version of cargo is 4 years old now...
Steps
cargo package --list --allow-dirty
to show that the "zcash/src/script/zcashconsensus.h" file has not been included.Notes
Output of
cargo version
:❯ cargo version
cargo 1.45.0 (744bd1f 2020-06-15)
The text was updated successfully, but these errors were encountered: