Skip to content

Commit 1cf9dfc

Browse files
Chang-EricDagger Team
authored andcommitted
No longer deprecate unused setter methods on the builder classes. While there was probably good intent behind this, whether or not the dependency is used is not necessarily controlled at the site where the setter method would be called (e.g. in Hilt), so this warning can become spammy and not that useful.
Fixes #3601. RELNOTES=Fixes #3601. No longer adds a deprecation warning for unused dependencies on setters on the component builder. PiperOrigin-RevId: 828180034
1 parent b4bbfb8 commit 1cf9dfc

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

dagger-compiler/main/java/dagger/internal/codegen/writing/ComponentCreatorImplementationFactory.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,6 @@ private XFunSpec noopSetterMethod(ComponentRequirement requirement) {
250250
XFunSpecs.Builder builder = setterMethodBuilder(requirement);
251251
XParameterSpec parameter = getOnlyElement(builder.getParameters());
252252
builder
253-
.addAnnotation(XTypeNames.DEPRECATED)
254-
.addJavadoc(
255-
"@deprecated This module is declared, but an instance is not used in the component. "
256-
+ "This method is a no-op. For more, see https://dagger.dev/unused-modules.\n")
257253
.addStatement(
258254
"%T.checkNotNull(%N)",
259255
XTypeNames.DAGGER_PRECONDITIONS,

0 commit comments

Comments
 (0)