KT-11410: Build stdlib with new part/facade inheritance scheme.

This commit is contained in:
Dmitry Petrov
2016-03-17 18:04:21 +03:00
parent db58ebc4b2
commit d30ab50532
4 changed files with 7 additions and 6 deletions
+2 -2
View File
@@ -877,7 +877,7 @@
</target> </target>
<target name="stdlib"> <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> <src>
<include name="libraries/stdlib/src"/> <include name="libraries/stdlib/src"/>
</src> </src>
@@ -926,7 +926,7 @@
</target> </target>
<target name="reflection"> <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> <src>
<include name="core/reflection.jvm/src"/> <include name="core/reflection.jvm/src"/>
</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 !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' Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
stepIntoStdlibFacadeClass.kt:6 stepIntoStdlibFacadeClass.kt:6
ArraysKt.!EXT!
_Arrays.!EXT! _Arrays.!EXT!
Iterables.!EXT!
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket' Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0 Process finished with exit code 0
@@ -28,10 +28,10 @@ class CustomModuleInfoTest : KotlinLightCodeInsightFixtureTestCase() {
fun testModuleInfoForMembersOfLightClassForDecompiledFile() { fun testModuleInfoForMembersOfLightClassForDecompiledFile() {
//NOTE: any class with methods from stdlib will do //NOTE: any class with methods from stdlib will do
val collectionsKtClass = JavaPsiFacade.getInstance(project).findClass("kotlin.collections.CollectionsKt", GlobalSearchScope.allScope(project))!! val tuplesKtClass = JavaPsiFacade.getInstance(project).findClass("kotlin.TuplesKt", GlobalSearchScope.allScope(project))!!
val classModuleInfo = collectionsKtClass.getModuleInfo() val classModuleInfo = tuplesKtClass.getModuleInfo()
Assert.assertTrue(classModuleInfo is LibraryInfo) Assert.assertTrue(classModuleInfo is LibraryInfo)
val methods = collectionsKtClass.methods val methods = tuplesKtClass.methods
Assert.assertTrue(methods.isNotEmpty()) Assert.assertTrue(methods.isNotEmpty())
methods.forEach { methods.forEach {
Assert.assertEquals("Members of decompiled class should have the same module info", classModuleInfo, it.getModuleInfo()) Assert.assertEquals("Members of decompiled class should have the same module info", classModuleInfo, it.getModuleInfo())
+1
View File
@@ -52,6 +52,7 @@
</goals> </goals>
<configuration> <configuration>
<args combine.children="append"> <args combine.children="append">
<arg>-Xmultifile-parts-inherit</arg>
<arg>-Xdump-declarations-to</arg> <arg>-Xdump-declarations-to</arg>
<arg>${basedir}/target/stdlib-declarations.json</arg> <arg>${basedir}/target/stdlib-declarations.json</arg>
</args> </args>