I agree with this. IMO the only configuration syntaxes we should support are 
those we can implement with no dependencies. At the moment that is JSON and 
Properties (Ugh!). I would love to deprecate properties but I know that is a 
non-starter since we didn’t support them for years and were constantly asked 
for it.

Ralph

> On Nov 29, 2023, at 5:14 AM, Gary Gregory <garydgreg...@gmail.com> wrote:
> 
> I think the overall goal should be to have no optional dependencies, no
> surprises. I personally hope to never force YAML on anyone.
> 
> Gary
> 
> On Wed, Nov 29, 2023, 6:51 AM Piotr P. Karwasz <piotr.karw...@gmail.com>
> wrote:
> 
>> Hi all,
>> 
>> I have been using a modularized sandbox project to test Log4j and
>> optional dependencies are a nightmare.
>> 
>> Small example: if I use Log4j API in my project and I add:
>> 
>> requires org.apache.logging.log4j;
>> 
>> then when I run the app, the JVM will automatically add `log4j-api` to
>> the boot layer.
>> 
>> It will also add `log4j-core`, since it provides a service that
>> `log4j-api` uses.
>> 
>> However it will **not** load `jackson-datatype-yaml`, because it is an
>> **optional** dependency of `log4j-core` and provides no services
>> `log4j-core` is interested in. The user must go to the additional pain
>> of specifying `--add-modules` or the application developer must add a
>> bogus `requires` statement.
>> 
>> Therefore I would propose to:
>> 
>> * move the YAML configuration factory to a separate module and delete
>> one of the JSON configuration factories (the one that uses Jackson).
>> 
>> What do you think?
>> 

Reply via email to