micronaut-core icon indicating copy to clipboard operation
micronaut-core copied to clipboard

Extract annotation processor classes and writers out of the runtime dependencies. Consider renaming `inject-java`.

Open dstepanov opened this issue 3 years ago • 3 comments

Issue description

Right now inject module contains a lot of classes that are only used at the compilation time and can be removed from the runtime:

  • io/micronaut/inject/ast - AST that is used during the annotation proccessing
  • io/micronaut/inject/writer - Writers used to generate classes
  • io/micronaut/inject/visitor - Annotation processor visitors
  • io/micronaut/inject/beans - Bean introspection writers, mappers
  • io/micronaut/inject/configuration - Configuration metadata writers
  • io/micronaut/inject/processing - Utils
  • io/micronaut/inject/util - Utils

The module name inject is a bit misleading because there is a lot more stuff happening. We should consider renaming it to core-processor just like data-processor in Micronaut Data. Different language-specific implementations can be core-processor-java, core-processor-groovy.

WDYT @micronaut-projects/core-developers ?

dstepanov avatar Sep 09 '22 13:09 dstepanov

In case inject-java is renamed, the Gradle (and probably Maven) plugins will have to be adapted (as well as the Micronaut Build tools) as there are several occurrences there.

melix avatar Sep 09 '22 13:09 melix

don't think it is worth renaming it would create too much disruption. However moving the compile time only types out of micronaut-inject and eliminating the repacking of ASM into the runtime jars is a must.

graemerocher avatar Sep 13 '22 08:09 graemerocher

+1 from me @dstepanov

sdelamo avatar Sep 13 '22 10:09 sdelamo

I don’t see much benefit in renaming the inject- modules.

jameskleeh avatar Oct 11 '22 07:10 jameskleeh

I don’t see much benefit in renaming the inject- modules.

agreed, will just create disruption, new compilation time only modules makes sense though

graemerocher avatar Oct 11 '22 08:10 graemerocher

Fixed by https://github.com/micronaut-projects/micronaut-core/pull/8224

graemerocher avatar Oct 30 '22 11:10 graemerocher