Compatibility with annotation processors (eg. Immutables) #1499
Unanswered
ephemerist
asked this question in
Q&A
Replies: 1 comment 7 replies
-
In theory, https://github.com/sbt/zinc/blob/1.10.x/zinc/src/main/scala/sbt/internal/inc/javac/AnalyzingJavaCompiler.scala 's work I think is to associate the class files to source files. If there's a process that Java processor performs that's somehow opaque to Zinc, we might need to tweak something? |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In our codebase we have a few classes like
At compile-time, an additional class
FooBuilderis generated, but zinc doesn't know how to map that back to the originalFoo.javasource file, so gives up and logs a warningCould not determine source for class FooBuilder. As a result, any time anything in the module changes, all classes that depend onFooBuilderget invalidated.Is mapping from classes generated by annotation processors back to the original source supported by zinc? If not, how about adding
def sourceFileName(classFile: ClassFile): Option[String]toLookupto allow build tools the chance to add this feature for the annotation processors they support?Beta Was this translation helpful? Give feedback.
All reactions