The problem is that JvmRecord has SOURCE retention
Probably, increasing its retention might be a more reliable solution
(or in some other way serializing that the class is a record)
Just checking supertypes seems like a reasonable approximation:
only records kotlin are allowed to extend j.l.Record.
But the relevant diagnostic has been added only since 1.4.30,
so potentially there could have been exist a non-record class with
such supertype compiled by 1.4.20, but this case seems to be ill-formed
and marginal anyway.
For Java classes, it's irrelevant since they don't have member properties
(only synthetic extensions)
^KT-43677 In Progress
This commit adds relevant functions: hashCode, toString, equals
(if the class is not a data class)
And supertype j.l.Record
It only affects descriptor contents, i.e. works for FE
^KT-43677 In Progress
It's necessary to read preview-features related Java PSI parts
It should be OK to set it unconditionally because we don't compile Java
sources, only obtain declaration structure from them
'allopen' compiler plug-in can make data classes and their members open,
which is a compilation error in usual case, but makes sense for Spring
and other frameworks that generate proxy-classes.
There was an error during "Generate Compiler Tests" execution:
Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: compiler\testData\codegen\box\ranges\expression\inexactDownToMinValue.kt
The error was probable caused by parallel execution of tasks:compiler:generateTests and :js:js.tests:generateTests.
Exception could occur when GenerateRangesCodegenTestData.main(args) has
just removed directory with test data for regeneration but
:js:js.tests:generateTests had already seen files present.
#KTI-404 Fixed
Use custom project descriptor instead.
Mitingate flaky failures:
ERROR: Save settings failed
java.lang.RuntimeException: java.io.IOException: Cannot save /test_path/test.ipr.
Unable to open the file for writing.
at com.intellij.util.ExceptionUtil.rethrow(ExceptionUtil.java:116)
at com.intellij.util.lang.CompoundRuntimeException.throwIfNotEmpty(CompoundRuntimeException.java:106)
at com.intellij.configurationStore.SaveResult.throwIfErrored(SaveResult.kt:59)
at com.intellij.configurationStore.ComponentStoreImpl.save$suspendImpl(ComponentStoreImpl.kt:152)
at com.intellij.configurationStore.ComponentStoreImpl$save$1.invokeSuspend(ComponentStoreImpl.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:84)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at com.intellij.configurationStore.StoreUtil$Companion.saveSettings(storeUtil.kt:44)
at com.intellij.configurationStore.StoreUtil.saveSettings(storeUtil.kt)
at com.intellij.openapi.project.impl.ProjectImpl.save(ProjectImpl.java:157)
at org.jetbrains.kotlin.idea.codeInsight.generate.AbstractGenerateTestSupportMethodActionTest$setUpTestSourceRoot$1.invoke(AbstractGenerateTestSupportMethodActionTest.kt:22)
at org.jetbrains.kotlin.idea.codeInsight.generate.AbstractGenerateTestSupportMethodActionTest$setUpTestSourceRoot$1.invoke(AbstractGenerateTestSupportMethodActionTest.kt:20)