Our private enterprise project “imeka” has about 40 binaries and the core lib is not really huge. It was starting to be a pain to work with, mostly because of RSL and the build time. The build time is perfect when we modify something outside the lib (bin, bench, test), but RLS insists on checking all binaries, each time, wathever I change.
All this to say that I tried using workspace in my project. I kept the most used part of my lib in “core” and all subprojects depend on “core”. In short, it’s a star pattern. RLS is now much more fun to use! And it’s building fast enough except when working on “core”, which is normal. However, I have two problems now:
I have some tests in
core/tests/*.rs(so, outside the lib). When I modify one,
cargo testrecompiles “core” and all subprojects. This makes no sense to me. How could an outside test have any impact on the subprojects?
cargo testwas automatic on a non-workspace project. Afaik, this is a bug.
Most of the time I build from
imeka/and everything goes well. I compiled from a subproject yesterday and I suddenly had a missing dependency. cargo probably does a sum of dependencies before building the whole project, so my subprojects can use the dependencies of the other projects. However, it can’t do so when working on a subproject. Is there a way to ensure that all projects in my workspace have their dependencies? Imo, it shouldn’t even compile otherwise.