cargo-auditable: `dep:` syntax causes build failures in rare cases
https://github.com/Byron/gitoxide doesn’t successfully build with cargo-auditable anymore. It fails in https://github.com/rust-secure-code/cargo-auditable/blob/9fa7fb3988b4d2414397b9550a3f3fd1aa1bc8f2/cargo-auditable/src/collect_audit_data.rs#L77-L80. I’m not sure if gitoxide or cargo-auditable is to blame here, and the error message isn’t all that helpful to me either:
thread 'main' panicked at 'cargo metadata failure: error: Package `gix-features v0.31.0 (/home/jcgruenhage/dev/github.com/Byron/gitoxide/gix-features)` does not have feature `prodash`. It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.
', cargo-auditable/src/collect_audit_data.rs:77:9
That reads to me as if something tried to enable a prodash feature on gix-features, but I couldn’t find such a thing.
For context, afaict, v0.23.0 is the last version that builds. Anything newer than that runs into the above issue. I ran into this while trying to update the version of gitoxide we ship on Void Linux.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 18 (10 by maintainers)
Commits related to this issue
- fix: cargo-auditable build error Use `prodash` instead of `dep:prodash` in gix-features and `tracing` instead of `dep:tracing` in gitoxide-core. The `dep:mydep` syntax removes the implicit `mydep` f... — committed to GitoxideLabs/gitoxide by Byron 3 years ago
- fix: cargo-auditable build error Use `prodash` instead of `dep:prodash` in gix-features and `tracing` instead of `dep:tracing` in gitoxide-core. The `dep:mydep` syntax removes the implicit `mydep` f... — committed to GitoxideLabs/gitoxide by jalil-salame 3 years ago
- fix: cargo-auditable build error Use `futures-lite` instead of `dep:futures-lite` in gix-packetline and gix-protocol. See-Also: https://github.com/rust-secure-code/cargo-auditable/issues/124 — committed to Prince213/gitoxide by Prince213 2 years ago
- fix: cargo-auditable build error Use `futures-lite` instead of `dep:futures-lite` in gix-packetline and gix-protocol. See-Also: https://github.com/rust-secure-code/cargo-auditable/issues/124 — committed to pierrechevalier83/gitoxide by Prince213 2 years ago
- wasmtime: fix auditable builds See https://github.com/rust-secure-code/cargo-auditable/issues/124 for details, but TL;DR `dep:foo` in a features list generates a private feature named "foo". `cargo-a... — committed to wolfi-dev/os by OddBloke 2 years ago
- qdrant: work around cargo-auditable bug We're tripping over https://github.com/rust-secure-code/cargo-auditable/issues/124 so need to fix up the `dep:` features causing it — committed to wolfi-dev/os by OddBloke a year ago
I’m keeping this open to track a more general failure mode.
Fortunately that is not a problem if I run
cargo metadata --no-deps, which is what I am going to do. This creates its own problems - it is difficult to determine what package theCargo.tomlactually belongs to, which is silly. Starting with Cargo 1.71 I can use thedefault_workspace_membersfield, but for earlier versions I will probably need some cursed heuristics if I want to keep--no-deps.Besides that, I will only need to run
cargo metadataon workspace members, and all workspace members already have theirCargo.lockgenerated or the build would not proceed. So I could actually afford to run without--no-deps, if I’m willing to take the compilation time hit.