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

Replace our TestCompiler with Spring Framework's version

Open snicoll opened this issue 3 years ago • 2 comments

Our test support has a TestCompiler (org.springframework.boot.testsupport.compiler.TestCompiler). Now that Spring Framework has a test module that ships with a more powerful variant, we should remove ours and adapt our existing tests.

snicoll avatar Jun 07 '22 09:06 snicoll

There are a few blockers to implementing this completely right now.

One Spring Boot test compiles a class that implements a Java record. The qdox library that Framework uses to parse and validate Java source has a bug that prevents it from properly parsing records.

Most other Spring Boot tests verify some part of annotation processing, and rely on the TestCompiler invoking a javax.annotation.processing.Processor implementation. We'll need to add support for Processors to the Framework TestCompiler before migrating those tests.

scottfrederick avatar Jun 07 '22 22:06 scottfrederick

We pretty much only use qdox now to get the fully-qualified class name. I think we could probably replace it with our own parser if we wanted.

philwebb avatar Jun 08 '22 00:06 philwebb