Commit 25d7318
committed
feat(config-include): support inline and array of tables
Both are now supported
```
include = ['simple.toml', { path = 'other.toml' }]
```
```
[[include]]
path = 'first.toml'
[[include]]
path = 'second.toml'
```
So in the future we can extend field like `optional` or `if`
in the include table
On the implementation side,
`ConfigInclude` intentionally doesn't derive serde deserialization
to avoid any misuse of `GlobalContext::get::<ConfigInclude>()`,
which might lead to wrong config loading order.1 parent 2531164 commit 25d7318
File tree
2 files changed
+32
-34
lines changed- src/cargo/util/context
- tests/testsuite
2 files changed
+32
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1400 | 1400 | | |
1401 | 1401 | | |
1402 | 1402 | | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
1403 | 1415 | | |
1404 | | - | |
| 1416 | + | |
1405 | 1417 | | |
1406 | 1418 | | |
1407 | 1419 | | |
| |||
2473 | 2485 | | |
2474 | 2486 | | |
2475 | 2487 | | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
2476 | 2493 | | |
2477 | 2494 | | |
2478 | 2495 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
523 | | - | |
524 | 523 | | |
525 | 524 | | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
536 | 530 | | |
537 | 531 | | |
538 | 532 | | |
| |||
565 | 559 | | |
566 | 560 | | |
567 | 561 | | |
568 | | - | |
569 | 562 | | |
570 | 563 | | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
581 | 569 | | |
582 | 570 | | |
583 | 571 | | |
| |||
603 | 591 | | |
604 | 592 | | |
605 | 593 | | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
616 | 597 | | |
617 | 598 | | |
618 | 599 | | |
| |||
636 | 617 | | |
637 | 618 | | |
638 | 619 | | |
639 | | - | |
| 620 | + | |
640 | 621 | | |
641 | 622 | | |
642 | 623 | | |
0 commit comments