Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Warning when using lombok's with aspectj

I remember trying to get Lombok to play nice with AspectJ several years back and failed miserably.  While it can be used for basic enhancement (ex: around, before pointcut, etc) trying to use it with mixins was a total failure as Lombok needed to use AJC to compile the code (chicken and egg thing otherwise).

As Andy alluded to, the AJC compiler is based on the jdt compiler, but with a different package name.  I had even tried to rename the AJC compiler packaging to match what Lombok expected but that didn't work either.

If you search the AspectJ usergroup archive, you should be able to find a thread from around 2014 relating to this.

If someone manages to make it work, I'd love to hear about it.  It was one of the top reasons I decided to abstain from using Lombok; lack of full AJ support was a deal breaker for me.

Thanks

Eric

On Fri, Jan 25, 2019, 11:58 AM Andy Clement, <andrew.clement@xxxxxxxxx> wrote:
I haven't done much investigation work into the combination. If you do it in two steps you'd be fine (Lombok then binary weave) but that won't work if you are doing static introductions from aspects that you need around for your code to compile in the first place. If you tweaked Lombok to additionally recognize the aspectj compiler like it recognizes JDT, that may work (since AspectJ is based on the JDT compiler with a different package name) but I've never tried it - you'd need to rebuild Lombok yourself to try it out. Feels like that wouldn't be a totally unreasonable contribution back to Lombok if it did behave.

cheers,
Andy

On Wed, 23 Jan 2019 at 23:59, Mikael Petterson <mikaelpetterson@xxxxxxxxxxx> wrote:
Hi,

Is there a way around this:


br,

//mikael
Join GitHub today. GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.


 

 

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/aspectj-users

Back to the top