Commit 7b13469
committed
Auto merge of #6772 - Aaron1011:feature/final-pub-priv, r=ehuss
Implement the 'frontend' of public-private dependencies
This is part of rust-lang/rust#44663
This implements the 'frontend' portion of [RFC 1977](https://github.com/rust-lang/rfcs/blob/master/text/1977-public-private-dependencies.md). Once PRs rust-lang/rust#59335 and rust-lang/crates.io#1685 are merged,
it will be possible to test the full public-private dependency feature:
marking a dependency a public, seeing exported_private_dependencies
warnings from rustc, and seeing pub-dep-reachability errors from Cargo.
Everything in this commit should be fully backwards-compatible - users
who don't enable the 'public-dependency' cargo feature won't notice any
changes.
Note that this commit does *not* implement the remaining two features of
the RFC:
* Choosing smallest versions when 'cargo publish' is run
* Turning exported_private_dependencies warnings into hard errors when 'cargo publish' is run
The former is a major change to Cargo's behavior, and should be done in a separate PR with some kind of rollout plan.
The latter is described by the RFC as being enabled at 'some point in the future'. This can be done via a follow-up PR.File tree
15 files changed
+335
-15
lines changed- src
- cargo
- core
- compiler
- build_context
- resolver
- ops
- sources/registry
- util/toml
- doc/src/reference
- tests/testsuite
- support
15 files changed
+335
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
96 | 101 | | |
97 | 102 | | |
98 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| 318 | + | |
318 | 319 | | |
319 | 320 | | |
320 | 321 | | |
321 | 322 | | |
322 | 323 | | |
| 324 | + | |
323 | 325 | | |
324 | 326 | | |
325 | 327 | | |
| |||
420 | 422 | | |
421 | 423 | | |
422 | 424 | | |
423 | | - | |
| 425 | + | |
424 | 426 | | |
425 | 427 | | |
426 | 428 | | |
| |||
429 | 431 | | |
430 | 432 | | |
431 | 433 | | |
432 | | - | |
| 434 | + | |
433 | 435 | | |
434 | 436 | | |
435 | 437 | | |
| 438 | + | |
436 | 439 | | |
437 | 440 | | |
438 | 441 | | |
| |||
845 | 848 | | |
846 | 849 | | |
847 | 850 | | |
| 851 | + | |
848 | 852 | | |
849 | 853 | | |
850 | 854 | | |
851 | 855 | | |
852 | 856 | | |
| 857 | + | |
853 | 858 | | |
854 | 859 | | |
855 | 860 | | |
| |||
895 | 900 | | |
896 | 901 | | |
897 | 902 | | |
| 903 | + | |
898 | 904 | | |
899 | 905 | | |
900 | 906 | | |
| |||
915 | 921 | | |
916 | 922 | | |
917 | 923 | | |
| 924 | + | |
918 | 925 | | |
919 | 926 | | |
920 | 927 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
966 | 967 | | |
967 | 968 | | |
968 | 969 | | |
| 970 | + | |
| 971 | + | |
969 | 972 | | |
970 | 973 | | |
971 | 974 | | |
972 | 975 | | |
973 | 976 | | |
974 | | - | |
| 977 | + | |
975 | 978 | | |
976 | 979 | | |
977 | 980 | | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
978 | 988 | | |
979 | 989 | | |
980 | 990 | | |
981 | 991 | | |
982 | 992 | | |
983 | 993 | | |
984 | 994 | | |
| 995 | + | |
985 | 996 | | |
986 | 997 | | |
987 | 998 | | |
| |||
995 | 1006 | | |
996 | 1007 | | |
997 | 1008 | | |
998 | | - | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
999 | 1020 | | |
1000 | 1021 | | |
1001 | 1022 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
304 | 308 | | |
305 | 309 | | |
306 | 310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
202 | 205 | | |
203 | 206 | | |
204 | 207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
44 | 62 | | |
45 | 63 | | |
46 | 64 | | |
| |||
50 | 68 | | |
51 | 69 | | |
52 | 70 | | |
| 71 | + | |
53 | 72 | | |
54 | 73 | | |
55 | 74 | | |
| |||
197 | 216 | | |
198 | 217 | | |
199 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
200 | 225 | | |
201 | 226 | | |
202 | 227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
540 | 541 | | |
541 | 542 | | |
542 | 543 | | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
543 | 551 | | |
544 | 552 | | |
545 | 553 | | |
546 | 554 | | |
547 | 555 | | |
548 | 556 | | |
549 | 557 | | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
| 558 | + | |
554 | 559 | | |
555 | 560 | | |
556 | 561 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
590 | 591 | | |
591 | 592 | | |
592 | 593 | | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
593 | 602 | | |
594 | 603 | | |
595 | 604 | | |
| |||
604 | 613 | | |
605 | 614 | | |
606 | 615 | | |
607 | | - | |
| 616 | + | |
608 | 617 | | |
609 | 618 | | |
610 | 619 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
331 | 332 | | |
332 | 333 | | |
333 | 334 | | |
334 | | - | |
| 335 | + | |
335 | 336 | | |
336 | 337 | | |
337 | 338 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| 288 | + | |
288 | 289 | | |
289 | 290 | | |
290 | 291 | | |
| |||
300 | 301 | | |
301 | 302 | | |
302 | 303 | | |
| 304 | + | |
303 | 305 | | |
304 | 306 | | |
305 | 307 | | |
| |||
324 | 326 | | |
325 | 327 | | |
326 | 328 | | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
327 | 332 | | |
328 | 333 | | |
329 | 334 | | |
| |||
341 | 346 | | |
342 | 347 | | |
343 | 348 | | |
344 | | - | |
| 349 | + | |
| 350 | + | |
345 | 351 | | |
346 | 352 | | |
347 | 353 | | |
| |||
0 commit comments