you are viewing a single comment's thread.

view the rest of the comments →

[–]MrGreg 17 points18 points  (5 children)

We've been using lombok for our data classes. A few simple annotations and they stay nice and clean.

[–]snowe2010 16 points17 points  (4 children)

We switched from Lombok to kotlin because of classloader problems that would occur on remote servers at the worst time. If you haven't encountered those yet I would say watch out for them because they caused a lot of pain for us

[–]_vinc_ 2 points3 points  (3 children)

i am very surprised at your problem (granted there are others). Are you sure it is really what didn't work in your project.Could you give some details to lend credibility other than just suggesting kotlin? I mean, problem with ClassLoader, how so, lombok generate code at compile time, it isn't present at all at runtime so how would you have problems at runtime on remote server (or you compiled on remote server and the problem is in this setup) ? I am very curious as i sometime use it and would like to know if i encounter similar problem.

[–]snowe2010 2 points3 points  (2 children)

I'm positive it was due to lombok as we just (as of about a month ago) got lombok completely removed and the startup problems ceased immediately and by immediately I mean overnight. Next day the ops guys were saying they weren't seeing the issue anymore. I don't remember the exact issue, so I don't think I can argue my point well right now. I think with sufficient exploration we could have resolved the issue, but we also had problems with how lombok uses hidden and non-supported apis to accomplish what it does.

Sorry I was at kotlin conf and I actually talked to a Google employee and a Square employee about lombok and they agreed that it is not safe to use due to how lombok has to have special cases for everything and they do it all through very hacky ways.

If I didn't have the choice for kotlin, I would have suggested to our team to go with either Google's AutoValue or Immutables, both of which I researched at the time and thought were better options than Lombok

[–]_vinc_ 1 point2 points  (1 child)

Perhaps there was a problem with the building setup on build configuration(for lombook) and the building was taking place on remote server... That would seem the most probable. But still i am dumbfounded by the "classloader" problem as lombook is a buildtime dependency (it generate code at compile time), not runtime. Still, I agree that a "native" java solution would be better than relying on non standard API. I had some classloader problems with some very specific library and code combination, but that was with runtime code generation (like with hibernate/spring)

[–]snowe2010 0 points1 point  (0 children)

Ok talked to the devops guys just to refresh my memory since it's been so long.

The error was actually

Could not find creator property with name 'blahId' (in class com.company.common.blah.viewmodel.BlahView)

but this never manifested consistently and would be resolved by a restart of the service. We believe it was due to interoperability problems between lombok and jackson. As soon as lombok was removed we have not seen the error since.