lucid-kv / lucid

High performance and distributed KV store w/ REST API. 🦀
https://clintnetwork.gitbook.io/lucid/
MIT License
373 stars 31 forks source link

Prevent Yaml Parsing Crash #67

Closed imclint21 closed 4 years ago

imclint21 commented 4 years ago

If we can add configure serde_yaml to don't crash when we have missing configuration section if could be great 👌🏼

imclint21 commented 4 years ago

@CephalonRho I tried to fix this. Do you remember what you said?

shuni64 commented 4 years ago

I have no idea what I said, but I implemented this in https://github.com/lucid-kv/lucid/commit/b92b8f1b5b8fd9daceea4cde0bbd7c3595d7fb1d. There still needs to be at least 1 configuration key in config.yml for it to be parsed properly. I'm not too familiar with yaml, so I'm not sure if it's because of the format itself or a bug in serde_yaml, but it's now possible to add new sections and keys without breaking previous setups.

imclint21 commented 4 years ago

Oh really good