Cargo package/publish skips copying some sub-folders for verify build

My crate (which happens to be part of a workspace, but I don't think that affects this) has some subdirectories with a Cargo.toml file in them (long story...) that are not part of the crate or any workspace and don't cause problems normally (build, test, clippy, doc, etc)

However, when I try to package or publish my crate it fails, as when cargo creates the copy of the crate to verify-build, it does not copy any sub-folder that has a Cargo.toml file in it, and there are files in there that are needed for the build.

My only workaround now is to cargo publish using the --no-verify option.

I wondered if folks knew:
a) Why is this done?
b) Is there any workaround that would allow the copy, the build to work and hence me to publish normally (with verification build)?

Thanks!

OK, found this thanks to a helpful user on discord:

https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-exclude-and-include-fields

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.