-
Notifications
You must be signed in to change notification settings - Fork 239
Implement Jdeps using K2 APIs #1166
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
Conversation
|
This generally looks fine, but I would prefer to wait until the dependencies are out of RC. Additionally, we have some concerns about backwards compatibility -- I am looking to setup several older version test for our CI. |
|
@jbarr21 Kotlin 2.0 is officially out, are you able to push this PR forward using the official release? |
| class ClassUsageRecorder( | ||
| internal val explicitClassesCanonicalPaths: MutableSet<String> = mutableSetOf(), | ||
| internal val implicitClassesCanonicalPaths: MutableSet<String> = mutableSetOf(), | ||
| private val seen: MutableSet<ClassId> = mutableSetOf(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be unused, is that intentional?
|
I was able to get an app building within our Android repo using this PR and the K2 Jdps implementation, so we should be good to merge this now. |
This PR moves the kotlin_rules to Kotlin 2.0.0 & adds support for running Jdeps when compiling with K2 (#843).
High level list of changes:
JdepsGenExtension2which leveragesFirAdditionalCheckersplugin extension to collect info from the FIR treeClassUsageRecorderto manage collection of AST infoClassUsageRecorderis init in the registrar & dumped to a proto on theClassFileFactoryFinalizerExtensioncallback since there is no longer aonAnalysisCompletedcallback in K2FirClassSymbol,FirTypeRef, &ConeKotlinTypewhich is then pushed into theClassUsageRecorderso that supertypes & type args can also be collected, if necessaryJdepsGenComponentRegistrarto invoke K1 or K2 impl based on language version set in the kotlinc configuration