KT-11410: Build stdlib with new part/facade inheritance scheme.
This commit is contained in:
@@ -877,7 +877,7 @@
|
||||
</target>
|
||||
|
||||
<target name="stdlib">
|
||||
<new-kotlinc output="${output}/classes/stdlib" moduleName="kotlin-stdlib" additionalOptions="-Xdump-declarations-to ${output}/declarations/stdlib-declarations.json">
|
||||
<new-kotlinc output="${output}/classes/stdlib" moduleName="kotlin-stdlib" additionalOptions="-Xmultifile-parts-inherit -Xdump-declarations-to ${output}/declarations/stdlib-declarations.json">
|
||||
<src>
|
||||
<include name="libraries/stdlib/src"/>
|
||||
</src>
|
||||
@@ -926,7 +926,7 @@
|
||||
</target>
|
||||
|
||||
<target name="reflection">
|
||||
<new-kotlinc output="${output}/classes/reflection" moduleName="kotlin-reflection" additionalOptions="-Xdump-declarations-to ${output}/declarations/reflect-declarations.json">
|
||||
<new-kotlinc output="${output}/classes/reflection" moduleName="kotlin-reflection">
|
||||
<src>
|
||||
<include name="core/reflection.jvm/src"/>
|
||||
</src>
|
||||
|
||||
@@ -2,8 +2,8 @@ LineBreakpoint created at stepIntoStdlibFacadeClass.kt:6
|
||||
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stepIntoStdlibFacadeClass.StepIntoStdlibFacadeClassKt
|
||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
stepIntoStdlibFacadeClass.kt:6
|
||||
ArraysKt.!EXT!
|
||||
_Arrays.!EXT!
|
||||
Iterables.!EXT!
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
@@ -28,10 +28,10 @@ class CustomModuleInfoTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
|
||||
fun testModuleInfoForMembersOfLightClassForDecompiledFile() {
|
||||
//NOTE: any class with methods from stdlib will do
|
||||
val collectionsKtClass = JavaPsiFacade.getInstance(project).findClass("kotlin.collections.CollectionsKt", GlobalSearchScope.allScope(project))!!
|
||||
val classModuleInfo = collectionsKtClass.getModuleInfo()
|
||||
val tuplesKtClass = JavaPsiFacade.getInstance(project).findClass("kotlin.TuplesKt", GlobalSearchScope.allScope(project))!!
|
||||
val classModuleInfo = tuplesKtClass.getModuleInfo()
|
||||
Assert.assertTrue(classModuleInfo is LibraryInfo)
|
||||
val methods = collectionsKtClass.methods
|
||||
val methods = tuplesKtClass.methods
|
||||
Assert.assertTrue(methods.isNotEmpty())
|
||||
methods.forEach {
|
||||
Assert.assertEquals("Members of decompiled class should have the same module info", classModuleInfo, it.getModuleInfo())
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
</goals>
|
||||
<configuration>
|
||||
<args combine.children="append">
|
||||
<arg>-Xmultifile-parts-inherit</arg>
|
||||
<arg>-Xdump-declarations-to</arg>
|
||||
<arg>${basedir}/target/stdlib-declarations.json</arg>
|
||||
</args>
|
||||
|
||||
Reference in New Issue
Block a user