On 21 June 2017 at 16:01, Daniel Gruno <humbed...@apache.org> wrote:
> On 06/21/2017 04:09 PM, sebb wrote:
>> On 21 June 2017 at 11:46, Daniel Gruno <humbed...@apache.org> wrote:
>>> I'm gonna broach this subject again, but with a twist:
>>>
>>> Why not consolidate the two config files into one for a later release
>>> (after the upcoming 0.10)?
>>
>> Which two config files?
>>
>> I think there are at least 3:
>>
>> site/api/lib/config.lua
>> site/js/config.js
>> tools/ponymail.cfg
>
> This would be config.lua + ponymail.cfg, the two _server_ configuration
> scripts. I consider config.js to be a separate UI configuration (IOW it
> doesn't overlap anywhere with the other two and can also be used without
> modification).
>
> Now...
> If possible, we could weave config.js into the picture by having that
> configuration generated from the yaml...that is something to think about
> :-).

If you are going to generate config files from the yaml then you could
just as easily generate config.lua from it.
That would avoid the overhead of requiring yaml to parse the config
repeatedly on the web server.

> With regards,
> Daniel.
>
>>
>>> It would ease the issue of having to maintain the config (only one to
>>> change if you decide to change ES settings etc).
>>>
>>> I'm still in the yaml camp on this - I don't think the compiler error
>>> argument stacks up. You can just as well do a typo in Lua that won't be
>>> spotted as you can do one in yaml. They both have syntax that needs to
>>> be followed, and both allow for humans to enter the wrong thing in the
>>> right syntax.
>>>
>>> Yaml is understood by just about any language, both Lua and Python,
>>> though I would wait till there's a Python rewrite of the Lua scripts
>>> before we start switching to a unified config (we could have a simple
>>> converter for older installations).
>>>
>>> I have been toying with a unified yaml for a while, and to me it works
>>> great. There is currently nothing in the Lua part (or any python
>>> rewrite) that would require the config to contain actual code, thus
>>> nothing preventing a switch.
>>>
>>> TL;DR: Let's consolidate all the configs into one ponymail.yaml file
>>> with all the stuff needed. Then you'd only have to edit one file when
>>> you want to update your configuration.
>>>
>>> WDYT? This is merely a discussion on whether people think this is a
>>> viable goal, we can discuss the actual design of the file later on, if
>>> there's a majority in favor of this.
>>>
>>> With regards,
>>> Daniel.
>

Reply via email to