Problem
cargo locate-project --workspace loads all the workspace instead of just returning the path of the workspace root.
Steps
cargo locate-project --workspace
Possible Solution(s)
Instead of doing
src/bin/cargo/commands/locate_project.rs
WhatToFind::Workspace => {
workspace = args.workspace(gctx)?;
workspace.root_manifest()
}
I think that
WhatToFind::Workspace => {
let root = args.root_manifest(gctx)?;
let mut ws = Workspace::new_default(root.to_path_buf(), gctx);
ws.target_dir = gctx.target_dir()?;
ws.find_root(manifest_path)?
}
or something like that would be better. Because when in a big workspace with a lot of members in a workspace, it will load some unused data.
Problem
cargo locate-project --workspaceloads all the workspace instead of just returning the path of the workspace root.Steps
cargo locate-project --workspacePossible Solution(s)
Instead of doing
src/bin/cargo/commands/locate_project.rsI think that
or something like that would be better. Because when in a big workspace with a lot of members in a workspace, it will load some unused data.