Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented May 8, 2024

Summary

This PR follows Cargo's strategy for merging configuration, albeit in a more limited way (we don't support as many configuration locations). Specifically, we merge the user configuration with the workspace configuration if both are present. The workspace configuration has priority, such that we take values from the workspace configuration and ignore those in the user configuration if both are specified for a given setting -- with the exception of arrays and maps, which are concatenated.

For now, if a user provides a configuration file with --config-file, we don't merge in the user settings.

See: https://doc.rust-lang.org/cargo/reference/config.html#hierarchical-structure.

Closes #3420.

@charliermarsh charliermarsh added the configuration Settings and such label May 8, 2024
@charliermarsh charliermarsh force-pushed the charlie/merge branch 2 times, most recently from e7b3db6 to f5862c4 Compare May 8, 2024 16:56
@charliermarsh charliermarsh requested review from konstin and zanieb May 8, 2024 16:56
@charliermarsh charliermarsh force-pushed the charlie/merge branch 2 times, most recently from 06cfd5a to 5028eff Compare May 8, 2024 17:09
@charliermarsh charliermarsh merged commit 1aa8ff8 into main May 8, 2024
@charliermarsh charliermarsh deleted the charlie/merge branch May 8, 2024 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

configuration Settings and such

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configuration files should be merged hierarchically

3 participants