Repository navigation
Commit 027d881
* Start fix for #1104
Assisted-by: Claude Code:claude-opus-5-5
* Vendor pip marker splits across -r includes
A project that keeps a version-specific pin in a separate requirements
file, e.g. `six==1.16.0 ; python_version < "3.12"` in requirements.txt
and `six==1.17.0 ; python_version >= "3.12"` in an included base.txt,
could not vendor a patch for that package: the run exited 1 with a
false "six is not pinned to ==1.16.0", and a fresh install stayed
unpatched.
pip merges the root file and its -r includes into one requirement set,
but the marker-branch check from #928 was made one file at a time, so
the file holding only the other version's branch looked ambiguous.
Make that decision once over the whole include tree. The vendored
branch is rewritten where it lives and the other branch is left alone;
an unmarked target pin, or no target pin at all, still refuses.
Fixes #1104
Assisted-by: Claude Code:claude-opus-5-5
* Test pip marker split across includes end to end
Vendor a six marker split whose branches sit in different files of the
-r tree, in both layouts, then install the result with pip --no-index
in a fresh checkout and check the patched module is imported, and that
revert restores both files byte for byte.
Refs #1104
Assisted-by: Claude Code:claude-opus-5-5
* Explain refused marker splits across -r files
When a requirements tree pins another version of a package on its own
environment-marker branch but the patched version's pin has no marker
(or there is none), vendoring refuses because pip may install either
version. The error used to say the package "is not pinned", which
reads as false when an exact pin is right there in another file. It
now says that the other version's marker branch needs a marker-branch
pin of the patched version beside it.
The per-file refusal order now lives in one helper shared by planning
and its tests, and the end-to-end test also checks VEX when the vendor
line lands in an include.
Refs #1104
Assisted-by: Claude Code:claude-opus-5-5
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 97cfdbf commit 027d881
2 files changed
Lines changed: 348 additions & 38 deletions
File tree
- crates
- socket-patch-cli/tests
- socket-patch-core/src/vendor
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
92 | 105 | | |
93 | 106 | | |
94 | 107 | | |
| |||
101 | 114 | | |
102 | 115 | | |
103 | 116 | | |
104 | | - | |
| 117 | + | |
105 | 118 | | |
106 | 119 | | |
107 | 120 | | |
| |||
1874 | 1887 | | |
1875 | 1888 | | |
1876 | 1889 | | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
| 1950 | + | |
| 1951 | + | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
1877 | 2002 | | |
1878 | 2003 | | |
1879 | 2004 | | |
| |||
0 commit comments