Commit d58031b
authored
fix: non-mergeable list from config cli merge the same way (#16219)
### What does this PR try to resolve?
Before we iterated key values directly for config cli values,
so top level table name of config key is never tracked.
And that resulted in
`registries.example.credential-provider` becoming
`example.credential-provider`,
making `is_nonmergable_list` return false.
This fix replaces the manual traversal
with a direct `ConfigValue::merge` call.
Now we unify how config values merge, regardless theird sources.
Fixes #16209
### How to test and review this PR?
There are some slight diagnostic regressions[^1].
I may try addressing them once later.
[^1]: Well, in `cli_merge_failed` test, the old one wasn't much better.
It knew the failure was from `--config` CLI but didn't say anything
about the actual `include`'d file. You need to look at the deeper cause
and associate them together.File tree
3 files changed
+47
-26
lines changed- src/cargo/util/context
- tests/testsuite
3 files changed
+47
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1286 | 1286 | | |
1287 | 1287 | | |
1288 | 1288 | | |
1289 | | - | |
1290 | | - | |
1291 | | - | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
1292 | 1292 | | |
1293 | 1293 | | |
1294 | 1294 | | |
| |||
1546 | 1546 | | |
1547 | 1547 | | |
1548 | 1548 | | |
1549 | | - | |
1550 | | - | |
1551 | | - | |
1552 | | - | |
1553 | | - | |
1554 | | - | |
1555 | | - | |
1556 | | - | |
1557 | | - | |
1558 | | - | |
1559 | | - | |
1560 | | - | |
1561 | | - | |
1562 | | - | |
1563 | | - | |
1564 | | - | |
1565 | | - | |
1566 | | - | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
1567 | 1561 | | |
1568 | 1562 | | |
1569 | 1563 | | |
| |||
1710 | 1704 | | |
1711 | 1705 | | |
1712 | 1706 | | |
1713 | | - | |
1714 | | - | |
1715 | | - | |
| 1707 | + | |
1716 | 1708 | | |
1717 | 1709 | | |
1718 | 1710 | | |
| |||
2299 | 2291 | | |
2300 | 2292 | | |
2301 | 2293 | | |
| 2294 | + | |
| 2295 | + | |
| 2296 | + | |
| 2297 | + | |
| 2298 | + | |
| 2299 | + | |
| 2300 | + | |
| 2301 | + | |
| 2302 | + | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
| 2306 | + | |
| 2307 | + | |
2302 | 2308 | | |
2303 | 2309 | | |
2304 | 2310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
652 | 652 | | |
653 | 653 | | |
654 | 654 | | |
655 | | - | |
| 655 | + | |
656 | 656 | | |
657 | 657 | | |
658 | 658 | | |
| |||
2209 | 2209 | | |
2210 | 2210 | | |
2211 | 2211 | | |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
| 2215 | + | |
| 2216 | + | |
| 2217 | + | |
| 2218 | + | |
| 2219 | + | |
| 2220 | + | |
| 2221 | + | |
| 2222 | + | |
| 2223 | + | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
2212 | 2227 | | |
2213 | 2228 | | |
2214 | 2229 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
462 | | - | |
| 462 | + | |
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
| |||
0 commit comments