pop-os / cosmic-epoch

Next generation Cosmic desktop environment
1.71k stars 54 forks source link

Please consider switching from ron to toml for config files #271

Open wiiznokes opened 2 months ago

wiiznokes commented 2 months ago

Config files in COSMIC are plain text so that users can edit them manually.

I think we should consider a more user friendly language for it.

toml has a stable syntax that is well documented. Famous software already use it for configuration like Rust, Helix or Hyprland(at least a little i think).

advantages:

In this reddit post, you can see that Toml wins:

1. Toml: 1400
2. Json: 795
3. Yaml: 774
...
6 and last. Ron: 76
wiiznokes commented 2 months ago

And also, please consider to not splitting to much config into multiple files, i don't think it's worth for setting that don't change a lot. It help if you want for example read a config from another person, copy paste a config, or just saving that file.

I can't think of a setting in COSMIC that change so often that it need to be separate.

soloturn commented 2 months ago

toml? oh my god :) there are much nicer options than toml if one really does not want ron.

wiiznokes commented 2 months ago

Cuddle seems ok to me, but it has no support for serde yet so idt it's a possible solution for now.

dhall seems way to complex for COSMIC. Imo, it could be used in particular case, for complex plugin for example, but it shouldn't be used for general configuration management.

I think toml is a good solution for now. It have battle tested rust implementation. And the main complain i saw on internet about toml is that is doesn't fit well for nested struct. But it should be fixed in toml 1.1.0, with support for multi-line table.

Anyway, it's not that hard to change the format in the future, so imo, we should just take the best available solution that currently exist. And that's clearly not ron.

atagen commented 1 month ago

we should just take the best available solution that currently exist. And that's clearly not ron.

why? if the intent would be for users to engage the settings UI, human readable config is a niche issue. even then it's not clear at all what the issue with RON is aside from unfamiliarity.