Skip to content

Commit

Permalink
Fix partial compile regression introduced in 10.0-RC5 (#653)
Browse files Browse the repository at this point in the history
10.0-RC5 introduced a regression that stops "Partial Compilation" from working.
This is due to the ProcessingContext.isInjectModule() not correctly detecting
the current module. This meant no existing module was found, no dependency
meta data for the module was read, a new module is created for the components
included in the partial compile and generally that will fail with missing dependencies.

A workaround is to perform a full compile (but this isn't really a workable
solution - its important that partial compile works).
  • Loading branch information
rbygrave authored Jul 25, 2024
1 parent 63bc072 commit d2e3c21
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ static String loadMetaInfServices() {

private static boolean isInjectModule(String spi) {
var moduleType = APContext.typeElement(spi);
return moduleType != null && moduleType.getSuperclass().toString().contains("AvajeModule");
return moduleType != null && moduleType.getInterfaces().stream()
.map(TypeMirror::toString)
.anyMatch(s -> s.contains("AvajeModule"));
}

static List<String> loadMetaInfCustom() {
Expand Down

0 comments on commit d2e3c21

Please sign in to comment.