gdesmott / system-deps

Run pkg-config from declarative dependencies in Cargo.toml
Apache License 2.0
89 stars 21 forks source link

Cargo.toml used by tests are not included in the generated package #45

Open eclipseo opened 3 years ago

eclipseo commented 3 years ago

It seems the tests are failing because the tests directory in the crate does not contain all the subdirectory like in the repo:

$ ll tests/
drwxr-xr-x@   - bob 12 Jul 20:09 toml-missing-file
.rw-r--r--@ 468 bob  1 Jan  1970 testanotherlib.pc
.rw-r--r--@ 176 bob  1 Jan  1970 testdata.pc
.rw-r--r--@ 229 bob  1 Jan  1970 testlib-2.0.pc
.rw-r--r--@ 229 bob  1 Jan  1970 testlib-3.0.pc
.rw-r--r--@ 290 bob  1 Jan  1970 testlib.pc

Shouldn't all the tests subdirectories be included in the crate?

gdesmott commented 3 years ago

That's really strange as only the subdir toml-missing-file is included and I don't see anything special with this one. Don't know how cargo publish pick the files actually included, will investigate.

gdesmott commented 3 years ago

This can easily be check using:

$ cargo package -l
.cargo_vcs_info.json
.github/release-drafter.yml
.github/workflows/ci.yml
.github/workflows/release-drafter.yml
.gitignore
Cargo.toml
Cargo.toml.orig
LICENSE-APACHE
LICENSE-MIT
README.md
src/lib.rs
src/metadata.rs
src/test.rs
src/tests/testanotherlib.pc
src/tests/testdata.pc
src/tests/testlib-2.0.pc
src/tests/testlib-3.0.pc
src/tests/testlib.pc
src/tests/toml-missing-file/no-cargo-toml-here

Looks like we are hitting a cargo limitation. Let's wait for the input from cargo developers.