Service file format #389
Replies: 1 comment 2 replies
-
Hi, I did at some stage consider some different "standard" formats for the service description files, including TOML (and YAML and one or two others). However, none really seemed satisfactory to me. I didn't want the command to be have to be specified as an "array" and so need quotes to passed through to Dinit so that it can do its own word-splitting on command lines, for example (I don't think there's an existing format that "naturally" does this). I also wanted to keep the punctuation needs minimal and leave open the possibility of metacommands (such as the recently implemented The current format is pretty good for what it does I think, with the one downside that it's a bespoke format. So, I'm not really interested at this stage on taking on the work to integrate a new format, introduce a new library dependency, and introduce backwards incompatibility which would be forced on the distributions that are already using Dinit, etc. I hope you understand, |
Beta Was this translation helpful? Give feedback.
-
Hello,
Simple question for a complex topic: since the number of parameters and their options are increasing, the service description files will become more complex and will look less intelligible.
Some options have very specific syntax, meaning that there are less chances to find out there syntactic highlighters, analyzers, validators and so on.
Could it be a good idea to switch to TOML 1.0 format instead ?
There is a parser (tomlc99, written in C99 and TOML 1.0 compliant), under MIT license, that can help with the low level parsing.
The service file could look similar to this:
Thank you for the great work already done, I'm really enjoying the serenity that comes with dinit !
Beta Was this translation helpful? Give feedback.
All reactions