Starting from 1.6.0 the compiler supports three previous API versions, i.e., 1.3, 1.4, 1.5. Note that it's only about API versions, two previous language versions are supported as previously. See KT-49006 for details.
^KTIJ-19978 Fixed
GitOrigin-RevId: e1ba99ac25135959d8b81287850798a222643c88
Original commit: https://github.com/JetBrains/intellij-community/commit/d256c4653ab5aa730e522d282aed49a83f0c99f8
Possibility to use JDK 9 was dropped in the Kotlin repo in
this commit de7fb9606a so I had to migrate this test.
Consulted with @udalov. He said that it's fine to migrate this test to JDK 11
Original fix in IJ repo: https://github.com/JetBrains/intellij-community/commit/40fb0da80ee4687a6478d43709147ea8dc5570c7
Test example: IncrementalJvmJpsTestGenerated.ClassHierarchyAffected#testEnumEntryRemoved
Test failure output example:
```
Initial make failed:
MakeResult(log=Compiling files:
src/Enum.kt
src/getRandomEnumEntry.kt
src/use.kt
src/useEnumImplicitly.kt
End of files
Exit code: ABORT
------------------------------------------
COMPILATION FAILED
Cannot access 'java.io.Serializable' which is a supertype of 'Enum'. Check your module classpath for missing or conflicting dependencies
Cannot access 'java.io.Serializable' which is a supertype of 'Enum.A'. Check your module classpath for missing or conflicting dependencies
Cannot access 'java.io.Serializable' which is a supertype of 'Enum.B'. Check your module classpath for missing or conflicting dependencies
Cannot access 'java.io.Serializable' which is a supertype of 'Enum.C'. Check your module classpath for missing or conflicting dependencies
Cannot access 'java.io.Serializable' which is a supertype of 'kotlin.Array'. Check your module classpath for missing or conflicting dependencies
Cannot access 'java.io.Serializable' which is a supertype of 'Enum'. Check your module classpath for missing or conflicting dependencies
, makeFailed=true, mappingsDump=null, name=null)junit.framework.AssertionFailedError: Initial make failed:
MakeResult(log=Compiling files:
src/Enum.kt
src/getRandomEnumEntry.kt
src/use.kt
src/useEnumImplicitly.kt
End of files
Exit code: ABORT
------------------------------------------
COMPILATION FAILED
Cannot access 'java.io.Serializable' which is a supertype of 'Enum'. Check your module classpath for missing or conflicting dependencies
Cannot access 'java.io.Serializable' which is a supertype of 'Enum.A'. Check your module classpath for missing or conflicting dependencies
Cannot access 'java.io.Serializable' which is a supertype of 'Enum.B'. Check your module classpath for missing or conflicting dependencies
Cannot access 'java.io.Serializable' which is a supertype of 'Enum.C'. Check your module classpath for missing or conflicting dependencies
Cannot access 'java.io.Serializable' which is a supertype of 'kotlin.Array'. Check your module classpath for missing or conflicting dependencies
Cannot access 'java.io.Serializable' which is a supertype of 'Enum'. Check your module classpath for missing or conflicting dependencies
, makeFailed=true, mappingsDump=null, name=null)
at junit.framework.Assert.fail(Assert.java:57)
at junit.framework.Assert.assertTrue(Assert.java:22)
at junit.framework.Assert.assertFalse(Assert.java:39)
at junit.framework.TestCase.assertFalse(TestCase.java:210)
at org.jetbrains.kotlin.jps.build.AbstractIncrementalJpsTest.initialMake(AbstractIncrementalJpsTest.kt:240)
at org.jetbrains.kotlin.jps.build.AbstractIncrementalJpsTest.doTest(AbstractIncrementalJpsTest.kt:333)
at org.jetbrains.kotlin.test.KotlinTestUtils.lambda$testWithCustomIgnoreDirective$4(KotlinTestUtils.java:522)
at org.jetbrains.kotlin.test.KotlinTestUtils.runTestImpl(KotlinTestUtils.java:492)
at org.jetbrains.kotlin.test.KotlinTestUtils.runTest0(KotlinTestUtils.java:473)
at org.jetbrains.kotlin.test.KotlinTestUtils.runTest(KotlinTestUtils.java:457)
at org.jetbrains.kotlin.jps.build.IncrementalJvmJpsTestGenerated$ClassHierarchyAffected.runTest(IncrementalJvmJpsTestGenerated.java:2979)
at org.jetbrains.kotlin.jps.build.IncrementalJvmJpsTestGenerated$ClassHierarchyAffected.testEnumEntryRemoved(IncrementalJvmJpsTestGenerated.java:3063)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:566)
at junit.framework.TestCase.runTest(TestCase.java:176)
at com.intellij.testFramework.UsefulTestCase.lambda$runBare$10(UsefulTestCase.java:473)
at com.intellij.testFramework.UsefulTestCase.lambda$wrapTestRunnable$12(UsefulTestCase.java:493)
at com.intellij.testFramework.UsefulTestCase.runTestRunnable(UsefulTestCase.java:406)
at org.jetbrains.kotlin.jps.build.BaseKotlinJpsBuildTestCase.access$runTestRunnable$s-943794013(BaseKotlinJpsBuildTestCase.kt:34)
at org.jetbrains.kotlin.jps.build.BaseKotlinJpsBuildTestCase$runTestRunnable$1.invoke(BaseKotlinJpsBuildTestCase.kt:73)
at org.jetbrains.kotlin.jps.build.BaseKotlinJpsBuildTestCase$runTestRunnable$1.invoke(BaseKotlinJpsBuildTestCase.kt:72)
at org.jetbrains.kotlin.test.MuteWithDatabaseKt.runTest(muteWithDatabase.kt:96)
at org.jetbrains.kotlin.jps.build.BaseKotlinJpsBuildTestCase.runTestRunnable(BaseKotlinJpsBuildTestCase.kt:72)
at com.intellij.testFramework.UsefulTestCase.defaultRunBare(UsefulTestCase.java:422)
at com.intellij.testFramework.UsefulTestCase.lambda$runBare$11(UsefulTestCase.java:481)
at com.intellij.testFramework.EdtTestUtil.lambda$runInEdtAndWait$1(EdtTestUtil.java:40)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:303)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.awt.EventQueue$4.run(EventQueue.java:721)
at java.awt.EventQueue$4.run(EventQueue.java:715)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:421)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
```
IntelliJ uses Java 11 so it forces us to use Java 11 in JPS
This commit fixes:
```
public class DataContainerVersionChangedTestGenerated extends AbstractDataContainerVersionChangedTest {
^
bad class file: /home/bobko/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.platform/test-framework/203.8084.24/ba5c6b3b0eae0a083dc30e866c362094f5072853/test-framework-203.8084.24.jar(com/intellij/testFramework/UsefulTestCase.class)
class file has wrong version 55.0, should be 52.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
```
This commit fixes deprecation API usage (deprecated in intellij) which is actually
an error (because of -Werror)
KotlinJavaBuilderExtension implements only one method (getConstantSearch) which is
deprecated and the method is actually not called in since 202 IDEA (minimum
supported IDEA right now is 203).
KotlinJavaBuilderExtension originally appeared in 39f7ecc9a3
in order to fix KT-16091. The fact that we ignored the depreaction caused the issue
regression. Luckily, we already fixes the issue again but this API usage is useless so
can be safely droped
When anonymous class is used then attempt to run all tests ends up with:
```
Internal Error occurred.
org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-vintage' failed to discover tests
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:160)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverSafely(EngineDiscoveryOrchestrator.java:134)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:108)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:80)
at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:110)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
Caused by: org.junit.platform.commons.JUnitException: ClassSelector [className = 'org.jetbrains.kotlin.jps.build.RelocatableJpsCachesTest$runTestAndCopyKotlinCaches$testCase$1'] resolution failed
at org.junit.platform.launcher.listeners.discovery.AbortOnFailureLauncherDiscoveryListener.selectorProcessed(AbortOnFailureLauncherDiscoveryListener.java:39)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:102)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.run(EngineDiscoveryRequestResolution.java:82)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver.resolve(EngineDiscoveryRequestResolver.java:113)
at org.junit.vintage.engine.discovery.VintageDiscoverer.discover(VintageDiscoverer.java:42)
at org.junit.vintage.engine.VintageTestEngine.discover(VintageTestEngine.java:64)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:152)
... 13 more
Caused by: org.junit.platform.commons.PreconditionViolationException: displayName must not be null or blank
at org.junit.platform.commons.util.Preconditions.condition(Preconditions.java:281)
at org.junit.platform.commons.util.Preconditions.notBlank(Preconditions.java:249)
at org.junit.platform.engine.support.descriptor.AbstractTestDescriptor.<init>(AbstractTestDescriptor.java:89)
at org.junit.vintage.engine.descriptor.VintageTestDescriptor.<init>(VintageTestDescriptor.java:53)
at org.junit.vintage.engine.descriptor.RunnerTestDescriptor.<init>(RunnerTestDescriptor.java:50)
at org.junit.vintage.engine.discovery.ClassSelectorResolver.createRunnerTestDescriptor(ClassSelectorResolver.java:79)
at org.junit.vintage.engine.discovery.ClassSelectorResolver.lambda$resolveTestClass$1(ClassSelectorResolver.java:70)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution$DefaultContext.createAndAdd(EngineDiscoveryRequestResolution.java:246)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution$DefaultContext.addToParent(EngineDiscoveryRequestResolution.java:209)
at org.junit.vintage.engine.discovery.ClassSelectorResolver.resolveTestClass(ClassSelectorResolver.java:70)
at org.junit.vintage.engine.discovery.ClassSelectorResolver.resolve(ClassSelectorResolver.java:47)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.lambda$resolve$2(EngineDiscoveryRequestResolution.java:134)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1632)
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:185)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:125)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:91)
... 18 more
```
GitOrigin-RevId: 80ff99794a65c49619888a2bcc4398683ef82f67
Original commit: https://github.com/JetBrains/intellij-community/commit/220690ba53f8772499603b082f92b28138a25716
* I failed to find any implementations of this interface
* API Watcher doesn't show any implementations either
* Any meaningful code changes around this extension point
hasn't been ever done since it's introduction in 2014
The extension point was once used in Android Extensions, as they supported JPS.
Since that time, JPS support was practically dropped in Android projects, and
we decided to delete the extension.
GitOrigin-RevId: 170c97194b27152189ce05b828a53116b746db38
Original commit: https://github.com/JetBrains/intellij-community/commit/248c9b4947f7ea535d5f70e511554b05851f7ec7