Changelog
Analysis API
KT-73156AA: type retrieval for erroneous typealias crashesKT-68198Analysis API: Support application service registration in plugin XMLsKT-69630KAPT User project builds with KAPT4 enabled fail with Metaspace overflow
Analysis API. FIR
Performance Improvements
KT-74012RedundantFirAbstractBodyResolveTransformerDispatcher.<init>CPU consumptionKT-73900ContextCollectorVisitor#computeContext may spend significant time oncreateSnapshotKT-73665FirElementFinder is inefficient in large filesKT-73330Remove bodies from functions without contracts after the CONTRACTS phase
Fixes
KT-74097ISE: Recursive update at org.jetbrains.kotlin.analysis.low.level.api.fir.caches.FirCaffeineCache.getValueKT-74098ISE: Recursive update at org.jetbrains.kotlin.analysis.low.level.api.fir.caches.FirCaffeineCache.getValueKT-73079K2: Internal compiler error when conflicting type aliases are presentKT-73456Expected FirResolvedContractDescription but FirRawContractDescriptionImpl found for FirSimpleFunctionImplKT-73259Expected FirResolvedContractDescription but FirLegacyRawContractDescriptionImpl found for FirSimpleFunctionImplKT-72740FirDanglingModifierList:lazyResolveToPhase(STATUS)cannot be called from a transformer with a phase STATUSKT-69671TYPES phase contract violation through JavaSymbolProvider
Analysis API. Light Classes
KT-73492K2. FP error in Java file when using@JvmSuppressWildcardsannotation without arguments
Analysis API. Providers and Caches
KT-69247Analysis API: Invalidate sessions after builtins modification eventsKT-72704ISE: No 'org.jetbrains.kotlin.fir.scopes.impl.FirDelegatedMembersFilter'(53) in array owner: LLFirBuiltinsAndCloneableSession for Builtins for JS/wasm-js (JS)KT-67148Analysis API: Introduce a weak reference cache for the originalKtSymbolinKtSymbolPointer
Analysis API. Standalone
KT-73776Analysis API Standalone: Application services are missing registrations in tests and Dokka
Analysis API. Surface
New Features
KT-73414Analysis API: Support typealiased constructors in KaConstructorSymbol
Performance Improvements
KT-74112UI freeze:AnyThreadWriteThreadingSupport.getWritePermitKT-73942Extend resolveToSymbols cache to all referencesKT-73622CacheresolveToSymbolsresultKT-72684Drop explicit resolve from KaFirJavaInteroperabilityComponent#asPsiTypeElement
Fixes
KT-70114K2: Analysis API: do not lazy resolve declarations without deprecation to get it deprecationKT-73406[Analysis API] Allow extending KaModule resolution scope for all KaModulesKT-65850Cover Analysis API with KDocsKT-73662KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-70108Analysis API: "KaScopeProvider.scopeContext" provides scopes from implicit companion objects with inaccessible classifiersKT-68954Remove JAR publications with old artifact names (high-level-api family)KT-70134Analysis API: Port API documentation from the guide to KDocKT-72973Introduce KaSymbolOrigin.TYPE_ALIAS_CONSTRUCTOR
Backend. Wasm
KT-71645[Wasm] Check wasm test runner for groupByPackage=true caseKT-73907Wasm: Duplication of files in browser distributionKT-71868K/Wasm: support generating debug information in DWARF format
Compiler
New Features
KT-74049Introduce special override rule to allow overriding T! with T & AnyKT-61447Support context receivers overloads in Kotlin multiplatformKT-73255Change defaulting rule for annotationsKT-73256Implementallmeta-target for annotations
Performance Improvements
KT-73434Slow / infinite compile involving ConeInferenceContextKT-73328Do not spillthisto a local variable in coroutinesKT-69995K2: Slow compilation when star projecting mutually recursive bounds from javaKT-73687Inefficient KtCommonFile#getFileAnnotationList
Fixes
KT-70789CLI error "mixing legacy and modern plugin arguments is prohibited" on using -Xcompiler-plugin unless default scripting plugin is disabledKT-74024K2: Prohibit declaring local type aliasesKT-73858Compose / iOS: NullPointerException on buildingKT-73864[Native] DecoupleIrType.computePrimitiveBinaryTypeOrNullfrom backend.nativeKT-73122Move the upgrade references lowering to be first one in Native pipelineKT-73608K2: "Initializer type mismatch" with map and typealias to objectKT-74104Native: SynchronizedLazyImpl produces NPE on 2.1.20-Beta1 on mingwX64KT-74147K2: False negative INCONSISTENT_TYPE_PARAMETER_VALUESKT-73454K2: Fix type parameters mapping for typealiases with inner RHSKT-73043K2 Compiler does not allow references to inner constructors with typealiasesKT-74040Compilation of inner class usage does not check the visibility of parent class during compilation in different roundsKT-74195Fully qualified names in error messages make them complicatedKT-74221MakeFirSupertypesCheckera platform checkerKT-72962Consider enabling ConsiderForkPointsWhenCheckingContradictions LF earlierKT-74242Freeze onrunCatchingcall infinallyblock inside SAM conversionKT-73903Design 'replaceWith' / 'test-only' kinds for the 'LanguageFeature' classKT-29222FIR: consider folding binary expression chainsKT-73760Cannot implement two Java interfaces with@NotNull-annotated type argument and Kotlin's plain (nullable) type parameterKT-58933Applying suggested signature from WRONG_NULLABILITY_FOR_JAVA_OVERRIDE leads to red codeKT-74107K2: Calling type alias constructor with inner RHS in static scope causes runtime crashKT-74244Context parameters: context isn't checked for expect/actual property declarationKT-74276Update ASM from 9.0 to 9.6.1KT-72295K2: Generated accessors for delegated property should have property sourceKT-73150Investigate/test approximation of context parameter type in completionKT-73862[Native] Decouple NativePreSerializationLoweringContext from backend.nativeKT-72677K2 IDE / Kotlin Debugger: “Couldn't find virtual file for p1/MainKt$foo$iface$1” on evaluating inline function from another moduleKT-72672K2 IDE / Kotlin Debugger: “Couldn't find virtual file” on evaluating inline function for enum class entries from test moduleKT-73912Cannot evaluate inline methods from another module in KMP projectKT-73765K2: Prohibit nested type aliases with inner RHS when it captures type parameters implicitlyKT-73869[Native] Move KonanSymbols out ofbackend.nativeKT-73823Kotlin/Native: IndexOutOfBounds for java.util.Map::getOrDefaultKT-73755K2: type mismatch error contains unsubstituted type parameter typesKT-72837ERROR_IN_CONTRACT_DESCRIPTION message contains compiler internalsKT-73771K2: Infinite compilation caused by buildList without typeKT-67520Change of behaviour of inline function with safe cast on value typeKT-67518Value classes leak their carrier type implementation details via inliningKT-73937Context parameters: IllegalArgumentException: source must not be null on lateinit var with a contextKT-73716Context parameters expose visibilityKT-73671Context parameters: val/var on context parameter on a property is possibleKT-73510Context parameters: It is possible to declare a context for init blockKT-72305K2: Report error when using synthetic properties in case of mapped collectionsKT-72429StackOverflowError when compiling large filesKT-72500K2 Debugger: NSME on evaluating lambda with a call to internal class fieldKT-73845K2: IllegalArgumentException during FIR2IR transformation when processing nested default values in annotationsKT-73538K2 IDE / Kotlin Debugger: ISE “couldn't find inline method" on evaluating internal inline function with default arg from main module in test moduleKT-73347K2: Expected is FirResolvedDeclarationStatusKT-73902Clean-up code around lateinit inline/value classesKT-73693K2: DslMarker checker doesn't report violation for callable reference with bound receiverKT-73667K2: DslMarker checker ignores function type annotations for invokeExtensionKT-72797K2 IDE / Kotlin Debugger: AE “No such value argument slot in IrCallImpl” on evaluating inc()-operator for private fieldKT-68388Compiler crash on convesion to fun interface with extension receiverKT-62833K2: Run smoke FP tests with SLOW_ASSERTIONS enabledKT-54068Context receivers with lambda nesting result in Type mismatchKT-51383Lambdas with context receivers do not accept context receivers from scopeKT-73331Context parameters implicit invokeKT-73650Implement DIFFERENT_NAMES_FOR_THE_SAME_PARAMETER_IN_SUPERTYPES for K2KT-73791Forbid usinginlineandvalueclass modifiers togetherKT-73704[Native] Decouple KonanIrLinker from cinterop deserializationKT-73641Context parameters DSL marker supportKT-73494Enable first-only-warn annotation defaulting modeKT-59880K2: Disappeared CONFLICTING_OVERLOADSKT-59443K2: Implement missing K1 diagnosticsKT-67517Value class upcast to Any leaks carrier type interfacesKT-73527Prohibit (via a deprecation warning) accessing nested class through generic outer classKT-72852JAVA_CLASS_ON_COMPANION compiler warning missing in K2KT-71704K2: subAtom already initializedKT-73476K2: Visibility of nested type aliases is not respected if RHS is innerKT-72957K2: Don't use offsets for mapping annotations from IR plugins injected into metadataKT-72832Erroneous implicit cast inserted by smartcastKT-57358False positive "Const 'val' initializer should be a constant value" caused by equality with literalsKT-58437K2: Do not use descriptors in KonanSymbolsKT-18563Do not generate inline reified functions as private in bytecode
Compose compiler
b/388505454Change order of $changed bits with context parametersb/165812010Support default values in open@Composablefunctions (K2 only)b/285336821Use stability of parent class in stability inferenceb/353744956Fix context receiver/parameter handling in Composeb/195200551CallEnum#ordinalon enum values passed to Composer#changed
IR. Inlining
KT-72776[JS] Add lowerings around inlining of private functions to the common prefix at the 1st phase of compilationKT-72775[JS] Add lowerings up to "cache private inline functions" to the common prefix at the 1st phase of compilationKT-72440[Native] Add lowerings around inlining of private functions to the common prefix at the 1st phase of compilationKT-72439[Native] Add lowerings up to "cache private inline functions" to the common prefix at the 1st phase of compilationKT-74039IR proto: Rename properties of IrInlinedFunctionBlockKT-73475Fix validation errors forsharedBox...methodsKT-73588Support serialization/deserialization of IrReturnableBlock and IrInlinedFunctionBlockKT-69009Merge -Xverify-ir-visibility-after-inlining and -Xverify-ir-visibility CLI flags
IR. Interpreter
KT-72356K2 Native: IllegalStateException when annotation has the same source range as a constant in another file
IR. Tree
KT-744968% performance regression in loweringsKT-73224Migratecompiler.ir.interpreterto new IR parameter APIKT-73179Drop IrAttributeContainerKT-73222Migratecompiler.ir.inlineto new IR parameter APIKT-73553[Native] Create testrunners for serialization testsKT-72735Add new IR nodes for callable referencesKT-73248MergeFileValidatorandCheckIrElementVisitorintoIrValidator
JavaScript
Performance Improvements
KT-71199K/JS: charSequenceGet intrinsic should bypass Char range checksKT-73759KJS: do not fillArrayVal if using an Array init function
Fixes
KT-73130KJS: Missedbreakfor do/while in generated JS codeKT-68067KJS: Overriding methods with default parameters doesn't workKT-71656K2 JS: "IllegalStateException: Class has no primary constructor: kotlin.ULong"KT-70987KJS:@JsExport: NullPointerException with private data classKT-72974KJS / ESModules: EagerInitialization annotation has no effect on unused propertiesKT-71788KJS: NPE when use@JsExportwith@JsPlainObjectKT-72598KJS: Nested@JsPlainObjectdoes not workKT-70078@JsPlainObjectcompiles broken code when inlining suspend functionKT-68904@JsPlainObjectbreaks when inside a file with@file:JsQualifierKT-74067KJS: ES class constructor is generated with 'return this'KT-72883[JS] AbstractSuspendFunctionsLowering crashes on private top level suspend fun
Klibs
KT-74050Kotlin 2.1.0 with K1 throws a signature mismatch of Ir and Descriptor for Composable lambdaKT-70146[KLIB Resolve] Don't fail on nonexistent transitive dependencyKT-74045Context parameters: conflicting signatures for properties with/without context on the non-JVM backendsKT-73589Design & implement signatures for context parametersKT-73721NativeLibraryAbiReaderWithManifestTest - move to Common BE testsKT-73855[Klibs] Changing function body causes change to header klibKT-73474CreateNonLinkingIrInlineFunctionDeserializerdirectly inside inline function resolverKT-67474K2: Missing@ExtensionFunctionTypein metadata in KLIBs
Libraries
New Features
KT-72480Move Instant and Clock from kotlinx-datetime to stdlib
Fixes
KT-28492Merge sources when building kotlin-osgi-bundleKT-62423Consider providing Common atomic typesKT-74294Make the Uuid.parse function able to parse multiple formatsKT-74279Introduce Uuid.parseHexDash() and toHexDashString()KT-74272Introduce Uuid.fromUByteArray and toUByteArrayKT-74314Reduce bitwise operations on Longs in Uuid implementationKT-69575kotlin.uuid.Uuid is not ComparableKT-74173The sample code oflazyon stdlib can not run on playground due to "samples" package importKT-73391Provide samples for common atomics APIKT-73890Add kotlin-metadata-jvm to .zip compiler distributionKT-71099Mention that selector for maxBy/minBy family is not invoked for 1-element collectionsKT-73747AtomicBoolean.asJavaAtomic() and AtomicBoolean.asKotlinAtomic() have unnecessary type parameterKT-73816Moving common Atomics to kotlin.concurrent.atomics packageKT-73820Part 2. Moving Atomics to kotlin.concurrent.atomics: move the API to the new packageKT-73654Remove org.w3c packages from stdlib documentationKT-71762ReplaceWith properties kdoc is rendered with extra spacesKT-73743UninitializedPropertyAccessException on AtomicReference initializationKT-73740Unresolved reference 'AtomicBoolean' in 2.1.20-Beta1KT-73817Part 1. Moving Atomics to kotlin.concurrent.atomics: bootstrap updatesKT-54859kotlin.repeatshould document behavior in the case of negative argumentsKT-73762Warn about@Transientbeing not sound to use with non-nullable typesKT-50395Stdlib documentation for StringBuilder.removeRange is unclearKT-36863Specify which element is returned from max/min functions if multiple elements are equal to min/maxKT-73695PublishedApi KDoc's link to inline functions page is not rendered properlyKT-71628Review deprecations in stdlib for 2.1KT-69545Kotlin/Native: Deprecate API marked with FreezingIsDeprecated to error
Native
KT-73559K/Native: AndroidNativeArm64 linking fails starting from Kotlin 2.1.0
Native. C and ObjC Import
KT-74043Drop obsolete parts of Skia (aka ad-hoc C++) import
Native. Swift Export
KT-73623Swift Export: Interfaces: Add protocol printing
Tools. CLI
KT-74099Add CLI argument to enable nested type aliases featureKT-73320Migrate the main JS CLI pipeline to the phased structureKT-73922CompileEnvironmentUtil.writeToJaris unbufferedKT-73967JDK 25: "IllegalArgumentException: 25-ea" with EA buildsKT-72927CombineFlexiblePhaseConfigandPhaseConfigKT-73319Migrate the main JVM CLI pipeline to the phased structureKT-73244:compiler:cli-basedepends on:compiler:ir.serialization.jvmto read a single property
Tools. Commonizer
KT-74623Drop metadata version check from KLIB commonizer
Tools. Compiler Plugins
KT-74315Kotlin Lombok: "Unresolved reference" on generating@Builderfor static inner class where outer class is also using@BuilderKT-73871PowerAssert: Comparison via operator overload results in confusing diagramKT-73897PowerAssert: Implicit argument detection is brittle in a number of casesKT-73870PowerAssert: Object should not be displayedKT-73895jvm-abi-gen: $serializer class name is written incorrectly to InnerClasses attributeKT-73349Migrate power-assert sources to new IR parameter API
Tools. Compiler plugins. Serialization
KT-71072KxSerialization: KeepGeneratedSerializer and sealed class in Map causes initialization-errorKT-73830[Kotlin/Wasm] CompileError: WebAssembly.Module(): Compiling function #10198:"kotlinx.serialization.$serializer.serialize" failed
Tools. Daemon
KT-73311"Unable to release compile session, maybe daemon is already down" flakiness
Tools. Gradle
New Features
KT-41409Gradle: Support binaries.executable for jvm targetsKT-58830Expose AdhocComponentWithVariants API on KGP generated component
Fixes
KT-74124Gradle: error message regression of incompatible Gradle version usageKT-74095Make ToolingDiagnosticBuilder internal APIKT-74322Enable source information by default in Compose compiler gradle pluginKT-73974Configuration cache when run Xcode tasks without xcode's environmentKT-74415Make composeCompiler.includeSourceInformation true by defaultKT-74476KGP uses internal Gradle API, DefaultArtifactPublicationSetKT-74017Remove kotlin.androidExtensionsPlugin.enabled flagKT-73749KGP diagnostics reporter: emojis are duplicated if a gradle task is executed from the IDEA UIKT-73782KGP diagnostics reporter: emojis added to KGP warning/errors are displayed broken on WindowsKT-72337kotlin-android-extensions plugin should fail the build on applyKT-74143Gradle: Add workaround for gradle/gradle#31881KT-72384Run Gradle Integration tests against Gradle 8.11KT-67277Gradle: decommission properties to disable precise task outputs backup
Tools. Gradle. JS
KT-66388KJS / Gradle: Allow using an insecure protocol to download Node.js/Yarn when setting up project using Gradle >= 7KT-73614org.jetbrains.kotlin.gradle.targets.jsAbstractSetupTask.destinationProvider should be publicKT-72027JS target build fails on ARM64 WindowsKT-71362KGP/JS: moduleName is not compatible with convention plugins
Tools. Gradle. Multiplatform
KT-72130Gradle Project Isolation Violation in build.gradle due to KGPKT-74298Incorrect DSL for swift export settings under the export nodeKT-73620KMP 2.1.0: Transitive dependency is broken when setting publication groupIdKT-70493Improve gray-box testing experience in KGP-ITKT-49155MPP, Gradle: Cannot usetest-retry-gradle-pluginwith Kotlin multiplatform testsKT-71888Default Target Hierarchy results in very large heap usage/OoM when resolving IDE dependencies in larger projects
Tools. Gradle. Native
KT-73572[Gradle]kotlin.native.cacheKind=nonedoesn't work anymoreKT-71722kotlinNativeBundleConfiguration present in JVM-only Gradle projectKT-71398kotlinNativeBundleConfiguration should not contain dependencies on unsupported platforms
Tools. Incremental Compile
KT-55940Kotlin 1.8.0 compiler hangs indefinitelyKT-29860Incremental compilation looping or incorrect results
Tools. JPS
KT-73688Make it possible to build and run JPS locally