in there runs fine on JVM and native, when I add a
AnalysisHandlerExtension
it's only being run on JVM.
👀 3
s
shikasd
06/03/2020, 10:43 AM
I don't think we have access to analysis handler on native
You can use SyntheticResolve to add parts to classes or some checkers (DeclarationChecker, CallChecker) to run some inspections.
shikasd
06/03/2020, 10:44 AM
Also there is a SyntheticScopes thing which adds some descriptors on call resolution stage (i think). That one should also work on mpp iirc.
r
russhwolf
06/03/2020, 1:12 PM
Ok good to know. A little surprising that you wouldn't have access to the analysis handler on native, since it seems like it should be doing platform-independent things, but I definitely don't have a good understanding of compiler internals so I should be careful making assumptions
s
shikasd
06/03/2020, 1:33 PM
Well, to be fair, your assumption should be true, but some of the compiler APIs were made to accommodate particular use cases.
For example, analysis handler in question is tied to kapt and stubs generation, so not surprising to see it available on jvm only.
shikasd
06/03/2020, 1:35 PM
I think that stable and extensive compiler api is still not the main focus of the team for now. Afaik, they are reworking frontend for now, so maybe after we will get something like IrGenerationExtension but during analysis phase 🤷♂️
r
russhwolf
06/03/2020, 1:38 PM
Yeah fair. Definitely playing with stuff way early at this point. Thanks for the insight.