Fixed
Status Update
Comments
ya...@gmail.com <ya...@gmail.com> #2
For the time being, make changes directly in the Gradle build files.
mi...@gmail.com <mi...@gmail.com> #3
Just to inform that, intended or not, the second problem described in this issue has been solved in 0.2.1. The first one still needs the workaround from comment #1 .
mi...@gmail.com <mi...@gmail.com> #4
This will be fixed by https://android-review.googlesource.com/#/c/62991/ though renaming modules reveals other problems now, namely that I see it create a second module in the project structure view, so that you have two -- one with the old name and one with the new name. I think this is happening because when you rename the directory, not the module (which is the change that needs to be reflected in the settings.gradle file), it doesn't actually rename the module itself. But when the Gradle builder sees the changed settings.gradle and re-imports, it creates a second module with the new name.
The real problem here is that IJ supports modules with a name different from their root directory, and Gradle does not. I wonder if we should disable that facility for Android Studio. I wonder how readily we can.
At any rate, Alex said there were changes in flight that would affect this. Once this is checked in and the other dust settles, I'll file more bugs against what it's still doing wrong. In the meantime I'll leave this open as we can't declare victory yet.
The real problem here is that IJ supports modules with a name different from their root directory, and Gradle does not. I wonder if we should disable that facility for Android Studio. I wonder how readily we can.
At any rate, Alex said there were changes in flight that would affect this. Once this is checked in and the other dust settles, I'll file more bugs against what it's still doing wrong. In the meantime I'll leave this open as we can't declare victory yet.
gc...@google.com <gc...@google.com>
mi...@gmail.com <mi...@gmail.com> #5
Trying to rename a module brings up an intermediate dialog which asks if you want to rename the directory or the module. If you choose "module", it just renames it in the IML, and bad things happen. This dialog should be removed and renaming the directory should be the only option.
Description
I've attached the byte code listing as well, though the place that Jack won't compile is fairly different each time. I also tried running Jack from the ub-jack-lang-dev branch, result is the same.
> ls -1
Person.java
android-runtime.jar // After jill processing
kotlin-runtime.jar // Version is not significant. 1.0.0-beta-2423 is ok
> cat Person.java // Simple Java class
package test;
public class Person {
public final String name;
public Person(String name) {
}
}
> java -jar $ANDROID_HOME/build-tools/23.0.2/jill.jar --output kotlin-runtime.jill.jar kotlin-runtime.jar
> java -jar $ANDROID_HOME/build-tools/23.0.2/jack.jar -D jack.dex=true -D jack.dex.output.container=zip -D jack.dex.output.zip=dex.zip --import kotlin-runtime.jill.jar -cp android-runtime.jar:kotlin-runtime.jill.jar Person.java
SEVERE: com.android.jack.CommandLine: Internal compiler error (version 1.1-mr2 'Brest' (175100 000a2f91edbe638090dc577801ba49592229fd8b)):
com.android.sched.scheduler.RunnerProcessException: Error during 'TypeLegalizer' runner on 'public int kotlin.ComparisonsKt$thenBy$2.compare(java.lang.Object a, java.lang.Object b) (Ordering.kt:152-312)': Unexpected error during visit: com.android.jack.ir.ast.JAsgOperation at "Ordering.kt:153-154"
at com.android.sched.scheduler.ScheduleInstance.runWithLog(ScheduleInstance.java:156)
at com.android.sched.scheduler.MultiWorkersScheduleInstance$SequentialTask.process(MultiWorkersScheduleInstance.java:408)
at com.android.sched.scheduler.MultiWorkersScheduleInstance$Worker.run(MultiWorkersScheduleInstance.java:143)
Caused by: com.android.jack.ir.JNodeInternalError: Unexpected error during visit: com.android.jack.ir.ast.JAsgOperation at "Ordering.kt:153-154"
at com.android.jack.ir.ast.JVisitor.wrapException(JVisitor.java:97)
at com.android.jack.ir.ast.JVisitor.accept(JVisitor.java:54)
at com.android.jack.ir.ast.JExpressionStatement.traverse(JExpressionStatement.java:54)
at com.android.jack.ir.ast.JVisitor.accept(JVisitor.java:61)
at com.android.jack.ir.ast.JBlock.traverse(JBlock.java:41)
at com.android.jack.ir.ast.JVisitor.accept(JVisitor.java:50)
at com.android.jack.ir.ast.JMethodBody.traverse(JMethodBody.java:96)
at com.android.jack.ir.ast.JVisitor.accept(JVisitor.java:50)
at com.android.jack.ir.ast.JMethod.visitChildren(JMethod.java:323)
at com.android.jack.ir.ast.JMethod.traverse(JMethod.java:249)
at com.android.jack.ir.ast.JVisitor.accept(JVisitor.java:50)
at com.android.jack.transformations.ast.TypeLegalizer.run(TypeLegalizer.java:516)
at com.android.jack.transformations.ast.TypeLegalizer.run(TypeLegalizer.java:71)
at com.android.sched.scheduler.ScheduleInstance.runWithLog(ScheduleInstance.java:154)
... 2 more
Caused by: java.lang.AssertionError
at com.android.jack.transformations.ast.TypeLegalizer$TypeLegalizerVisitor.unbox(TypeLegalizer.java:395)
at com.android.jack.transformations.ast.TypeLegalizer$TypeLegalizerVisitor.maybeBoxOrUnbox(TypeLegalizer.java:338)
at com.android.jack.transformations.ast.TypeLegalizer$TypeLegalizerVisitor.endVisit(TypeLegalizer.java:192)
at com.android.jack.ir.ast.JBinaryOperation.traverse(JBinaryOperation.java:70)
at com.android.jack.ir.ast.JVisitor.accept(JVisitor.java:50)
... 14 more
com.android.sched.scheduler.RunnerProcessException: Error during 'TypeLegalizer' runner on 'public int kotlin.ComparisonsKt$thenBy$2.compare(java.lang.Object a, java.lang.Object b) (Ordering.kt:152-312)': Unexpected error during visit: com.android.jack.ir.ast.JAsgOperation at "Ordering.kt:153-154"
at com.android.sched.scheduler.ScheduleInstance.runWithLog(ScheduleInstance.java:156)
at com.android.sched.scheduler.MultiWorkersScheduleInstance$SequentialTask.process(MultiWorkersScheduleInstance.java:408)
at com.android.sched.scheduler.MultiWorkersScheduleInstance$Worker.run(MultiWorkersScheduleInstance.java:143)
Caused by: com.android.jack.ir.JNodeInternalError: Unexpected error during visit: com.android.jack.ir.ast.JAsgOperation at "Ordering.kt:153-154"
at com.android.jack.ir.ast.JVisitor.wrapException(JVisitor.java:97)
at com.android.jack.ir.ast.JVisitor.accept(JVisitor.java:54)
at com.android.jack.ir.ast.JExpressionStatement.traverse(JExpressionStatement.java:54)
at com.android.jack.ir.ast.JVisitor.accept(JVisitor.java:61)
at com.android.jack.ir.ast.JBlock.traverse(JBlock.java:41)
at com.android.jack.ir.ast.JVisitor.accept(JVisitor.java:50)
at com.android.jack.ir.ast.JMethodBody.traverse(JMethodBody.java:96)
at com.android.jack.ir.ast.JVisitor.accept(JVisitor.java:50)
at com.android.jack.ir.ast.JMethod.visitChildren(JMethod.java:323)
at com.android.jack.ir.ast.JMethod.traverse(JMethod.java:249)
at com.android.jack.ir.ast.JVisitor.accept(JVisitor.java:50)
at com.android.jack.transformations.ast.TypeLegalizer.run(TypeLegalizer.java:516)
at com.android.jack.transformations.ast.TypeLegalizer.run(TypeLegalizer.java:71)
at com.android.sched.scheduler.ScheduleInstance.runWithLog(ScheduleInstance.java:154)
... 2 more
Caused by: java.lang.AssertionError
at com.android.jack.transformations.ast.TypeLegalizer$TypeLegalizerVisitor.unbox(TypeLegalizer.java:395)
at com.android.jack.transformations.ast.TypeLegalizer$TypeLegalizerVisitor.maybeBoxOrUnbox(TypeLegalizer.java:338)
at com.android.jack.transformations.ast.TypeLegalizer$TypeLegalizerVisitor.endVisit(TypeLegalizer.java:192)
at com.android.jack.ir.ast.JBinaryOperation.traverse(JBinaryOperation.java:70)
at com.android.jack.ir.ast.JVisitor.accept(JVisitor.java:50)
... 14 more
Internal compiler error (version 1.1-mr2 'Brest' (175100 000a2f91edbe638090dc577801ba49592229fd8b)).
Error during 'TypeLegalizer' runner on 'public int kotlin.ComparisonsKt$thenBy$2.compare(java.lang.Object a, java.lang.Object b) (Ordering.kt:152-312)': Unexpected error during visit: com.android.jack.ir.ast.JAsgOperation at "Ordering.kt:153-154".
Warning: This may have produced partial or corrupted output.