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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "turn keys to lowercase to enable cross overrides" #543

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matthiasbeyer
Copy link
Collaborator

@matthiasbeyer matthiasbeyer commented Mar 7, 2024

This reverts commit d2ee90e.

I am not 100% sure about this, but this might solve #531

@max-m @jpmckinney @vladgon can you test this change? CI fails for now but I am not entirely sure whether CI is right at this point 馃槅 馃槗

@matthiasbeyer
Copy link
Collaborator Author

Either way, tests are missing for this... so I'll mark this as help-wanted.

@max-m
Copy link

max-m commented Mar 11, 2024

Hi, sorry for the delay.
I did a quick test (loading my config and printing it).

Base case:
config = { version = "0.13.4", default-features = false, features = [ "toml" ] }
Uppercase keys are uppercase. 馃憤

Latest upstream version:
config = { version = "0.14", default-features = false, features = [ "toml" ] }
Uppercase keys are lowercase. 馃憥

This patch:
config = { git = "https://github.com/matthiasbeyer/config-rs.git", rev = "69affb1255292047040852ff35c821a1be7f4c51", default-features = false, features = [ "toml" ] }
Uppercase keys are uppercase. 馃憤

@matthiasbeyer
Copy link
Collaborator Author

Cool. @YounessBird can you have a look? This obviously breaks a test and of course also that change that is reverted here was introduced for a reason... so I'd like to have you look at it to decide how we can or should moving forward.

@oscargus
Copy link

Just a friendly reminder to also revert this text in the README:

 - Is case insensitive and all the keys are converted to lowercase internally

(This is causing problems in my project where we read arbitrary key names from a config file and then use them in e.g. menus and commands, so one would like to keep the case.)

@jpmckinney
Copy link

Confirm works! Using config = { git = "https://github.com/matthiasbeyer/config-rs.git", rev = "69affb1255292047040852ff35c821a1be7f4c51", default-features = false, features = [ "ini" ] }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants