Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial support for @CustomLog #654

Merged
merged 1 commit into from Oct 9, 2019
Merged

Initial support for @CustomLog #654

merged 1 commit into from Oct 9, 2019

Conversation

juriad
Copy link

@juriad juriad commented Aug 7, 2019

Since support for @CustomLog (see projectlombok/lombok#2086) will be present in the next release of Lombok, I also added it into this Intellij plugin.

I have tested it briefly, however I have a couple of questions:

  • Performance.
    The declaration is a quite complicated expression that requires parsing which can potentially be costly. How often are methods validate and generatePsiElements called?
    If there would be a performance problem, we could introduce caching of parsed declaration, but again I don't know if we need to deal with multithreading or even what the cache key should be as the configuration value is found for a psiClass while lombok.config is only one per module.

  • Tests
    I couldn't find a way how to unit test the implementation as we need to set lombok.config before the test is performed. Lombok itself allows to define a special comment which sets the configuration. https://github.com/rzwitserloot/lombok/pull/2086/files#diff-336a74e0014249db8ef0ef331af898f8R1 Do we have something similar here?

  • License
    Shall I add myself to a list of contributors, or sign something in blood?

Is there anything that catches your eye, that I should change?

@mplushnikov
Copy link
Owner

Thank you very much for your work! I'm just returned from vacation and will look on your code next days.
Please add yourself to the contributor list in readme.md file in the meanwhile:-)

@mplushnikov
Copy link
Owner

For tests you can look on "lombok-intellij-plugin/testData/configsystem/..."
I think we can use it for this too.

@mplushnikov
Copy link
Owner

@juriad are you planning to update your PR?

@juriad
Copy link
Author

juriad commented Oct 3, 2019

@mplushnikov Yes, I intend to continue. I finally got some time allocated for this.

@juriad
Copy link
Author

juriad commented Oct 8, 2019

@mplushnikov I pushed a new version which fixes all problems. I also had to adjust the grammar in lombokConfig.flex which I hope is correct.

@codecov-io
Copy link

codecov-io commented Oct 8, 2019

Codecov Report

Merging #654 into master will decrease coverage by 0.19%.
The diff coverage is 62.73%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master     #654     +/-   ##
===========================================
- Coverage     69.35%   69.16%   -0.2%     
- Complexity     1712     1747     +35     
===========================================
  Files           196      199      +3     
  Lines          5936     6067    +131     
  Branches       1203     1247     +44     
===========================================
+ Hits           4117     4196     +79     
- Misses         1268     1289     +21     
- Partials        551      582     +31
Impacted Files Coverage Δ Complexity Δ
...ugin/action/delombok/DelombokEverythingAction.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...in/language/LombokConfigCompletionContributor.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...ellij/plugin/processor/clazz/log/LogProcessor.java 100% <100%> (ø) 1 <1> (ø) ⬇️
.../plugin/processor/clazz/log/JBossLogProcessor.java 100% <100%> (ø) 1 <1> (ø) ⬇️
...lugin/processor/clazz/log/CommonsLogProcessor.java 100% <100%> (ø) 1 <1> (ø) ⬇️
...lij/plugin/processor/clazz/log/Log4jProcessor.java 100% <100%> (ø) 1 <1> (ø) ⬇️
...ij/plugin/processor/clazz/log/XSlf4jProcessor.java 100% <100%> (ø) 1 <1> (ø) ⬇️
...lij/plugin/processor/clazz/log/Slf4jProcessor.java 100% <100%> (ø) 1 <1> (ø) ⬇️
...j/plugin/action/delombok/DelombokLoggerAction.java 100% <100%> (ø) 2 <0> (ø) ⬇️
...hnikov/intellij/plugin/lombokconfig/ConfigKey.java 94.87% <100%> (+0.13%) 6 <0> (ø) ⬇️
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c32f8b1...1310147. Read the comment docs.

@mplushnikov mplushnikov merged commit 30d7b5f into mplushnikov:master Oct 9, 2019
@mplushnikov
Copy link
Owner

Thank you for your work! I just merged it in master!

@Valantir007
Copy link

Valantir007 commented Oct 22, 2019

Thank you for your work. Do you know when new release will be available? 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants