Fix internal-visibility mangling in IDE
Collect module name properly from facets settings, using CLI arguments
which define module name ('-module-name' on JVM and Common,
'-output-file' on JS).
^KT-23668 Fixed
This commit is contained in:
@@ -25,6 +25,11 @@ interface ModuleDescriptor : DeclarationDescriptor {
|
||||
|
||||
val builtIns: KotlinBuiltIns
|
||||
|
||||
/**
|
||||
* Stable name of *Kotlin* module. Can be used for ABI (e.g. for mangling of declarations)
|
||||
*/
|
||||
val stableName: Name?
|
||||
|
||||
fun shouldSeeInternalsOf(targetModule: ModuleDescriptor): Boolean
|
||||
|
||||
override fun <R, D> accept(visitor: DeclarationDescriptorVisitor<R, D>, data: D): R {
|
||||
|
||||
@@ -35,7 +35,8 @@ class ModuleDescriptorImpl @JvmOverloads constructor(
|
||||
override val builtIns: KotlinBuiltIns,
|
||||
// May be null in compiler context, should be not-null in IDE context
|
||||
multiTargetPlatform: MultiTargetPlatform? = null,
|
||||
capabilities: Map<ModuleDescriptor.Capability<*>, Any?> = emptyMap()
|
||||
capabilities: Map<ModuleDescriptor.Capability<*>, Any?> = emptyMap(),
|
||||
override val stableName: Name? = null
|
||||
) : DeclarationDescriptorImpl(Annotations.EMPTY, moduleName), ModuleDescriptor {
|
||||
init {
|
||||
if (!moduleName.isSpecial) {
|
||||
|
||||
@@ -74,6 +74,12 @@ public class ErrorUtils {
|
||||
return Name.special("<ERROR MODULE>");
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Name getStableName() {
|
||||
return Name.special("<ERROR MODULE>");
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PackageViewDescriptor getPackage(@NotNull FqName fqName) {
|
||||
|
||||
Reference in New Issue
Block a user