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
Support splicing manifests from multiple Cargo workspaces
When manifests come from different Cargo workspaces (e.g. a primary
workspace depending on crates in a separate external workspace),
splicing previously failed with "manifests are not allowed to come from
different workspaces".
This change:
- Adds `main_manifest` to SplicingManifest so the splicer can
disambiguate which workspace root is primary when multiple are found.
- Nests the spliced workspace at its repo-relative depth inside the temp
dir so that `../` path deps resolve within the temp dir instead of
escaping into unwritable system directories.
- Collects path deps from `[workspace.dependencies]` in addition to
per-package deps.
- Symlinks entire foreign workspace root directories (not just crate
dirs) so Cargo can walk up and resolve `dep.workspace = true`
inherited dependencies.
- Wires `main_manifest` through extensions.bzl and crates_vendor.bzl.
- Calls symlink_external_path_deps from the cargo_tree_resolver so
`cargo tree` also sees external path deps.
This fixes#3089,
along with adding support for multiple workspaces in the splicer.
Co-Authored-By: Steve Barrau <98589981+stevebarrau@users.noreply.github.com>
0 commit comments