pmmp / PocketMine-MP

A server software for Minecraft: Bedrock Edition in PHP
https://pmmp.io
GNU Lesser General Public License v3.0
3.27k stars 1.54k forks source link

pocketmine.yml version control #450

Open dktapps opened 7 years ago

dktapps commented 7 years ago

We either need to rebuild configs or warn users their config is outdated. The problem with this is that libyaml cannot retain comments in yml files.

TheDiamondYT1 commented 7 years ago

Just add an key that returns the version?

#Config revision
#DO NOT CHANGE BY HAND
revision: 21
dktapps commented 7 years ago

@TheDiamondYT1 That doesn't solve the actual problem, that only provides a (unreliable) way to tell the difference between config versions.

TheDiamondYT1 commented 7 years ago

Couldn't you loop through all keys in the config and check it against the built-in config

tarik02 commented 7 years ago

@TheDiamondYT1 and what then? You couldn't reliably merge yaml files including comments