Jonathan Gerrish
12/28/2020, 6:10 PMshikasd
12/28/2020, 6:57 PMJonathan Gerrish
12/28/2020, 8:09 PMshikasd
12/28/2020, 8:18 PMkotlinLibrary
should be for klib
dependencies rather than jars :)Jonathan Gerrish
12/28/2020, 8:41 PMclass Foo {
var bar = Bar()
}
Foo + Bar are in different modules.
I can get the `ClassDescriptor`for `Bar`but then classDescriptor.module.name
== <dependencies of foo>
and ModuleDescriptor.moduleInfo == null
.shikasd
12/29/2020, 5:50 PMJonathan Gerrish
12/30/2020, 5:19 PMRemappingClassBuilder
and are able to write out dependencies for most usages. One thing we can't track though is stuff that has already been inlined by the compiler such as references to `const val FOO = 42`since `FOO`has already been replaced with `42`at this stage. Can you suggest a way to capture this information before the inlining occurs? Is this something we need to parse in AnalysisHandlerExtension.doAnalysis(...)
Jonathan Gerrish
12/30/2020, 5:20 PMshikasd
12/30/2020, 5:30 PMJonathan Gerrish
12/30/2020, 5:34 PMshikasd
12/30/2020, 5:59 PMshikasd
12/30/2020, 6:00 PMJonathan Gerrish
01/02/2021, 5:33 PMBindingTrace
- is there something I'm missing? Instead I just enumerated over the Files and pulled the import declarations. Obviously that's not complete (it will miss FQN usages) but it gets us started. I haven't taken a look at using `DeclarationChecker`/ CallChecker
- needing to check the PSI - would that be expensive?Jonathan Gerrish
01/02/2021, 5:39 PMshikasd
01/02/2021, 5:55 PMMap<Slice<Key, Value>, Map<Key, Value>>
Slices here is used to retrieve that inner map which you can iterate on (e.g. BindingContext.CLASS, which provides connection between KtClass and ClassDescriptors). This info is provided by DeclarationCheckers anyway, so I probably wouldn't bother.shikasd
01/02/2021, 5:57 PMJonathan Gerrish
01/02/2021, 6:07 PM