Skip to content

Make from_toml_value case sensitive #112

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

Closed
wants to merge 1 commit into from
Closed

Make from_toml_value case sensitive #112

wants to merge 1 commit into from

Conversation

epilys
Copy link

@epilys epilys commented May 13, 2019

TOML is case sensitive [0], so key values should not be lowercased.

[0] https://github.com/toml-lang/toml#user-content-spec

TOML is case sensitive [0], so key values should not be lowercased.

[0] https://github.com/toml-lang/toml#user-content-spec
@mehcode
Copy link
Collaborator

mehcode commented May 13, 2019

🙇‍♂️ Thank you for your contribution. However, I do not wish to accept any breaking changes to this repository at this time.


Note that I fully agree with changing this but it will be a part of #111.

@mehcode mehcode closed this May 13, 2019
@epilys
Copy link
Author

epilys commented May 13, 2019

Note that I fully agree with changing this

I don't know if it's a matter of agreeing or not, since it's in the specification and now config-rs isn't compliant. It's a bug.

But of course it's your decision and I respect it.

EDIT; I misread the part I quoted! Apologies. :D But still, for my usage at least, it's a bug and I will have to use a forked version.

@mehcode
Copy link
Collaborator

mehcode commented May 13, 2019

@epilys Let me try and explain my reasoning here as its not completely a bug.

config has been about merging different sources of configuration with the most common example being a file and the environment.

To make this merging process "easy", all configuration keys were lowercased when they entered the configuration store.

In hindsight that was not ideal. However, I can't remove the lowercasing without allowing for case-insensitive merging of configuration keys which is now depended on by several projects (mine included). The current solution for this is that in v0.10 configuration keys will be stored as received (no lowercasing) but all comparison operations will be done using case folding.

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

Successfully merging this pull request may close these issues.

2 participants