Repository navigation
Commit 92ad228
fix(redirect): refuse a lockless cargo pin
A `registry = …` pin reaches only the declarations it sits on, so a
crate another package also pulls in is refused — but that check reads
Cargo.lock, and a project without one was pinned unconditionally. Rust
libraries routinely gitignore their lock, so the silent shape was the
common one: the scan reported the crate redirected, vex attested it,
and the next build resolved the patched copy for the root and an
unpatched crates.io copy for whatever else depends on the crate.
Without a lock the dependents question is now answered from the
manifests instead: a crate declared beside any other dependency — or
beside a workspace member this run could not read (a members glob, or
a member outside the project or behind a symbolic link) — is refused
`redirect_cargo_lockless_dependents`, whose detail names both remedies.
A path dependency on a manifest the same run pins is not company, and
a project whose only dependency is the patched crate has nothing that
could pull it in and still redirects.
Real cargo: e2e_redirect_cargo_shapes lockless-other-dependencies, the
direct-and-transitive project with its lock deleted.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent cc04e0f commit 92ad228
10 files changed
Lines changed: 379 additions & 13 deletions
File tree
- crates
- socket-patch-cli
- tests
- socket-patch-core
- src/patch/redirect
- tests/fixtures
- redirect/cargo/cargo/lockless-dependents
- input
- vex-discover-golden
- docs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
984 | 984 | | |
985 | 985 | | |
986 | 986 | | |
987 | | - | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
988 | 995 | | |
989 | 996 | | |
990 | 997 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
91 | 94 | | |
92 | 95 | | |
93 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
| |||
416 | 422 | | |
417 | 423 | | |
418 | 424 | | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
419 | 428 | | |
420 | 429 | | |
421 | 430 | | |
| |||
488 | 497 | | |
489 | 498 | | |
490 | 499 | | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
498 | 509 | | |
499 | 510 | | |
500 | 511 | | |
| |||
713 | 724 | | |
714 | 725 | | |
715 | 726 | | |
| 727 | + | |
716 | 728 | | |
717 | 729 | | |
718 | 730 | | |
| |||
735 | 747 | | |
736 | 748 | | |
737 | 749 | | |
| 750 | + | |
738 | 751 | | |
739 | 752 | | |
740 | 753 | | |
| |||
770 | 783 | | |
771 | 784 | | |
772 | 785 | | |
| 786 | + | |
773 | 787 | | |
774 | 788 | | |
775 | 789 | | |
| |||
802 | 816 | | |
803 | 817 | | |
804 | 818 | | |
| 819 | + | |
805 | 820 | | |
806 | 821 | | |
807 | 822 | | |
| |||
840 | 855 | | |
841 | 856 | | |
842 | 857 | | |
| 858 | + | |
843 | 859 | | |
844 | 860 | | |
845 | 861 | | |
| |||
861 | 877 | | |
862 | 878 | | |
863 | 879 | | |
| 880 | + | |
864 | 881 | | |
865 | 882 | | |
866 | 883 | | |
| |||
885 | 902 | | |
886 | 903 | | |
887 | 904 | | |
| 905 | + | |
888 | 906 | | |
889 | 907 | | |
890 | 908 | | |
891 | 909 | | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
0 commit comments