Skip to content
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

Merge user and workspace settings #3462

Merged
merged 1 commit into from
May 8, 2024
Merged

Merge user and workspace settings #3462

merged 1 commit into from
May 8, 2024

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 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
43 checks passed
@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
2 participants