Sourcetrail icon indicating copy to clipboard operation
Sourcetrail copied to clipboard

Sourcetrail support for lombok in java gradle project

Open Christoph460 opened this issue 6 years ago • 22 comments

I would like to know if the sourcetrail (version 2018.2) supports the lombok plugin within a gradle java project.

  • if yes how do I enable this feature?
  • if no is it planned to integrate in sourcetrail?

Christoph460 avatar Apr 24 '18 17:04 Christoph460

It is not yet not available. As far as I remember the tricky part about lombok is, that it creates getters/setters during runtime, so the information is not available for our static analyzer yet. We have to add lombok capabilities to our static analyzer to support it.

egraether avatar Apr 24 '18 22:04 egraether

Alright, thank you your for the answer. Since our current project at Authentic Vision is mostly based on using lombok getter/setter generation during runtime, a lot of unfound messages in sourcetrail exists, which makes it under this circumstances hardly impossible to use. Looking forward when lombok will be supported.

Christoph460 avatar Apr 25 '18 10:04 Christoph460

+1

Mortinke avatar Oct 11 '18 15:10 Mortinke

+1 via e-mail

egraether avatar Nov 29 '18 14:11 egraether

+1

alexey-hw avatar Feb 26 '19 14:02 alexey-hw

+1 via e-mail

egraether avatar Aug 30 '19 08:08 egraether

+1

borisilic avatar Nov 18 '19 23:11 borisilic

+1 getters/setters etc are created at compile time by lombok

ghost avatar Nov 19 '19 10:11 ghost

+1

myhau avatar Nov 19 '19 12:11 myhau

+1

lftrevisan avatar Nov 19 '19 15:11 lftrevisan

+1 I just tested SourceTrail with my app (maven+lombok) - without success. However, after delombok - it was successful :-)

I had to use maven plugin that delombokifies the source, then with some help of IntelliJ - correct files that were not processed by the plugin, also I had to manually remove all @SneakyThrows and finally SourceTrail successfully scanned my code base. It's great help to learn the code base! Diagram is much better than what IntelliJ generates!

mt3o avatar Nov 19 '19 16:11 mt3o

Thanks for sharing this workaround!

mlangkabel avatar Nov 19 '19 16:11 mlangkabel

+1

dnobre avatar Nov 19 '19 17:11 dnobre

Lombok generates the getter and setter methods during compile time, not during runtime. If Sourcetrail would be able to analyze the .class files compiled by gradle/maven it would find the methods which are missing in the .java source files.

Simulant87 avatar Nov 21 '19 16:11 Simulant87

+1

ManuelMos avatar Nov 25 '19 12:11 ManuelMos

+1 , for maven

guxingke avatar Dec 11 '19 03:12 guxingke

+1

zhaoxingyun avatar Dec 31 '19 01:12 zhaoxingyun

+1 for maven

ghost avatar Feb 19 '20 10:02 ghost

+1

MLNW avatar Mar 21 '20 15:03 MLNW

+1

yusiwen avatar Apr 06 '20 16:04 yusiwen

+1

Josemartins-ptc avatar Apr 22 '20 18:04 Josemartins-ptc

+1 need it!

yusiwen avatar Dec 25 '20 07:12 yusiwen