spring-boot icon indicating copy to clipboard operation
spring-boot copied to clipboard

Add Kotlin Symbol Processor for auto configuration

Open bespaltovyj opened this issue 3 years ago • 9 comments

KSP issue - https://github.com/spring-projects/spring-boot/issues/28046 I made a draft in which I added support for ksp. I have a few questions:

  1. Сan I use kotlin?
  2. Do I need to create a separate gradle module for ksp?
  3. Is there a description of the spring-autoconfigure-metadata.properies file somewhere? The result of processing java annotations is slightly different from the results of ksp and it is unclear whether these differences affect something.

If you tell me what fixes are needed now, then after that I will start doing ksp support for spring-boot-configuration-processor

bespaltovyj avatar Nov 13 '21 20:11 bespaltovyj

@bespaltovyj Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

pivotal-cla avatar Nov 13 '21 20:11 pivotal-cla

Thanks for opening this, @bespaltovyj. I haven't yet looked closely at what will be required to support KSP, but I had imagined that we would refactor the existing logic so that it can be called from either a Kotlin symbol processor or a Java annotation processor. Compared to duplicating the logic, this should make it easier to achieve consistent behaviour across the two processors particularly in the case of the @ConfigurationProperties processing which is quite complex. I would also prefer that we try to use Java as much as possible.

wilkinsona avatar Nov 15 '21 12:11 wilkinsona

Ok, I'll try to combine KSP and annotation processing in Java.

bespaltovyj avatar Nov 15 '21 19:11 bespaltovyj

@bespaltovyj thanks for working on this. Do you know if there is still anything missing here, besides you signing the "Contributor License Agreement"?

cd-ff avatar Jun 13 '22 12:06 cd-ff

@cd-ff I don't understand what you mean. Can add more details?

bespaltovyj avatar Jun 14 '22 16:06 bespaltovyj

@bespaltovyj I believe @cd-ff was referring to the earlier request to sign the CLA.

wilkinsona avatar Jun 16 '22 13:06 wilkinsona

I resign CLA yesterday

bespaltovyj avatar Jun 16 '22 15:06 bespaltovyj

@bespaltovyj Thank you for signing the Contributor License Agreement!

pivotal-cla avatar Jun 16 '22 16:06 pivotal-cla

What would be required to allow this feature to be implemented, are there changes that need to be made or just tests that need to be fixed / need to work?

wslaghekke avatar Nov 01 '22 10:11 wslaghekke

Any updates?

aboutZZ avatar May 19 '23 07:05 aboutZZ

We chatted about this today and I'm afraid that we decided that we don't think this is something that we'll be able to merge. Sorry. We need to take a step back, consider our options for #28046 and decide how we want to tackle KSP support in general.

wilkinsona avatar Jul 26 '23 15:07 wilkinsona