Skip to content

Incremental compilation support seems implemented incorrectly to me #24

Closed
@bejibx

Description

@bejibx

For proper support of incremental compilation you should provide originating elements when creating source files. See Filer#createSourceFile(CharSequence, Element...) documentation. When using JavaPoet you should specify originating elements using TypeSpec.Builder#addOriginatingElement(Element) method. I can't spot a single call to this method in this repo, which can lead to missing files during build, some generated files not being rebuild when needed and other problems.

Another problem I spot is you declare your annotation processor both using AutoService library and META-INF.services file, which is kinda strange because AutoService is generating this file for you.

Also you can optimize incap support by splitting MvpCompiler into two - one for generating MoxyReflector (this one is aggregating) and one for other stuff (isolating).

I did so in my PR with incap support to original repo. I can work on migrating my changes into this repo, but I don't want to do so while processor tests are broken. I created another issue about it - #23.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions