Skip to content

Commit

Permalink
Inject the processor earlier in the initialize method rather than in …
Browse files Browse the repository at this point in the history
…processingSteps.

Fixes #2986.

RELNOTES=n/a
PiperOrigin-RevId: 408716591
  • Loading branch information
Chang-Eric authored and Dagger Team committed Nov 9, 2021
1 parent e4519f6 commit 608bcba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions java/dagger/internal/codegen/ComponentProcessor.java
Expand Up @@ -105,6 +105,13 @@ public static ComponentProcessor forTesting(Iterable<BindingGraphPlugin> testing
return new ComponentProcessor(testingPlugins);
}

@Override
public void initialize(XProcessingEnv env) {
ProcessorComponent.factory()
.create(env, testingPlugins.orElseGet(this::loadExternalPlugins))
.inject(this);
}

@Override
public SourceVersion getSupportedSourceVersion() {
return SourceVersion.latestSupported();
Expand All @@ -121,10 +128,6 @@ public ImmutableSet<String> getSupportedOptions() {

@Override
public Iterable<XProcessingStep> processingSteps() {
ProcessorComponent.factory()
.create(getXProcessingEnv(), testingPlugins.orElseGet(this::loadExternalPlugins))
.inject(this);

validationBindingGraphPlugins.initializePlugins();
externalBindingGraphPlugins.initializePlugins();

Expand Down
Binary file modified java/dagger/internal/codegen/xprocessing/xprocessing.jar
Binary file not shown.

0 comments on commit 608bcba

Please sign in to comment.