Replies: 3 comments 2 replies
-
Correct, these work differently across the two libraries and a dual implementation isn't likely going to work. |
Beta Was this translation helpful? Give feedback.
-
|
OK. So it seems unlikely that i'll be able to do a phased migration with stuff like this. I'm trying to encourage us to get rid of our subcomponents anyway. We're a very large dev team, and subcomponents add a bunch of learning curve for devs that don't understand the DI system very well. |
Beta Was this translation helpful? Give feedback.
-
|
I've noticed some other things as well, which i'll note in this discussion, just in case they are not intended behaviors: It seems like @Component.Builder is not supported when Csnnot be used with I assume this is intentional, and it makes sense. Just wanted to mention it here. I also tried removing the So it seems like you kind of need to be an all or nothing in a give component hierarchy with metro. YOu either need to be all metro, or all dagger. Just an observation. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I am evaluating the LOE it would take us to migrate from the ksp anvil fork to metro.
Let me start by saying that we have a huge project, and we're looking to minimize the blast radius on changes if we can. I'd like to make as many changes upfront as we can to the existing ksp anvil config and use compatibility mode to start using metro, and cleanup everything over time so we can turn that off.
My hopes had been to do a bunch of prep-work up front and avoid a PR with 100+ files changed. I'm just looking for creative ways to have a PR that doesn't trigger a mess of congitive overload on my team.
And i do realize the docs recommend migrating to @DependencyGraph if you use subcomponents.
All that said, i was trying to do some of that upfront work, and I encountered some issues with subcomponents and how they contribute their factories to the app component
I'm not sure if i'm doing something wrong, or if this is just a case where I have to bite the bullet on moving to DependencyGraph and having one big PR for all that migration (what we're trying to avoid).
Whatever the answer is, I'm just looking for some clarity on if I'm doing something wrong or not.
Self-contained Reproducer
app module component:
lib module contributed subcomponent:
The resulting compile error
I can move the
@ContributesToon the subcomponent to the Factory interface, and that works, but it doesn't work with ksp anvil, so it's not a change i can make up front. At that point, i might as well just go full bore on using DependencyGraph instead.Metro version
0.6.3
Context
No response
Beta Was this translation helpful? Give feedback.
All reactions