If a suspend function is called from `autoreleasepool {}` block, this
might cause the autoreleasepool frame to be removed earlier than
expected. See https://youtrack.jetbrains.com/issue/KT-50786 for more
details.
^KT-50786 Fixed
* Provide short-circuit methods for contract "EnumEntries contains all
enum entries"
* Make EnumEntries serializable
* Introduce more convenient overload for other backends
#KT-53152
Merge-request: KT-MR-6867
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
Review: https://jetbrains.team/p/kt/reviews/6753
After we migrated to the binary reflect in previous commits we want to
make sure that people won't accidentaly depend on wrong reflect in the
future.
Review: https://jetbrains.team/p/kt/reviews/6753
This dependency substitution was introduced in
5c99243c10 as a way to fight against
non-incremental compilations. Now it's not needed anymore as the
dependency on kotlin-reflect was changed to binary dependency just a few
commits ago.
Review: https://jetbrains.team/p/kt/reviews/6753
Meaningful semantic change was splitted into 5 commits to simplify the
change review. Sinle commit would be too big.
Why replace source to binary: to get rid of kotlin-reflect in Kotlin
plugin artifact KTIJ-22276
Tests that would break if we put reflect from the minimum supported
IDEA into dist:
* Java11ModulesIntegrationTest
* Java17ModulesIntegrationTest
^ Actually, a lot of tests would fail, but I specifically highlight
those two because the "a lot of tests" can be easily fixed by changing
`ForTestCompileRuntime.reflectJarForTests` to:
```
@NotNull
public static File reflectJarForTests() {
return assertExists(new File("libraries/reflect/build/libs/kotlin-reflect-1.7.255-SNAPSHOT.jar"));
}
```
`Java11ModulesIntegrationTest` & `Java11ModulesIntegrationTest` cannot
be fixed in principle because those tests use reflect from dist with
help of `JvmArgumentsKt.configureStandardLibs` (not with help of
`ForTestCompileRuntime`). `JvmArgumentsKt.configureStandardLibs` is
about `-no-stdlib` & `-no-reflect` compiler flags. That's why we have to
pack SNAPSHOT reflect into dist.
Review: https://jetbrains.team/p/kt/reviews/6753
Meaningful semantic change was splitted into 5 commits to simplify the
change review. Sinle commit would be too big.
Why replace source to binary: to get rid of kotlin-reflect in Kotlin
plugin artifact KTIJ-22276
Review: https://jetbrains.team/p/kt/reviews/6753
Meaningful semantic change was splitted into 5 commits to simplify the
change review. Sinle commit would be too big.
Why replace source to binary: to get rid of kotlin-reflect in Kotlin
plugin artifact KTIJ-22276
Other pom.xml in libraries/tools:
* libraries/tools/kotlin-bom/pom.xml
* Used to align user project deps. Should be a SNAPSHOT version
* kotlin-osgi-bundle/pom.xml
* Used by users for OSGI Java modular system. Should be a SNAPSHOT
version
* kotlin-maven-plugin-test/pom.xml
* I don't know what this it but we stopped publishing it to the
Maven central, so I will skip it
Review: https://jetbrains.team/p/kt/reviews/6753
Meaningful semantic change was splitted into 5 commits to simplify the
change review. Sinle commit would be too big.
Why replace source to binary: to get rid of kotlin-reflect in Kotlin
plugin artifact KTIJ-22276
Note: Kotlin Maven artifacts (./gradlew publish) changed their
dependency on kotlin-reflect
Review: https://jetbrains.team/p/kt/reviews/6753
Meaningful semantic change was splitted into 5 commits to simplify the
change review. Sinle commit would be too big.
Why replace source to binary: to get rid of kotlin-reflect in Kotlin
plugin artifact KTIJ-22276
Technically, versions.kotlin-reflect should be the same as in minimal
supported IDEA (which is 213 IDEA and 1.5.10 version of reflect) but,
unfortunatelly, 1.5.10 is too old for the Kotlin repo.
ScriptCompilerTest.testTypeAliases fails if you try to use such an old
version:
java.lang.ClassCastException: kotlin.reflect.jvm.internal.impl.serialization.deserialization.descriptors.DeserializedTypeAliasDescriptor cannot be cast to kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor
at kotlin.reflect.jvm.internal.KClassImpl$Data$nestedClasses$2.invoke(KClassImpl.kt:102)
at kotlin.reflect.jvm.internal.KClassImpl$Data$nestedClasses$2.invoke(KClassImpl.kt:47)
at kotlin.reflect.jvm.internal.ReflectProperties$LazySoftVal.invoke(ReflectProperties.java:92)
at kotlin.reflect.jvm.internal.ReflectProperties$Val.getValue(ReflectProperties.java:31)
at kotlin.reflect.jvm.internal.KClassImpl$Data.getNestedClasses(KClassImpl.kt)
at kotlin.reflect.jvm.internal.KClassImpl.getNestedClasses(KClassImpl.kt:240)
at org.jetbrains.kotlin.scripting.compiler.test.ScriptCompilerTest.testTypeAliases(ScriptCompilerTest.kt:46)
Well, let's use 1.6.10 which is kotlin-reflect bundled into 221.
Review: https://jetbrains.team/p/kt/reviews/6753
Why: I'm going to replace source dependency on kotlin-reflect with
binary dependency. Normalize reflect dependency before global
processing.
Review: https://jetbrains.team/p/kt/reviews/6753
All redundant I managed to find, of course.
Why: I'm going to process all reflect dependencies in the next commits.
Cleanup reflect dependency before processing.
They are redundant because:
1. if `compileOnly` then compilation didn't break after dropping the
dependency
2. if `test*` then tests didn't break after dropping the dependency.
3. `analysis/analysis-api-fir/analysis-api-fir-generator/build.gradle.kts`
`compiler/fir/checkers/checkers-component-generator/build.gradle.kts`
Drop `implementation(project(":kotlin-reflect-api"))` because the
module already depends on
`implementation(project(":kotlin-reflect"))`
4. `compiler/daemon/daemon-client/build.gradle.kts`. Drop `runtimeOnly`
because after dropping `compileOnly` compilation didn't break (so
`runtimeOnly` looks suspicious). Less safe than 1-3
Review: https://jetbrains.team/p/kt/reviews/6753
In the next commits, source dependency on kotlin-reflect will be
replaced with binary dependency. Thus, it won't be technically be a a
"module" anynmore. So I either have to rename "kotlinReflectModule" or
get rid of it. I decided to get rid of it (inline it) because there is
only one usage.
Review: https://jetbrains.team/p/kt/reviews/6753
Use the same reflect dependency as in the rest of the project.
Why: I'm going to process all reflect dependencies in the next commits.
Normalize reflect dependency before processing.
This weird reflect dependency style was introduced in
83087291df. I think it was a simple
mistake.
Review: https://jetbrains.team/p/kt/reviews/6753
I don't know why this settings.gradle.kts is needed. But I think that
it was needed before "kotlin-native merge into kotlin" times. (Pavel
Punegov says the same) I try to remove and if CI doesn't fail then I
will push it.
I need to drop settings.gradle.kts because I'm going to replace
kotlin-reflect dependency from source to binary in the next commits. And
before doing this refactoring I want to normalize all the dependencies
on kotlin-reflect.
Review: https://jetbrains.team/p/kt/reviews/6753
This commit doesn't fix any issue except for "cleanup". If you find a
mistake in this commit feel free to revert part of it/the whole commit
I checked every module where I drop ':dist' dependency. Tests still pass
in those modules
from constructor of kotlinx.serialization ir generator.
Such references may be null if plugin was applied to the module, but no
runtime was provided in current compile configuration (see added test).