Problem
When using an invalid (?) include field in Cargo.toml cargo package will fail with "failed to verify package tarball".
Steps
- Create a new repo,
cargo init tmp && cd tmp
- Add
include = [ "./src/main.rs" ] to Cargo.toml.
- Add and commit everything:
git add . && git commit -m "init".
- Package (or publish) the create:
cargo package
Packaging tmp v0.1.0 (/private/var/folders/lq/rzq0zxld0bb5mcy4jl1txrf00000gn/T/tmp.1svg10Al/tmp)
Verifying tmp v0.1.0 (/private/var/folders/lq/rzq0zxld0bb5mcy4jl1txrf00000gn/T/tmp.1svg10Al/tmp)
error: failed to verify package tarball
Caused by:
failed to read `/private/var/folders/lq/rzq0zxld0bb5mcy4jl1txrf00000gn/T/tmp.1svg10Al/tmp/target/package/tmp-0.1.0/Cargo.toml`
Caused by:
No such file or directory (os error 2)
Possible Solution(s)
In the actual code I dropped ./ from the include field and it worked, it doesn't seem to be the case with a new crate.
Notes
Output of cargo version: cargo 1.35.0-nightly (0e35bd8 2019-03-13) (currently can't get a newer version due to clippy being broken on nightly).
Problem
When using an invalid (?) include field in Cargo.toml cargo package will fail with "failed to verify package tarball".
Steps
cargo init tmp && cd tmpinclude = [ "./src/main.rs" ]to Cargo.toml.git add . && git commit -m "init".cargo packagePossible Solution(s)
In the actual code I dropped
./from the include field and it worked, it doesn't seem to be the case with a new crate.Notes
Output of
cargo version: cargo 1.35.0-nightly (0e35bd8 2019-03-13) (currently can't get a newer version due to clippy being broken on nightly).