Repository navigation
Commit 3efdc31
authored
Fix Cargo hosted workspace redirects (#256)
* Fix Cargo hosted workspace redirects
Resolve inherited dependency aliases through their workspace definitions
and match local lockfile owners by both package name and version. This
allows valid workspace patches while refusing consumers outside the
editable project.
Read quoted dependency values and annotated registry tables consistently
so repeated application cannot leave an alias unpatched or create an
invalid duplicate TOML table.
Validated with 70 Cargo redirect unit tests and real service-backed
hosted, vendored service, and vendored build installs using fresh Cargo
caches, locked offline builds, integrity rejection, and revert.
Assisted-by: Codex:gpt-6-astra
* Refuse incomplete Cargo manifest redirects
Validate planned dependency pins against parsed TOML before writing any
files. Legal root and target dotted or inline declarations that the
source-preserving editor cannot rewrite now refuse the entire patch
instead of leaving a mixture of original and patched sources.
Validate unchanged member manifests too, while preserving workspace
inheritance and declarations for other package versions. Malformed TOML
is refused without changing the project.
Validated with 73 Cargo unit tests and the real converter/API/CLI matrix,
including an actual Cargo build proving the dotted manifest is valid
and remains byte-identical after refusal.
Assisted-by: Codex:gpt-6-astra
* Keep Cargo refusal checks lint-clean
Combine identical refusal branches for dotted dependencies without
changing which declarations are refused. Full workspace Clippy and all
73 Cargo redirect tests pass.
Assisted-by: Codex:gpt-6-astra1 parent 2390c5f commit 3efdc31
1 file changed
Lines changed: 666 additions & 134 deletions
0 commit comments