cargo chef prepare always looks at dev dependencies, but those may not be relevant if building in release mode
cargo chef prepare is failing for me because it's looking for a dev dependency it can't find during a Docker build. Since I am going to build in release mode, looking for dev dependencies seems unnecessary.
I can work around it, but it would be nice if cargo chef prepare had a --release flag corresponding to cargo chef cook --release which just skipped any dev dependencies.
The release profile is an orthogonal concept to development dependencies - e.g. you can build your test using the --release flag.
We could enhance cargo-chef to determine if tests are included in the target and ignore dev-dependencies accordingly.
Ah, right. Anyway as I said, this isn't actually something I need, but it seems useful. And it might speed up builds? So seems like a nice to have at least.
This feature would be very helpful if a project has a dev-dependency on the migrations directory due to the use of sqlx or seaorm.