-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support KSP in factory generation #751
Comments
👋 I'll be taking |
👋🏻 I'll be taking |
May I ask? Is this about not having to use
such that one would then use |
That wouldn't be enough as you still need anvil's hint generation for contributed elements |
…and assisted injection (#795) These were done together as they are linked. Tried to share code where possible, but there are some meaty parts in dagger generation util that I couldn't really easily share much. Note that one test is disabled in KSP until binding module generation supports KSP, and I felt it best to save that for a later PR since that generator requires some reworking to avoid class merging during generation. I also fixed a few mis-named files along the way. Ref: #751
@ZacSweers |
Sure! The last two are gnarly, so it make take a bigger lift. I can write up more about them tomorrow |
So the main issue is that both of those generates require doing class scanning, which complicates things in KSP due to it processing nodes that are not in the compilation source set. This is obviously necessary for module/component merging, but ideally shouldn't be necessary for any of the factory generators. BindingModuleGenerator This is the one that requires the most change. Currently Anvil will scan within the package and generate one module for all the contributed bindings. This is a greedy aggregating step, and after some discussion with @vRallev we agreed this should be simplified to just generate 1:1 mappings of a The bulk of the work would be to adopt this new model, then implement dual KSP support afterward. ContributesSubcomponentHandlerGenerator and ContributesSubcomponentGenerator This is support for |
I'm gonna take ContributesSubcomponentGenerator next since it's trivial |
|
Thanks! |
@ZacSweers Is there anything that should be done? I can take another task if there's one 🙂 |
The last big one will be |
@IlyaGulya fyi I've actually started working on |
Does #831 merge means that all points are done now? Maybe there are some other follow-up tasks. |
yup! |
There's still some work to do around subcomponent contribution, but that's more about the plugin wiring side rather than the impl itself |
This issue is to track KSP support in factory gen, and different from #704
The text was updated successfully, but these errors were encountered: