You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a monorepo where we have multiple Rust workspaces, but a shared top-level target directory (with subdirectories for each project).
While testing rust-cache, I found that while it works well if you don't specify each individual project's workspace and target directory under workspaces, it works even better if you do because otherwise it ends up deleting all packages under ~/.cargo/registry.
Specifying each Rust project/workspace on a separate line is the answer, but it is a bit cumbersome when rust-cache does seem to support monorepos by looking for all Cargo.toml files.
After giving it some thought, an option may be to introduce workspace "templates" that allow us to define auto-discovered workspace targets (e.g. {workspace} -> ../target/{workspace}).
I'd be happy to try and contribute such a feature, but wanted to see if there was any interest in this functionality or if there's a better solution.
The text was updated successfully, but these errors were encountered:
I believe if it is useful for you, it might be useful for a wider audience. Though admittedly, I do not fully understand the setup from your description.
However, it would be nice if the workspaces were auto-discovered based on Cargo.toml and a "template" was applied for where the target directory can be found for each workspace. Does that make sense?
I've been trying to think of a simpler, but still general solution, but have been drawing blanks.
We have a monorepo where we have multiple Rust workspaces, but a shared top-level target directory (with subdirectories for each project).
While testing
rust-cache
, I found that while it works well if you don't specify each individual project's workspace and target directory underworkspaces
, it works even better if you do because otherwise it ends up deleting all packages under~/.cargo/registry
.Specifying each Rust project/workspace on a separate line is the answer, but it is a bit cumbersome when
rust-cache
does seem to support monorepos by looking for allCargo.toml
files.After giving it some thought, an option may be to introduce workspace "templates" that allow us to define auto-discovered workspace targets (e.g.
{workspace} -> ../target/{workspace}
).I'd be happy to try and contribute such a feature, but wanted to see if there was any interest in this functionality or if there's a better solution.
The text was updated successfully, but these errors were encountered: