Skip to content

Commit

Permalink
Internal changes
Browse files Browse the repository at this point in the history
RELNOTES=n/a
PiperOrigin-RevId: 695785994
  • Loading branch information
wanyingd1996 authored and Dagger Team committed Nov 12, 2024
1 parent fcc6c33 commit a065c9f
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public <T extends ViewModel> T create(

@Override
public ActivityRetainedComponent generatedComponent() {
// TODO(wanyingd): don't need the component lock since the component is stored in ViewModel
// TODO(bcorso): don't need the component lock since the component is stored in ViewModel
// which does its own locking
if (component == null) {
synchronized (componentLock) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private Expression castToRawTypeIfNecessary(Expression delegateExpression, XType
// Casted raw type provider expression has to be wrapped parentheses, otherwise there
// will be an error when DerivedFromFrameworkInstanceRequestRepresentation appends a `get()` to
// it.
// TODO(wanyingd): change the logic to only add parenthesis when necessary.
// TODO(bcorso): change the logic to only add parenthesis when necessary.
return Expression.create(
castedExpression.type(), CodeBlock.of("($L)", castedExpression.codeBlock()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Expression getInjectExpression(Key key, CodeBlock instance, ClassName requesting
}

private Expression injectMethodExpression(Binding binding) {
// TODO(wanyingd): move Switching Providers and injection methods to Shard classes to avoid
// TODO(bcorso): move Switching Providers and injection methods to Shard classes to avoid
// exceeding component class constant pool limit.
// Add to Component Shard so that is can be accessible from Switching Providers.
ShardImplementation shardImplementation = componentImplementation.shardImplementation(binding);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private boolean usesDirectInstanceExpression(RequestKind requestKind) {
// be handled with simple pre-check in the graph. For example, a provider for a subcomponent
// builder is backed with its direct instance, returning framework instance for both cases will
// form a loop. There are also difficulties introduced by manually created framework requests.
// TODO(wanyingd): refactor framework instance so that we don't need to generate both direct
// TODO(bcorso): refactor framework instance so that we don't need to generate both direct
// instance and framework instance representation for the same binding.
if (compilerMode.isFastInit() && graph.topLevelBindingGraph().hasFrameworkRequest(binding)) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ private CodeBlock getContributionExpression(
return (!isSingleValue(dependency)
&& !isTypeAccessibleFrom(
binding.key().type().xprocessing(), requestingClass.packageName())
// TODO(wanyingd): Replace instanceof checks with validation on the binding.
// TODO(bcorso): Replace instanceof checks with validation on the binding.
&& (bindingExpression instanceof DerivedFromFrameworkInstanceRequestRepresentation
|| bindingExpression instanceof DelegateRequestRepresentation))
? CodeBlocks.cast(expression, TypeNames.COLLECTION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public MemberSelect memberSelect() {
return frameworkInstanceSupplier.memberSelect();
}

// TODO(wanyingd): no-op members injector is currently handled in
// TODO(bcorso): no-op members injector is currently handled in
// `MembersInjectorProviderCreationExpression`, we should inline the logic here so we won't create
// an extra field for it.
private MemberSelect staticFactoryCreation(ContributionBinding binding) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static ImmutableList<XMethodElement> getAllNonPrivateInstanceMethods(XTyp
.collect(toImmutableList());
}

// TODO(wanyingd): rename this to getAllMethodsWithoutPrivate, since the private method declared
// TODO(bcorso): rename this to getAllMethodsWithoutPrivate, since the private method declared
// within this element is being filtered out. This doesn't mirror {@code
// MoreElements#getAllMethods}'s behavior but have the same name, and can cause confusion to
// developers.
Expand Down
2 changes: 1 addition & 1 deletion java/dagger/spi/model/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ filegroup(
kt_jvm_library(
name = "model",
srcs = [":model-srcs"],
# TODO(wanyingd): Add javacopts explicitly once kt_jvm_library supports them.
# TODO(bcorso): Add javacopts explicitly once kt_jvm_library supports them.
deps = [
"//java/dagger:core",
"//java/dagger/internal/codegen/extension",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ class KotlinAssistedInjectionTest {
@Component
internal interface TestComponent {
fun fooFactory(): FooFactory

fun fooDataFactory(): FooDataFactory

fun barManagerFactory(): BarManager.Factory

}

@Test
Expand Down

0 comments on commit a065c9f

Please sign in to comment.