PlotSquared icon indicating copy to clipboard operation
PlotSquared copied to clipboard

Proposal for further annotation cleanup

Open NotMyFault opened this issue 4 years ago • 0 comments

In https://github.com/IntellectualSites/PlotSquared/commit/3eb485e90043ee64df78fbecaa83686e3b27b598 I dropped informational Guava and JB annotations and reduced our overall annotation library count from 6 to 5. This is a proposal to determine which frameworks are needed still or can be removed or transitioned to checkerqual, our core annotation framework. All annotation frameworks mentioned are shaded and provided at runtime.

  • JB (org.jetbrains) Used only in Fawe classes and a single time in ClickStripTransform, looks like a wrong import. To match with upstream, Fawe switched to javax some months ago. We can adapt the changes and remove JB overall.

  • IJ Lang (org.intellij.lang) I couldn't find a single use case in the code, it provides @Language, @Pattern and @RegExp at runtime, do we need it for some third party dependency?

  • JavaX (javax.annotation) Used in a few injectable classes. Originally introduced when we switched to Guice 4, because Guice didn't recognize nullability provided by qual. We are now using Guice 5 and should evaluate again whether that is still true. It is used in PlotTitle as well, which is non injectable. Edit: Taking a look at the Guice documentation, checkerqual nullability is supported.

  • JSR 305 (com.google.code.findbugs) Required for cloud until the JavaX scenario from above has been evaluated.

  • JSR 330 (javax.inject) We don't use that a single time in our codebase, our @Inject and @Singleton is provided by Guice. To my knowledge, JSR 330 has been published in 2009, do we really have dependencies that demand such ancient libraries?

NotMyFault avatar Dec 30 '21 14:12 NotMyFault