cargo-package ignores sub-directories containing Cargo.toml #9643
Labels
C-bug
Category: bug
Command-package
S-needs-team-input
Status: Needs input from team on whether/how to proceed.
Problem
I am trying to publish a crate which builds adhoc crates during run-time. For this reason, I
include_dir::include_dir!("assets/libadhoc")
. Thisassets/libadhoc/
contains aCargo.toml
which is then written to disk and modified during run-time. However, on acargo publish
this directory is not copied totarget/package/
, even withpackage.include = ["*"]
in the parentCargo.toml
.Steps
Possible Solution(s)
I figure
**/Cargo.toml
are ignored for a reason, but this is not documented in cargo-package(1). I suggest an amend.Further, I cannot find a way to override this behavior. I suggest making that possible. Alternatively/additionally, I suggest adding an environmental variable that points to the generated
target/package/project-0.1.0/
so that I can copy the files myself.For now, I'll rename the file to
not-Cargo.toml
and rename it during run-time so that I can publish my crate.Notes
Output of
cargo version
: cargo 1.52.0 (6976741 2021-04-21)The text was updated successfully, but these errors were encountered: