rules_rust icon indicating copy to clipboard operation
rules_rust copied to clipboard

Fix: Handle package.workspace key in child Cargo.toml

Open Synss opened this issue 7 months ago • 1 comments

Setting the package.workspace key in child workspace fails splicing with an error similar to

Found manifest at /home/mlaurin/src/check_mk.git/packages/site/check-http/Cargo.toml which is a member of the workspace at
/home/mlaurin/src/check_mk.git/packages/site/check-http/.. which isn't included in the crates_universe

Now, the key is valid in Cargo.toml when the code is organized in workspaces. It is even required for out-of-tree workspaces. See https://github.com/nox/rust-rfcs/blob/master/text/1525-cargo-workspace.md

Before December, the key was ignored but would not fail splicing. The regression is most likely due to changes related to https://github.com/bazelbuild/rules_rust/issues/3090

Synss avatar May 15 '25 08:05 Synss

@UebelAndre: I've addressed your previous comments. This PR is ready for round 2.

Synss avatar Jun 03 '25 15:06 Synss

@UebelAndre: I've based the handling of out-of-tree cargo workspaces on my previous PR and updated the title. The last commit of the chain adds a cargo_workspace_oot example.

Synss avatar Jun 20 '25 05:06 Synss