-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(config): When merging, replace rather than combining specific configuration keys #15066
Conversation
When we talked about this in the Cargo team meeting (2025-01-07), we were ok with this so long as we felt there was a proper way of fixing this later. One idea to do that was to delay merging until access. We're unsure how difficult that would be to implement. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rebase on latest master and resolve the conflict?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
We discussed the concerns about potentially breaking behavior, since it is feasible someone is relying on something like runner
concatenating arguments. Our perspective is that this fixes behavior that we weren't expecting, and brings it in line with how env merging works. We decided that we will monitor for any issues that get raised in nightly or beta, and consider backing it out. We'll make sure that the release notes for stable have a notice about this change.
Update cargo 5 commits in 045bf21b36a2e1f3ed85e38278d1c3cc4305e134..cecde95c119a456c30e57d3e4b31fff5a7d83df4 2025-01-17 14:59:36 +0000 to 2025-01-24 17:15:24 +0000 - Remove unused `-C link-arg=-fuse-ld=lld` (rust-lang/cargo#15097) - Remove `unsafe` by using `LazyLock` (rust-lang/cargo#15096) - Print globs when workspace members can't be found (rust-lang/cargo#15093) - Make --allow-dirty imply --allow-staged (rust-lang/cargo#15013) - fix(config): When merging, replace rather than combining specific configuration keys (rust-lang/cargo#15066)
Update cargo 5 commits in 045bf21b36a2e1f3ed85e38278d1c3cc4305e134..cecde95c119a456c30e57d3e4b31fff5a7d83df4 2025-01-17 14:59:36 +0000 to 2025-01-24 17:15:24 +0000 - Remove unused `-C link-arg=-fuse-ld=lld` (rust-lang/cargo#15097) - Remove `unsafe` by using `LazyLock` (rust-lang/cargo#15096) - Print globs when workspace members can't be found (rust-lang/cargo#15093) - Make --allow-dirty imply --allow-staged (rust-lang/cargo#15013) - fix(config): When merging, replace rather than combining specific configuration keys (rust-lang/cargo#15066)
Update cargo 5 commits in 045bf21b36a2e1f3ed85e38278d1c3cc4305e134..cecde95c119a456c30e57d3e4b31fff5a7d83df4 2025-01-17 14:59:36 +0000 to 2025-01-24 17:15:24 +0000 - Remove unused `-C link-arg=-fuse-ld=lld` (rust-lang/cargo#15097) - Remove `unsafe` by using `LazyLock` (rust-lang/cargo#15096) - Print globs when workspace members can't be found (rust-lang/cargo#15093) - Make --allow-dirty imply --allow-staged (rust-lang/cargo#15013) - fix(config): When merging, replace rather than combining specific configuration keys (rust-lang/cargo#15066)
In general, Cargo merges lists in configuration by concatenating them. However, sometimes the lists don't make sense for merging, such as a program and its arguments. We had the
UnmergedStringList
type that handled this case for merging environment variables, but it did not work for multiple configs.UnmergedStringList
type, which only worked for preventing merging of environment variables with configuration.is_nonmergable_list
which hard-codes which configuration keys contain lists that should not be merged.Fixes #14906