> On Apr 17, 2022, at 10:42 PM, Volkan Yazıcı <vol...@yazi.ci> wrote:
> 
> Thanks for raising this subject Matt, I am certainly interested in porting
> the plugin system in 3.x to 2.x for a very simple reason: because plugins
> are broken in 2.x. Let me elaborate on this and some more:
> 
>   1. I was working on LOG4J2-3082 (support external serializers, e.g.,
>   Jackson, in JTL) and there I needed `@RequiredClass`. Ralph already
>   implemented this in `master`, I just need to copy it to `release-2.x`,
>   after all it is just a `@ConstraintValidator`, right? Right... But it
>   simply won't work. Because JTL, as `PatternLayout`, uses `PluginManager` to
>   load plugins and that doesn't support `@ConstraintValidator` et al.?! I've
>   discussed this with Matt and we came to the conclusion that porting the new
>   plugin infra from 3.x to 2.x is easier compared to fixing the problem in
>   2.x.

@RequiredClass is another feature that was planned for 3.0 so the fact that it 
doesn’t work in 2.x is no great surprise. I did have it working in 3.0 before 
the 
DI system was integrated so getting it to work in 2.x would be easy. The DI 
system is not required for that. 


>   2. 3.x plugins use `ServiceLoader`, which doesn't suffer from problems
>   (e.g., maven-flattening issues) 2.x does.

Not sure what this has to do with anything. We aren’t migrating the 
ServiceLoader plugin implementation back to 2.x.

>   3. 3.x plugins are backward-compatible, i.e., they support 2.x plugins.

You mean that the 3.x plugin system supports 2.x plugins. Yes, that was 
intentional. 3.x plugins will not work in 2.x. That is intentional.

>   4. Plugin refactoring is one of the most important changes in 3.x. By
>   porting this to 2.x, we will be testing it earlier and zeroing the chances
>   of a surprise in the domain of plugins while migrating from 2.x to 3.x.

-1. Not gonna happen. If we do this then 3.x becomes almost pointless.

>   5. 2.x is here to stay, probably for decades.

2.x is here for as long as Java 8 is supported. We will EOL it when the 
usage gets very low just as we did for Java 6 and Java 7.

> 
> Regarding the *"I can start using the plugins package inside core in 2.x so
> it’s the same package name as in 3.x"* option, I'd indeed prefer that.
> Though let's first have a resolution on whether to proceed or not.

-1

Ralph


Reply via email to