pc_app and psp_app are binaries while the root crate and embedded_frontend are libraries (both imported by the binary crates).
Cargo.toml workspace:
[workspace]
members = ["pc_app", "embedded_frontend", "psp_app"]
Problem
When trying to compile the PSP app from the psp_app directory with __CARGO_TESTS_ONLY_SRC_ROOT=/path/to/rust/src/ cargo +nightly-2022-06-11 psp --release, I get the error:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', cargo-psp/src/fix_imports.rs:27:42
Editing the cargo-psp source to add dbg!(&path.as_ref()); before the panic shows this: [cargo-psp/src/fix_imports.rs:27] &path.as_ref() = "[my workspace path]/target/mipsel-sony-psp/release/pc_app". But the PC app obviously can't be compiled for the PSP, and even if it was, it's not what I'm trying to build here.
In the meantime, I can exclude psp_app from the workspace but this breaks rust-analyzer on psp_app's source files.
I could make a pull request so that cargo-psp doesn't panic if a binary isn't present.
Context
I have a workspace set up like this:
pc_app and psp_app are binaries while the root crate and embedded_frontend are libraries (both imported by the binary crates).
Cargo.toml workspace:
Problem
When trying to compile the PSP app from the psp_app directory with
__CARGO_TESTS_ONLY_SRC_ROOT=/path/to/rust/src/ cargo +nightly-2022-06-11 psp --release
, I get the error:Editing the cargo-psp source to add
dbg!(&path.as_ref());
before the panic shows this:[cargo-psp/src/fix_imports.rs:27] &path.as_ref() = "[my workspace path]/target/mipsel-sony-psp/release/pc_app"
. But the PC app obviously can't be compiled for the PSP, and even if it was, it's not what I'm trying to build here.In the meantime, I can exclude psp_app from the workspace but this breaks rust-analyzer on psp_app's source files.
I could make a pull request so that cargo-psp doesn't panic if a binary isn't present.