Add debug strings to frontend scopes-related structures
Such as: - PackageFragmentProviders, and, in particular, CompositePackageFragmentProviders - JavaPackageFragments - Scopes produced by those providers The rationale is that a lot of frontend-facing bugs (like red code) are easily recognizeable in resolution. But at that point you just see a bunch of scopes, without meaningful toStrings, you don't know who has produced them, and what's exactly wrong. With this commit it should make debugging slightly easier: now at least you'll be able to see that "this scope is a scope of package fragment for foo.bar of module baz" and decide whether the declaration should or should not have been resolved from such scope.
This commit is contained in:
committed by
teamcityserver
parent
a51c65ed60
commit
708fead1cc
@@ -66,7 +66,9 @@ fun createContainerForJS(
|
||||
val packagePartProviders = mutableListOf(get<KotlinCodeAnalyzer>().packageFragmentProvider)
|
||||
val moduleDescriptor = get<ModuleDescriptorImpl>()
|
||||
packagePartProviders += additionalPackages
|
||||
moduleDescriptor.initialize(CompositePackageFragmentProvider(packagePartProviders))
|
||||
moduleDescriptor.initialize(
|
||||
CompositePackageFragmentProvider(packagePartProviders, "CompositeProvider@createContainerForJS for $moduleDescriptor")
|
||||
)
|
||||
}
|
||||
return storageComponentContainer
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user