Commit 7573248
authored
Warn when installing with a non-default toolchain (#16131)
This PR implements the cargo changes for #11036. The rustup changes were
implemented in rust-lang/rustup#4518.
The PR is currently organized as four commits:
- The first expands the rustup tests to set `RUSTUP_TOOLCHAIN_SOURCE`.
This change is not strictly necessary, but it improves the rustup tests'
fidelity.
- The second moves the `pkg` function to a location where the next
commit can use it.
- The third implements a test to check the fourth commit's fix.
- The fourth warns when `cargo install` is invoked with a non-default
toolchain, as indicated by `RUSTUP_TOOLCHAIN_SOURCE`.
In the third commit, two significant changes were made to
`simulated_rustup_environment`:
- Previously, the constructed proxy would call an always-panicking
executable whenever it was asked to run cargo. Now, the proxy can be
made to run the cargo under test.
- The proxy can now be made to set additional environment variables
(e.g., `RUSTUP_TOOLCHAIN_SOURCE`) before calling the proxied tool.
The PR is currently marked as draft because
rust-lang/rustup#4518 has not yet been released.
Technically, this PR could be merged before then. But testing it with a
fixed rustup would seem to make sense.
Nits are welcome.
cc: @epage2 files changed
+381
-59
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
42 | 80 | | |
43 | 81 | | |
44 | 82 | | |
| |||
309 | 347 | | |
310 | 348 | | |
311 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
312 | 375 | | |
313 | 376 | | |
314 | 377 | | |
| |||
604 | 667 | | |
605 | 668 | | |
606 | 669 | | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
607 | 684 | | |
608 | 685 | | |
609 | 686 | | |
| |||
0 commit comments