Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Added support for lombok.fieldDefaults.default* in lombok.config #571
This PR consists of four commits:
I hope you'll find this PR useful
OK, for some strange reason,
The problem was not in
However, when I changed
@@ Coverage Diff @@ ## master #571 +/- ## =========================================== + Coverage 64.38% 64.5% +0.11% - Complexity 1488 1505 +17 =========================================== Files 178 178 Lines 5298 5310 +12 Branches 1182 1185 +3 =========================================== + Hits 3411 3425 +14 + Misses 1380 1378 -2 Partials 507 507
Great PR, very well documentated! Thank you very much! Make more of this:)
As I know this is mostly problem in the tests only. Using AbstractLombokLightCodeInsightTestCase is absolutly right, because it setups all of lombok classes (and jdk mock) for the test run. Without this setup Intellij can't not find any of classes used i the test and a lot of "resolve" operations fails. Thank you for fixing this in the test too!
Did you tried your build in some big projects? I will merge this now, but I am a little bit afraid of some possible performance degradation, because this code will be running now for every field in every class and searching for lombok configuration information again and again. It could be vissible degradation on big classes with a lot of fields for example. ConfigDiscovery operates on an index and should be fast, but I got already a lot of performance issues for the plugin and comment like this: #516 (comment) are not really reassuring...
Thank you, Michail, for your kind words
As to performance issues: no, I have not tried this build at all. Actually, I have not even considered the consequences with respect to performance - you made an excellent observation!
Update: I have built the plugin (IJ 2018.3.2), and tested it on a fairly large project. When I opened a file with 10+ non-static fields, I think I have experienced some minor slowdown while loading the file (but I can't be sure).
I took a quick look at
As far as I understand, the current index (let's call it index A) stores the contents of
The index I have in mind (let's call it index B) would use index A to determine the effective values of lombok configuration keys for any given directory (not necessarily containing a
In other words, I would like to move the logic of
But I really don't know if such things are possible within the IntelliJ API so this proposal might be nonsense. And such an approach would pose challenges (e.g. when given
Note that since this index would need to contain all the affected directories in the project, it'd be much bigger than index A (but I can't tell if this could be a problem).
Just some feedback: I've been running IntelliJ 2018.3 with a custom-built 0.24 lombok-intellij-plugin (which included this PR) for almost 3 months now (large project at work).
Conclusion: I haven't experienced any problems nor inconveniences (especially no slowdowns that would be noticeable).