lu-zero/cargo-c

current package believes it's in a workspace when it's not

Closed this issue · 2 comments

I'm trying to build libavif, and I'm getting an odd error:

  error: current package believes it's in a workspace when it's not:
  current:   …/libavif-rs/target/debug/build/libavif-sys-a47bc2bce78bda23/out/build/_deps/cargoc-src/Cargo.toml
  workspace: …/libavif-rs/Cargo.toml

This build system sandwitch seems to be downloading cargo-c:

https://github.com/AOMediaCodec/libavif/blob/main/cmake/Modules/LocalRav1e.cmake

which doesn't play nice when this directory is inside another workspace's target/

Maybe it'd help if cargo-c included an empty [workspace] section in its Cargo.toml?

I can add one if it helps,

Can you please first confirm that's enough to make that contraption happy? :)