Make ModuleDescriptor#getPackage() return not null lazy object with lazy scope
Refactor: no need to create package view in order to obtain its subpackages LazyPackageViewDescriptorImpl to replace PackageViewDescriptorImpl This allows to avoid computations when package views are requested but their contents not necessarily queried For example: DescriptorResolver.resolvePackageHeader()
This commit is contained in:
+1
-1
@@ -101,7 +101,7 @@ public object KotlinJavascriptSerializationUtil {
|
||||
KotlinJavascriptMetadataUtils.formatMetadataAsString(moduleName, moduleDescriptor.toBinaryMetadata())
|
||||
|
||||
fun serializePackage(module: ModuleDescriptor, fqName: FqName, writeFun: (String, ByteArrayOutputStream) -> Unit) {
|
||||
val packageView = module.getPackage(fqName) ?: error("No package resolved in $module")
|
||||
val packageView = module.getPackage(fqName)
|
||||
|
||||
val skip: (DeclarationDescriptor) -> Boolean = { DescriptorUtils.getContainingModule(it) != module }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user