Commit bc577dc
authored
fix(run): Disambiguate bins from different packages that share a name (#15298)
### What does this PR try to resolve?
This builds on the work done in #15199 to improve target selection
errors to also disambiguate when the same binary name is used in
multiple packages.
This also makes the errors from #15199 more consistent with the rustc
style guide and reduces code duplication.
Fixes #13312
### How should we test and review this PR?
This is a first pass and does not do the full `--package foo --bin bar`
syntax. I wanted to focus on the basic functionality before we iterated
on it, e.g. investigating how well we can predict the CLI flags, how
much noise they might add, etc.
### Additional informationFile tree
6 files changed
+297
-216
lines changed- src/cargo/ops
- cargo_compile
- tests/testsuite
6 files changed
+297
-216
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
272 | 276 | | |
273 | | - | |
274 | | - | |
| 277 | + | |
275 | 278 | | |
276 | | - | |
| 279 | + | |
277 | 280 | | |
278 | 281 | | |
279 | | - | |
| 282 | + | |
280 | 283 | | |
281 | 284 | | |
282 | 285 | | |
283 | 286 | | |
284 | 287 | | |
285 | 288 | | |
286 | 289 | | |
287 | | - | |
| 290 | + | |
288 | 291 | | |
289 | 292 | | |
290 | 293 | | |
291 | 294 | | |
292 | | - | |
| 295 | + | |
293 | 296 | | |
294 | 297 | | |
295 | 298 | | |
| |||
305 | 308 | | |
306 | 309 | | |
307 | 310 | | |
| 311 | + | |
| 312 | + | |
308 | 313 | | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
335 | 330 | | |
336 | 331 | | |
337 | 332 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
72 | | - | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
76 | 87 | | |
77 | 88 | | |
78 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1337 | 1337 | | |
1338 | 1338 | | |
1339 | 1339 | | |
1340 | | - | |
1341 | | - | |
| 1340 | + | |
| 1341 | + | |
1342 | 1342 | | |
1343 | 1343 | | |
1344 | | - | |
1345 | 1344 | | |
1346 | 1345 | | |
1347 | 1346 | | |
| |||
1358 | 1357 | | |
1359 | 1358 | | |
1360 | 1359 | | |
1361 | | - | |
1362 | | - | |
| 1360 | + | |
| 1361 | + | |
1363 | 1362 | | |
1364 | 1363 | | |
1365 | | - | |
1366 | 1364 | | |
1367 | 1365 | | |
1368 | 1366 | | |
| |||
0 commit comments