CHANGELOG

1.6.0-M1

Android

  • KT-48019 Bundle Kotlin Tooling Metadata into apk artifacts
  • KT-47733 JVM / IR: Android Synthetic don't generate _findCachedViewById function

Compiler

New Features

  • KT-12794 Allow runtime retention repeatable annotations when compiling under Java 8
  • KT-47984 In-place arguments inlining for @InlineOnly functions
  • KT-48194 Try to resolve calls where we don't have enough type information, using the builder inference despite the presence of the annotation
  • KT-26245 Add ability to specify generic type parameters as not-null
  • KT-45949 Kotlin/Native: Improve bound check elimination
  • KT-47699 Support programmatic creation of class annotations and corresponding feature flag on JVM
  • KT-47736 Support conversion from regular functional types to suspending ones in JVM IR
  • KT-39055 Support property delegate created via synthetic method instead of field

Performance Improvements

  • KT-33835 Bytecode including unnecessary null checks for safe calls where left-hand side is non-nullable
  • KT-41510 Compilation of kotlin html DSL is still too slow
  • KT-48211 We spend a lot of time in ExpectActual declaration checker when there is very small amount of actual/expect declaration
  • KT-39054 Optimize delegated properties which call get/set on the given KProperty instance on JVM
  • KT-47918 JVM / IR: Performance degradation with const-bound for-cycles
  • KT-47785 Compilation time increased when trying to compile AssertJ DB expression in 1.5.21
  • KT-46615 Don't generate nullability assertions in methods for directly invoked lambdas

Fixes

  • KT-48523 Kotlin/Native: cross-compilation from Linux to MinGW not working when platform.posix is used
  • KT-48295 JVM / IR: VerifyError: Bad access to protected data in getfield
  • KT-48440 JVM IR: Missing checkcast in generated bytecode causes VerifyError in Kotlin 1.5.30
  • KT-48794 Breaking change in 1.5.30: Builder inference lambda contains inapplicable calls so {1} cant be inferred
  • KT-48653 Warnings on non-exhaustive when statements missing in some cases with 1.6
  • KT-48394 JVM: Invalid locals caused by unboxing bytecode optimization
  • KT-48380 kotlin.RuntimeException: Unexpected receiver type
  • KT-47855 Kotlin/Native: compilation fails due to Escape Analysis
  • KT-48291 False positive [ACTUAL_MISSING] Declaration must be marked with ‘actual’ when implementing actual interface
  • KT-48613 Kotlin/Native fails to compile debug binaries for watchosArm64 target
  • KT-48618 Enable by default “suspend conversion” feature in 1.6
  • KT-48543 Native compiler crashes because of bridges for $default stubs
  • KT-47328 JVM / IR: NoSuchFieldError with missing CHECKCAST
  • KT-47638 Drop EXPERIMENTAL_IS_NOT_ENABLED diagnostic
  • KT-48349 OptIn markers are forbidden on local variable / value parameter / property getter only in presence of explicit Target annotation
  • KT-48589 KotlinTypeRefiner is lost, leading to TYPE_MISMATCH and OVERLOAD_RESOLUTION_AMBIGUITY issues with MPP projects
  • KT-48615 Inconsistent behavior with integer literals overflow (Implementation)
  • KT-47937 Implement deprecation of computing constant values of complex boolean expressions in when condition branches and conditions of loops
  • KT-47772 False negative WRONG_ANNOTATION_TARGET on type argument to function call
  • KT-48552 Kotlin/Native: iosArm64 debug build fails in 1.6.0-M1-139
  • KT-46182 Native: prohibit using dots in identifiers
  • KT-47917 JVM: “UTF8 string too large” caused by a big string
  • KT-46230 JVM IR: “IllegalArgumentException: Null argument in ExpressionCodegen for parameter VALUE_PARAMETER MOVED_DISPATCH_RECEIVER” with value class overriding function with default parameter
  • KT-48302 FIR: Investigate not-null assertion on generic Java method
  • KT-47422 -Xjspecify-annotations: If a class has a @Nullable type-parameter bound, Kotlin should still treat some users' type arguments as platform types
  • KT-48500 AE: “Last parameter type of suspend function must be Continuation, but it is kotlin.coroutines.experimental.Continuation” for kotlin-stdlib-common library
  • KT-48469 Problem with properties lazy initialization while using kotlinx.serialization plugin
  • KT-48432 Regression in IntRange.contains (and probably other ranges too) when used in-place
  • KT-48361 INTEGER_OPERATOR_RESOLVE_WILL_CHANGE is not reported in some positions
  • KT-44855 “AssertionError: SyntheticAccessorLowering should not attempt to modify other files” on smart cast of protected field owner
  • KT-47499 JVM / IR: java.lang.VerifyError: Bad access to protected data in invokevirtual when trying to clone the result of lambda invocation that is “this” in an extension function
  • KT-46451 JVM Debugging: stepping on finally block end brace line before stepping into finally code
  • KT-48329 It's impossible to infer a type variables based on several builder inference lambdas
  • KT-48193 Don't use the builder inference for calls which can be resolved without it
  • KT-46450 JVM Debugging: some break statements in catch blocks have no line numbers and you cannot set breakpoints on them
  • KT-48172 “IllegalStateException: Cannot serialize error type: [ERROR : ]” in 1.5.21 with java kotlin interop
  • KT-48262 “Inconsistent type” with JSpecify @NullMarked
  • KT-46697 IllegalStateException: IrTypeAliasSymbol expected: Unbound public symbol for public kotlinx.coroutines/CancellationException|null[0] compiling KMM module for Kotlin/Native with Kotlin 1.5
  • KT-47285 IR deserialization exception when dependency KLIB has class instead of typealias
  • KT-41378 Compilation failed: Deserializer for declaration public kotlinx.coroutines/SingleThreadDispatcher|null[0] is not found
  • KT-47988 JVM / IR: “VerifyError: Bad type on operand stack” when invoking apply with a local method reference
  • KT-47833 False positive "Type argument is not within its bounds " with upcasting in 1.5.30-M1
  • KT-47911 Native compiler on ios_arm64 target generates movi.2d instructions, which are mishandled by Apple hardware
  • KT-14392 Repeated annotation with use site target is not detected for getter and setter
  • KT-47493 Missed frontend diagnostic in try/catch
  • KT-47597 JVM IR: if statement doesn't eval correctly on 1.5.20 possible nullable type differences.
  • KT-47922 False negative type mismatch on empty when as last statement of lambda
  • KT-47830 Some code doesn't compile with unrestricted builder inference
  • KT-34594 Do not generate fake debugger variables initialization for @InlineOnly functions
  • KT-42139 NI: NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER for emptyList / listOf (with no arguments) / emptyMap / mapOf (with no arguments) inside if block inside sequence block
  • KT-47749 Incorrect scope of a local variable inside the coroutine
  • KT-47527 JVM / IR ClassCastException: “kotlin.Unit cannot be cast to java.lang.String”
  • KT-47941 “IllegalStateException: Expected some types” on a call with several excepted type constraints
  • KT-47854 “IllegalArgumentException: Type is inconsistent” with Android's @Nullable annotation starting in Kotlin 1.5.20
  • KT-47899 “AssertionError: Intersection type should not be marked nullable” with 1.5.21
  • KT-47846 Stack overflow when handling enhanced recursive type parameter
  • KT-47747 Introduce specific error for calls which could be resolved only with unrestricted builder inference
  • KT-47840 JVM / IR: “IllegalStateException: No mapping for symbol: VALUE_PARAMETER name: x” in nested local functions with recursive calls
  • KT-46448 JVM Debugging: Locals in finally blocks not always duplicated when the finally block is
  • KT-47396 <?> in @NullMarked code should permit nullable types
  • KT-47716 JVM / IR: NoSuchMethodError when trying to get MAX_VALUE from ULong in non-trivial try/finally context
  • KT-47762 JVM / IR: Properties with the same signatures in inline class and its companion object crashes the compiler with NullPointerException
  • KT-47729 False positive INTEGER_OPERATOR_RESOLVE_WILL_CHANGE warning: “expression will be resolved to Int in future releases”
  • KT-47741 JVM / IR: VerifyError: Bad type on operand stack with iterator and invoking method reference to IntIterator
  • KT-43696 ClassFormatError on @JvmStatic external fun in interface companion object
  • KT-47715 JVM / IR, R8: External getter cannot be represented in dex format
  • KT-47744 UninitializedPropertyAccessException compiler exception on nested builder inference calls
  • KT-47724 Type inference: False positive “Returning type parameter has been inferred to Nothing implicitly”
  • KT-47684 Add warning on is checks which are always false
  • KT-47685 False positive CAST_NEVER_SUCCEEDS on variable of intersection type
  • KT-32188 NI: False positive “This cast can never succeed”
  • KT-35687 NI: Poor cast can never succeed [CAST_NEVER_SUCCEEDS]
  • KT-41331 False negative USELESS_IS_CHECK with null
  • KT-47609 JVM IR: “AssertionError: Unexpected number of type arguments” when compiling an extension property with annotation and it extends a value class with a generic parameter
  • KT-47589 Using RequiresOptIn annotation on constructor property results in error even if the annotation has no VALUE_PARAMETER target
  • KT-47413 FIR: Rework FirDelegatedScope
  • KT-47120 JVM IR: NoClassDefFoundError when there are an extension and a regular function with the same name
  • KT-47492 Illegal use of DUP

IDE. Gradle Integration

  • KT-47463 MPP: Import fails with Task 'runCommonizer' not found in root project if Kotlin configured only in module

IDE. JS

  • KT-47557 KJS: With NPM dependency IDEA import fails when performed before Gradle build

IDE. Multiplatform

  • KT-47604 kotlin-stdlib-common leaks into dependencies of Android-specific source sets

JavaScript

  • KT-47700 Support instantiation of annotation classes on JS
  • KT-46204 KJS / IR: Support SuspendFunctionN as super type
  • KT-48344 KJS / IR: incorrect call with vararg argument from suspend function
  • KT-46551 KJS / IR: Add a basic sourcemap generation
  • KT-47751 Kotlin/JS: IR + IC: “argument has no effect without source map” warnings on build

Libraries

  • KT-48587 Deprecate some of JS-only stdlib API
  • KT-48584 Introduce JVM readln() and readlnOrNull() top-level functions
  • KT-39328 Make builder collection implementations serializable
  • KT-47676 K/JS: MatchResult.next() returns no expected next match if called after matchEntire
  • KT-39166 Nothing is silently mapped to Void in arguments of the type passed to typeOf

Native

  • KT-48566 ExceptionInInitializerError when configuring Gradle project with kotlin-multiplatform plugin on a host unsupported by Kotlin/Native
  • KT-48591 Kotlin/Native: Char.isHighSurrogate and Char.isLowSurrogate return wrong result for macosArm64 and iosArm64 with compiler cache enabled
  • KT-48491 CInterop broke in Kotlin 1.5.30
  • KT-48039 Native: support shaded (aka embeddable) compiler jar in Gradle plugin
  • KT-42693 Remove dependency on ncurses5 library
  • KT-47424 StackOverflowError in IR hashCode() methods compiling KMM module for Kotlin/Native with Kotlin 1.5.0+

Native. C Export

  • KT-47209 kotlin-native fails to generate valid C header if a setter takes anonymous parameter (_)

Native. C and ObjC Import

  • KT-48074 Native: cinterop: __flexarr support

Native. ObjC Export

  • KT-47809 Kotlin/Native: ObjC-export module name usage in klib compilation

Native. Platforms

  • KT-43024 Kotlin/Native: Windows as cross-compilation target

Native. Runtime

  • KT-48452 Kotlin/Native: Support thread state switching in termination handlers for the new MM

Native. Runtime. Memory

  • KT-48143 Kotlin/Native: test fails with assert with new MM and state checker
  • KT-48364 Uninitialized top-level properties in new MM
  • KT-44283 staticCFunction with CValue parameter crashes when invoked off the main thread

Native. Stdlib

  • KT-47662 [Native, All platforms] Incorrect parsing of long strings to Float and Double

Reflection

  • KT-47650 KClass::nestedClasses throws ClassCastException for script classes with type aliases
  • KT-45066 Support flexible types (nullability, mutability, raw) in typeOf
  • KT-35877 typeOf<MutableList<>> cannot be distinguished from typeOf<List<>> in Kotlin/JVM

Tools. CLI

  • KT-47623 Deprecate -Xuse-experimental
  • KT-32376 “no main manifest attribute” on running the jar for cli-compiled Kotlin objects with main function
  • KT-48026 Add the compiler X-flag to enable self upper bound type inference
  • KT-47640 CLI: support -option=value format as for -Xoption=value
  • KT-47099 Add a stable compiler argument for opt-in requirements as soon as they are stable
  • KT-30778 kotlin-compiler.jar contains shaded but not relocated kotlinx.coroutines

Tools. Commonizer

New Features

  • KT-47433 [Commonizer] Commonize functions/properties with TA/Class types in signature
  • KT-47691 [Commonizer] Commonize var and val properties
  • KT-47434 [Commonizer] Commonize parameterized (type-alias + class) types
  • KT-47432 [Commonizer] Commonize (type-alias + class) types used in functions

Fixes

  • KT-47523 MPP: Unable to resolve c-interop dependency if platform is included in an intermediate source set with the only target
  • KT-48278 [Commonizer] platform.posix.usleep not commonized in sqliter
  • KT-46691 MPP: Type mismatch for hierarchically commonized typealiases
  • KT-47221 C-interop commonization fails if few targets reuse same source set
  • KT-47775 Commonizer don't run for shared native code if test source set depends on main
  • KT-47053 MPP: Unable to resolve c-interop commonized code from shared test source set
  • KT-48118 Commonized c-interop lib is not attached to common main source set
  • KT-47641 Enabled cInterop commonization triggers native compilation during Gradle sync in IDE
  • KT-47056 MPP: Change naming for folder with commonized c-interop libraries

Tools. Compiler Plugins

  • KT-40340 jvm-abi-gen plugin: failure with Android D8 (Dexer) tool
  • KT-40133 jvm-abi-gen plugin: fails for inline function containing apply block with anonymous object
  • KT-28704 jvm-abi-gen plugin: avoid calling codegen twice per module
  • KT-48111 JVM / IR: “IllegalAccessError: tried to access method” with NoArg plugin and sealed class

Tools. Gradle

Fixes

  • KT-45202 Kapt crashes with java.io.UTFDataFormatException
  • KT-46719 Remove ‘kotlin.useFallbackCompilerSearch’ build option
  • KT-27687 Empty directories in source set causes gradle cache miss for KotlinCompile task
  • KT-48226 Kotlin toolchain does not set ‘jvmTarget’ for Kotlin tasks on configuration cache reuse
  • KT-47792 KGP should ignore ProjectDependency when customize kotlin Dependencies
  • KT-47867 Replace usages of IncrementalTaskInputs with InputChanges
  • KT-47940 Kotlin JVM toolchain breaks configuration cache
  • KT-47520 Kotlin and Java target compatibility check produces false positive on using Gradle toolchains
  • KT-46978 Duplicate resource errors on gradle 7 with multi-module multiplatform project with withJava
  • KT-47635 Kotlin version conflict on using ‘noarg’ Gradle plugin
  • KT-47636 Kotlin version conflict on using ‘sam-with-receiver’ Gradle plugin
  • KT-47354 Kotlin version conflict on using ‘allopen’ Gradle plugin
  • KT-46972 Migrate Kotlin repo to use Gradle toolchain feature

Tools. Gradle. JS

  • KT-48332 Make NodeJsSetupTask and YarnSetupTask not cacheable
  • KT-48241 KJS / Gradle: NPM test dependency may break Gradle configuration cache
  • KT-32071 Possibility to disable downloading of Node.js and Yarn
  • KT-37895 KJS: NPM Post-install Scripts sometimes print “node: not found”
  • KT-34985 kotlin-gradle-plugin: Should align ways NodeJs and Yarn are downloaded

Tools. Gradle. Multiplatform

  • KT-46343 [Commonizer] Use lockfile for NativeDistributionCommonizationCache
  • KT-48427 Execution failed for task ‘:commonizeNativeDistribution’. > java.io.FileNotFoundException lock (No such file or directory)
  • KT-48513 Commonized platform libraries are unresolved in modules for new hierarchical MPP flag
  • KT-48138 CInteropCommonizer: Missing commonization request if test source set has different targets than associated main
  • KT-35832 Gradle: MPP plugin operates with -Xuse-experimental and not with -Xopt-in
  • KT-38111 Gradle DSL: rename useExperimentalAnnotation function
  • KT-47612 Task :buildKotlinToolingMetadata is incompatible with Gradle configuration cache
  • KT-47611 Task :generateMetadataFileForKotlinMultiplatformPublication is incompatible with Gradle configuration cache

Tools. Gradle. Native

  • KT-47362 Cocoapods plugin: add error reporting for case when pod is not installed on user machine
  • KT-37513 CocoaPods Gradle plugin: Support building tests from terminal for projects depending on pods
  • KT-47078 Support Apple Silicon in cocoapods gradle plugin

Tools. JPS

  • KT-46804 Slow Kotlin incremental build: LookupStorage operations

Tools. Scripts

  • KT-48025 JVM / IR / Script: IllegalStateException: No mapping for symbol: VALUE_PARAMETER INSTANCE_RECEIVER caused by method tnat returns outer function
  • KT-47927 Script: memory leak with new engines
  • KT-48303 main.kts script fails to detect vanished dependencies if run from the cache
  • KT-48177 Scripts: OutOfMemoryException with circular @file:Import
  • KT-46645 Scripts: “IllegalStateException: No mapping for symbol: VALUE_PARAMETER INSTANCE_RECEIVER” caused by get accessor
  • KT-43917 Gradle dependency conflict with resolutionStrategy failOnVersionConflict and kotlin 1.4

Tools. kapt

  • KT-47853 KaptWithoutKotlincTask eagerly resolves dependencies during construction/configuration and can cause deadlocks
  • KT-48195 Kapt causes dead lock in DefaultFileLockManager
  • KT-47347 KAPT: Stub generation in Gradle cache is not consistently relocatable

Recent ChangeLogs:

ChangeLog-1.5.X

ChangeLog-1.4.X

ChangeLog-1.3.X

ChangeLog-1.2.X

ChangeLog-1.1.X

ChangeLog-1.0.X