Commit 41f7888
committed
Auto merge of #11936 - ehuss:uncanonicalized-path-prefix, r=arlosi
Don't query permutations of the path prefix.
This fixes the use of the `UncanonicalizedIter` to not create permutations that are not valid paths if the crate has a dash or underscore in the first four characters of the name.
Previously it was permuting the path in the prefix, creating invalid paths. For example, `my-tool` would create a path like `my/_t/my-tool` which isn't valid since the filename doesn't match the prefix directories.
This fixes it so that it permutes just the name, and then generates the index path *after* permuting it.
The test included here goes from 16 queries to just 4 queries.
Fixes #11935File tree
3 files changed
+92
-14
lines changed- crates/cargo-test-support/src
- src/cargo/sources/registry
- tests/testsuite
3 files changed
+92
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
| |||
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
100 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
101 | 105 | | |
102 | 106 | | |
103 | 107 | | |
| |||
149 | 153 | | |
150 | 154 | | |
151 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
152 | 163 | | |
153 | 164 | | |
154 | 165 | | |
| |||
159 | 170 | | |
160 | 171 | | |
161 | 172 | | |
| 173 | + | |
162 | 174 | | |
163 | 175 | | |
164 | 176 | | |
| |||
175 | 187 | | |
176 | 188 | | |
177 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
178 | 199 | | |
179 | 200 | | |
180 | 201 | | |
| |||
276 | 297 | | |
277 | 298 | | |
278 | 299 | | |
| 300 | + | |
279 | 301 | | |
280 | 302 | | |
281 | 303 | | |
| |||
602 | 624 | | |
603 | 625 | | |
604 | 626 | | |
605 | | - | |
| 627 | + | |
| 628 | + | |
606 | 629 | | |
607 | 630 | | |
608 | 631 | | |
| |||
622 | 645 | | |
623 | 646 | | |
624 | 647 | | |
625 | | - | |
| 648 | + | |
| 649 | + | |
626 | 650 | | |
627 | 651 | | |
628 | 652 | | |
| |||
635 | 659 | | |
636 | 660 | | |
637 | 661 | | |
638 | | - | |
| 662 | + | |
| 663 | + | |
639 | 664 | | |
640 | 665 | | |
641 | 666 | | |
| |||
928 | 953 | | |
929 | 954 | | |
930 | 955 | | |
931 | | - | |
932 | | - | |
933 | | - | |
934 | | - | |
935 | | - | |
936 | | - | |
| 956 | + | |
| 957 | + | |
937 | 958 | | |
938 | 959 | | |
939 | 960 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
364 | 363 | | |
365 | 364 | | |
366 | 365 | | |
367 | | - | |
| 366 | + | |
368 | 367 | | |
369 | 368 | | |
370 | 369 | | |
371 | | - | |
| 370 | + | |
| 371 | + | |
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
3135 | 3135 | | |
3136 | 3136 | | |
3137 | 3137 | | |
| 3138 | + | |
| 3139 | + | |
| 3140 | + | |
| 3141 | + | |
| 3142 | + | |
| 3143 | + | |
| 3144 | + | |
| 3145 | + | |
| 3146 | + | |
| 3147 | + | |
| 3148 | + | |
| 3149 | + | |
| 3150 | + | |
| 3151 | + | |
| 3152 | + | |
| 3153 | + | |
| 3154 | + | |
| 3155 | + | |
| 3156 | + | |
| 3157 | + | |
| 3158 | + | |
| 3159 | + | |
| 3160 | + | |
| 3161 | + | |
| 3162 | + | |
| 3163 | + | |
| 3164 | + | |
| 3165 | + | |
| 3166 | + | |
| 3167 | + | |
| 3168 | + | |
| 3169 | + | |
| 3170 | + | |
| 3171 | + | |
| 3172 | + | |
| 3173 | + | |
| 3174 | + | |
| 3175 | + | |
| 3176 | + | |
| 3177 | + | |
| 3178 | + | |
| 3179 | + | |
| 3180 | + | |
| 3181 | + | |
| 3182 | + | |
| 3183 | + | |
| 3184 | + | |
| 3185 | + | |
| 3186 | + | |
| 3187 | + | |
| 3188 | + | |
| 3189 | + | |
| 3190 | + | |
| 3191 | + | |
| 3192 | + | |
| 3193 | + | |
| 3194 | + | |
0 commit comments