Commit 5030f23
Clarify warning for using
When attempting to substitute a local version of a dependency, since the
`patch` section uses syntax similar to a dependency (and the
documentation even says "The syntax is similar to the `[dependencies]`
section", it's natural to assume that other things from `[dependencies]`
also work, such as `features` or `default-features`. Attempting to use
them produces this warning:
> patch for `crate-name-here` uses the features mechanism.
> default-features and features will not take effect because the patch dependency does not support this mechanism
The phrasing "the patch dependency does not support this mechanism"
makes it seem at first glance like `patch` just doesn't support this at
all. But the actual problem is that the user needs to move the
`features`/`default-features` keys to an entry in `dependencies`
instead.
Modify the message, to make this more obvious.
Modify the corresponding warning for `replace` as well.
Update tests accordingly.features or default-features in patch
1 parent 6d221ef commit 5030f23
File tree
4 files changed
+71
-31
lines changed- src/cargo
- core
- ops
- tests/testsuite
4 files changed
+71
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
387 | 399 | | |
388 | 400 | | |
389 | 401 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
220 | 230 | | |
221 | 231 | | |
222 | 232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
928 | 928 | | |
929 | 929 | | |
930 | 930 | | |
931 | | - | |
932 | | - | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
933 | 935 | | |
934 | 936 | | |
935 | 937 | | |
936 | 938 | | |
937 | 939 | | |
938 | 940 | | |
939 | | - | |
940 | | - | |
941 | | - | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
942 | 947 | | |
943 | 948 | | |
944 | | - | |
| 949 | + | |
| 950 | + | |
945 | 951 | | |
946 | 952 | | |
947 | 953 | | |
| |||
970 | 976 | | |
971 | 977 | | |
972 | 978 | | |
973 | | - | |
974 | | - | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
975 | 983 | | |
976 | 984 | | |
977 | 985 | | |
978 | 986 | | |
979 | 987 | | |
980 | 988 | | |
981 | | - | |
982 | | - | |
983 | | - | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
984 | 995 | | |
985 | 996 | | |
986 | | - | |
| 997 | + | |
| 998 | + | |
987 | 999 | | |
988 | 1000 | | |
989 | 1001 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
96 | | - | |
| 97 | + | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
101 | | - | |
| 103 | + | |
| 104 | + | |
102 | 105 | | |
103 | 106 | | |
104 | 107 | | |
| |||
136 | 139 | | |
137 | 140 | | |
138 | 141 | | |
139 | | - | |
| 142 | + | |
| 143 | + | |
140 | 144 | | |
141 | 145 | | |
142 | 146 | | |
143 | | - | |
| 147 | + | |
| 148 | + | |
144 | 149 | | |
145 | 150 | | |
146 | 151 | | |
147 | 152 | | |
148 | | - | |
| 153 | + | |
| 154 | + | |
149 | 155 | | |
150 | 156 | | |
151 | 157 | | |
| |||
0 commit comments