sympa-community / sympa

Sympa, Mailing List Management Software
https://www.sympa.community/sympa
GNU General Public License v2.0
246 stars 97 forks source link

Improve format of configurations #1594

Open ikedas opened 1 year ago

ikedas commented 1 year ago

Expected Behavior

The format of the configuration file(s) should be as uniform, flexible, and generic as possible.

Current Behavior

Possible Solution

I propose that we move to a format that is as uniform and generic as possible.

Here are some candidates along with their pros / cons:

\ JSON Lua TOML UCL YAML Comments
Human-easily-readable Less Less More More More
Strict grammer Strict Strict Strict Tolerant Tolerant Whether a partial error invalidates the whole or not.
Comment syntax No Yes Yes Yes Yes Grammatical elements for notes that do not make sense as data.
Inclusion syntax No Yes No Yes No Grammatical elements to include data fragments from other files.
Scripting capability No Yes No No No Runtime control including conditional branching.
(Upper-)compatible to JSON - No No Yes Yes(*) (*) YAML: Some implementations, e.g. YAML-Tiny, are not compatible.
Unity of specification in actual implementations High High High High A bit diverse
Implementations for Perl JSON, JSON-XS Lua-API TOML-Tiny, TOML-XS Config-UCL YAML, YAML-PP, YAML-PP-LibYAML, YAML-Safe, YAML-Syck, YAML-Tiny, YAML-LibYAML

Lua is not a configuration file in the usual sense, but it would be useful for migrating scenarios and tasks definitions. For the other configuration files, we could choose from the remaining four.

Planned tasks

TBD.

Related issues