Skip to content

Releases: JetBrains/kotlin

Kotlin 2.4.20-Beta2

Kotlin 2.4.20-Beta2 Pre-release
Pre-release

Choose a tag to compare

@KotlinBuild KotlinBuild released this 22 Jul 11:41

Changelog

Analysis API

  • KT-86546 Check suspicious when over ConeKotlinType in ConeTypeCompatibilityChecker
  • KT-65417 K2 IDE: KTOR false positive expect-actual matching error on enum class because of implicit clone() in non-JVM source sets

Analysis API. FIR

  • KT-69727 K2 IDE. Wrong error in the editor on calling clone function of actual enum instance in non-jvm platform
  • KT-69726 FP errors on declaring fun clone() in actual enum in not-jvm source-set

Analysis API. Infrastructure

  • KT-84914 Do not publish analysis-api-test-framework
  • KT-86986 kotlin-compiler-common-for-ide bundles unrelated Analysis API modules

Analysis API. Light Classes

  • KT-87301 SymbolLightAccessorMethod#isValid returns false for delegated properties
  • KT-87171 SLC: non-mapped Kotlin collection supertype is dropped from supertype list
  • KT-87250 JvmExposeBoxed: light classes shouldn't be autogenerated for private declarations

Analysis API. PSI

  • KT-84925 Move KtReference to the Kotlin IntelliJ plugin

Analysis API. Standalone

  • KT-61404 Analysis API: implement proper library publishing structure

Analysis API. Stubs and Decompilation

  • KT-86250 KotlinIllegalArgumentExceptionWithAttachments: No fir element was found for KtDestructuringDeclaration on destructuring declaration typing
  • KT-64901 Inconsistency between AST and Stub tree in the case of non-local destructuring declarations

Analysis API. Surface

Performance Improvements

  • KT-70021 Analysis API: optimize KaFirExpressionTypeProvider.expressionType for simple cases

Fixes

  • KT-87337 Integrate KaContextParameterOwnerSymbol into KaCallableSymbol
  • KT-78234 Analysis API: Context parameters for accessors
  • KT-86786 Investigate suspicious when over ConeKotlinType in ConeKotlinType.getDirectSupertypes
  • KT-72902 Shouldn't KaSymbolProvider#findClass return KaNamedClassSymbol?
  • KT-87237 No expected type inside arrayOf in annotation entries
  • KT-87143 findKDoc returns parent property KDoc for accessors of an overriding property
  • KT-83224 Support "Compile-time functions" in the Analysis API
  • KT-87174 Expected class KaFirSymbol instead of class KaFirPackageSymbol exception
  • KT-87199 [Analysis API] Remove KaEnumEntryInitializerSymbol
  • KT-85206 Provide information about potentially removable context-sensitive resolution qualifiers via Analysis API
  • KT-86872 KtOperationReferenceExpression should be KtResolvableCall
  • KT-85800 Analysis API: The internal utility PrettyPrinter is used in the public API surface
  • KT-73796 Consider "KaAnnotation#useSiteTarget" removal
  • KT-84184 [Analysis API] Provide a unification substitutor API

Backend. Wasm

  • KT-86242 K/Wasm: deprecate and prohibit using wasmExports
  • KT-87639 [Wasm] Multimodule wasm fails on Pointer usages
  • KT-86245 K/Wasm: provide an API to get a reference to wasm memory
  • KT-76207 K/Wasm: prototype generating suspend functions with stack-switching proposal
  • KT-73452 K/Wasm: turning on range checks by default
  • KT-83159 K/Wasm: generate one common base class fun interfaces (including Function*)
  • KT-83356 K/Wasm: Difference in behavior on nested class initialization (for enums?)
  • KT-84267 K/Wasm: init order of companion objects is different from JVM
  • KT-86192 K/Wasm: Raise a warning on usage of top-level require in JsFun
  • KT-86822 K/Wasm: don't cast the result of calling callable references with Unit return type

Compiler

New Features

  • KT-85925 Native: rework virtual trampolines machinery
  • KT-80373 Add initial support for release compiler caches
  • KT-86018 Short-form of name-based destructuring for multi-field value classes
  • KT-86406 Swift Export: support supercalls for cross-language inheritance
  • KT-77616 Native: consider adding an annotation that enforces thread state switching for a @SymbolName external fun`
  • KT-86410 [KMP] Implement acceptance of JVM IC metadata from previous compilation

Performance Improvements

  • KT-85621 Native: fix optimization in CastsOptimization

Fixes

  • KT-86525 JvmExposeBoxed: Inconsistent number of parameters during reflection
  • KT-87606 Compiler crash on red code with redeclaration of type parameter which is used as expression
  • KT-87335 Context parameters: wrong LINENUMBER emitted for context argument loads in JVM bytecode
  • KT-87245 Report UnsupportedFeature on ExplicitContextArgument
  • KT-87577 Compiler crash on red code with ambiguous type parameter used as expression
  • KT-72706 Confusing "INVISIBLE_REFERENCE" when calling private constructor
  • KT-86957 Warning on the underscore variable is not reported for java.lang.Void call
  • KT-87261 K/N debug: 'is' check miscompilation β€” local variable reports wrong type when two smart-cast extractions precede an inline loop
  • KT-87507 False-positive ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED on fake-override with value parameter of type missing in dependencies
  • KT-87439 Postpone UnitConversionsOnArbitraryExpressions indefinetely
  • KT-87434 JAVA_CLASS_ON_COMPANION not reported when companion accessed through typealias
  • KT-64622 [K/N] ar utility fails with symbol @ in module/klib name on Linux with static cache
  • KT-84037 Native: rework ar invocations in the compiler
  • KT-87339 JVM: Support recursive type provided as an argument of typeOf
  • KT-86551 Check suspicious when over ConeKotlinType in FirExposedVisibilityDeclarationChecker#findVisibilityExposure
  • KT-87395 StackOverflowError in return value checker when a Java class member is annotated with the class's own nested annotation
  • KT-87290 Investigate possible bug in value class deserialization
  • KT-61141 K/N: irText tests failed with K/N irText first run
  • KT-85764 Native: Prohibit compiling sources in 'kotlin' package by default
  • KT-86469 Check 'when's over 'ConeKotlinType' which could miss some branches in DFA
  • KT-87253 Missed ConeCapturedType check in processing of equals contracts
  • KT-84522 Refactor FirResolvedQualifier
  • KT-84299 resolvedToCompanionObject is not set in some situations
  • KT-87327 JVM IR: NullPointerException in JvmInlineClassLowering when using == between value of generic value class and another value class
  • KT-86959 Native: OptimizeCasts gets confused by "complex" terms leaking between different loop iterations
  • [KT-86949](https://yo...
Read more

Kotlin 2.4.10

Choose a tag to compare

@KotlinBuild KotlinBuild released this 14 Jul 10:47

Changelog

Backend. Wasm

  • KT-87066 K/Wasm: Not all files are presented in compiler output directory with multimodule-closed-world and incremental compilation

Compiler

  • KT-86939 JVM: IllegalStateException "No value for annotation parameter" when using const val in nested Java annotation array argument
  • KT-83766 K2: Wrong sourcePsi is set for SymbolPsiLiteral in SLC for annotation arguments referencing a const val
  • KT-86728 Reified type inference: expected type not propagated into inline call inside lambda with elvis operator

Compose Compiler

  • b/522127447 Compose Compiler 2.4: classes previously inferred stable now reported runtime/Uncertain

Klibs

  • KT-86501 Native: IrTypeAliasSymbolImpl is already bound. Signature: kotlinx.datetime/Instant|null[0] on iosSimulatorArm64

Tools. CLI

  • KT-86930 Introduce kotlinr in the Kotlin distribution

Tools. Gradle. BCV

  • KT-87223 Gradle, BCV: open version range in kotlinAbiValidationCompatClasspath causes kotlin-build-tools-impl to resolve to 2.4.20-Beta1 instead of 2.4.0

Tools. Gradle. JS

  • KT-87304 jsBrowserTest fails with "exited with errors (exit code: 1)"
  • KT-86057 kotlinUpgradeYarnLock skips lock file regeneration when kotlinNpmInstall is up-to-date, causing kotlinStoreYarnLock to fail

Tools. Gradle. Multiplatform

  • KT-87084 False positive warning for JS and Wasm compilations when CRI is enabled

Tools. Scripts

  • KT-87076 @file:CompilerOptions("-jvm-target", ...) ignored in .main.kts scripts in Kotlin 2.4.0, falling back to JVM target 1.8
  • KT-86352 K2 scripting: FirResolvedTypeRef exception when resolving extension functions from imported scripts

Kotlin 2.4.10-RC2

Kotlin 2.4.10-RC2 Pre-release
Pre-release

Choose a tag to compare

@KotlinBuild KotlinBuild released this 07 Jul 12:46

Changelog

Backend. Wasm

  • KT-87066 K/Wasm: Not all files are presented in compiler output directory with multimodule-closed-world and incremental compilation

Tools. Gradle. BCV

  • KT-87223 Gradle, BCV: open version range in kotlinAbiValidationCompatClasspath causes kotlin-build-tools-impl to resolve to 2.4.20-Beta1 instead of 2.4.0

Tools. Gradle. JS

  • KT-87304 jsBrowserTest fails with "exited with errors (exit code: 1)"

Kotlin 2.4.10-RC

Kotlin 2.4.10-RC Pre-release
Pre-release

Choose a tag to compare

@KotlinBuild KotlinBuild released this 25 Jun 09:46

Changelog

Compiler

  • KT-86939 JVM: IllegalStateException "No value for annotation parameter" when using const val in nested Java annotation array argument
  • KT-83766 K2: Wrong sourcePsi is set for SymbolPsiLiteral in SLC for annotation arguments referencing a const val
  • KT-86728 Reified type inference: expected type not propagated into inline call inside lambda with elvis operator

Compose compiler

  • b/522127447 Fixed a bug that was making the stability of pre-cast types be used in certain skipping checks instead of the stability of post-cast types

Klibs

  • KT-86501 Native: IrTypeAliasSymbolImpl is already bound. Signature: kotlinx.datetime/Instant|null[0] on iosSimulatorArm64

Tools. CLI

  • KT-86930 Introduce kotlinr in the Kotlin distribution

Tools. Gradle. JS

  • KT-86057 kotlinUpgradeYarnLock skips lock file regeneration when kotlinNpmInstall is up-to-date, causing kotlinStoreYarnLock to fail

Tools. Gradle. Multiplatform

  • KT-87084 False positive warning for JS and Wasm compilations when CRI is enabled

Tools. Scripts

  • KT-87076 @file:CompilerOptions("-jvm-target", ...) ignored in .main.kts scripts in Kotlin 2.4.0, falling back to JVM target 1.8
  • KT-86352 K2 scripting: FirResolvedTypeRef exception when resolving extension functions from imported scripts

Kotlin 2.4.20-Beta1

Kotlin 2.4.20-Beta1 Pre-release
Pre-release

Choose a tag to compare

@KotlinBuild KotlinBuild released this 24 Jun 13:16

Changelog

Analysis API

  • KT-85418 Implement an API for accessing deserialized file annotations in Analysis API
  • KT-74448 K2. False positive MISSING_DEPENDENCY_SUPERCLASS in LinkedListTest.kt, kotlinx.coroutines
  • KT-85856 containingSymbol of constructor property differs for local and non-local classes

Analysis API. Code Compilation

  • KT-76457 K2 IDE / KMP Debugger: KISEWA β€œCannot compile a common source without a JVM counterpart” on evaluating inline fun from common module inside jvm

Analysis API. FIR

  • KT-70552 No expects for actual
  • KT-86014 Types are broken after remove parameter through change signature
  • KT-86363 KotlinIllegalArgumentExceptionWithAttachments: No dangling modifier found on companion blocks
  • KT-86147 Drop kotlin.parallel.resolve.under.global.lock registry key
  • KT-85543 Avoid lazy resolve for the contracts phase if no constracts might be resolved

Analysis API. Infrastructure

  • KT-86186 Analysis API: Codebase tests run twice in some analysis modules β€” pick a single JUnit runner and migrate
  • KT-85360 Drop kotlin-compiler-testdata-for-ide artifact
  • KT-85585 Simplify the dependencies graph for the Analysis API modules
  • KT-85381 Remove tests for the FE10 implementation

Analysis API. Light Classes

New Features

  • KT-84645 Support resolving to companion block members & extensions from Java (light classes)
  • KT-80775 Support PsiClass#getRecordComponents in light classes

Fixes

  • KT-57537 SLC: propagate default parameter value from (@JvmOverloads) expect declarations to actual declarations
  • KT-63568 Symbol Light Classes: KtAnnotationApplicationWithArgumentsInfo.normalizedArguments() may work incorrectly when psi is not set
  • KT-70428 AA: good code is red when a Java class extends a Kotlin class implementing MutableList by delegation
  • KT-36740 MPP: False-positive incompatible types in .java when using expect-class returned by non-expect member from common when actual is actual typealias
  • KT-67749 Analysis API: Symbol Light classes should be available only to pure JVM sources
  • KT-85040 [Analysis API] Improve Java / Kotlin interop in KMP projects
  • KT-68169 K2 IDE. KMP. False positive type mismatch in java file of jvm source-set when using common declaration which expects String
  • KT-37783 KMP Java Interop: JVM-only methods on actual superclass not resolved in Java for common subclass
  • KT-40059 Provide type correction for expect/actual types used from Java-code
  • KT-71429 MPP: False positive "Function1 is not a functional interface" when calling code from Common in Java
  • KT-70426 SLC: kotlin.Collection#size is not exposed by default
  • KT-60480 Symbol Light Classes: Classes implementing kotlin.collections.* interfaces don't implement all methods from the corresponding java.util.* interfaces
  • KT-36991 IDE: "both methods have same erasure" for Java classes directly or indirectly extending Kotlin collections
  • KT-22594 KotlinCollection.getSize is not highlighted as an error in Java

Analysis API. PSI

  • KT-85052 Move mutation methods out of the Kotlin PSI
  • KT-84925 Move KtReference to the Kotlin IntelliJ plugin
  • KT-85427 Use factory-like pattern instead of reflection in KtNodeType
  • KT-84789 Ensure all KtClassBody.parent usages are correct
  • KT-85154 PSI: "AE: parent is ERROR_ELEMENT" with top-level destructuring declaration

Analysis API. Providers and Caches

  • KT-82220 Analysis API: Support platform-specific session components and checkers in metadata sessions
  • KT-82731 Analysis API: Limit granular tree change processing to a few files

Analysis API. Standalone

  • KT-85112 AA does not see packages from unpacked klibs
  • KT-86417 Support parameters in 'getExpectsForActual()'
  • KT-84916 Metadata stub deserializers aren't properly set up for Analysis API Standalone
  • KT-83191 Analysis API: JvmDependenciesIndexImpl performs very poorly for large classpaths

Analysis API. Stubs and Decompilation

  • KT-86520 KotlinDeclarationInCompiledFileSearcher doesn't support visibility-mangled declarations
  • KT-64901 Inconsistency between AST and Stub tree in the case of non-local destructuring declarations
  • KT-84444 Support stubs for companion blocks & extensions

Analysis API. Surface

New Features

  • KT-73214 Add KaScope#declarations with name filter
  • KT-69085 Provide API to retrieve label/name from KtFunctionLikeSymbol
  • KT-70771 KaLocalVariableSymbol: support isDelegatedProperty
  • KT-85239 Streaming version of collectDiagnostics()
  • KT-85037 Add API for KaFunctionType's returnType modification
  • KT-80460 AA: Introduce KtExpression.isStableForSmartCasting API
  • KT-82519 Automatically recognize the appropriate analysis mode for in-memory file copies based on their content
  • KT-65912 Analysis API: Implement type building API for all KtType

Fixes

  • KT-66039 K2: Analysis API: redesign resolution API
  • KT-70794 K2 IDE: Reference to object does not resolve as LHS in "plusAssign" assignment expression
  • KT-70774 Unary operators on literals are not resolvable
  • KT-86757 Flaky annotations result for @all annotation on a backing field
  • KT-85382 Remove the FE10 implementation
  • KT-86681 [Analysis API] Move isDelegated to KaVariableSymbol
  • KT-86685 collectCallCandidates works incorrectly for a constructor vs. a companion invoke
  • KT-86514 No expected type within collection literal in annotation entry using array rather than varargs
  • KT-76076 K2 AA: safe call expression navigates to parent array index access expression
  • KT-86418 Support property accessors in 'getExpectsForActual()'
  • KT-71312 KaFirPsiJavaClassSymbol.{hasAnnotations, annotationSimpleNames} is inconsistent with FirJavaClass implementation
  • KT-86394 Resolve from KDoc reference is inconsistent with source code
  • KT-86248 isUsedAsExpression true for typealias lhs in ::
  • KT-85778 Analysis API: Ensure that all public endpoints in implementation modules are internal or opt-in
  • KT-78285 resolveToCallCandidates inconsistent behaviour with invoke operator and constructor
  • KT-85852 CCE in buildClassType
  • KT-85989 Super type references should be aware of type alias constructors
  • KT-84184 [Analysis API] Provide a unification substitutor API
  • KT-84584 Support companion extensions and blocks in the Analysis API
  • [KT-84932](https://yo...
Read more

Kotlin 2.4.0

Choose a tag to compare

@KotlinBuild KotlinBuild released this 03 Jun 09:31

Changelog

Analysis API

  • KT-83867 OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repo
  • KT-83723 [Analysis API] Enable experimental KDoc resolver by default
  • KT-83388 Analysis API: properly support KMP in KotlinPackageProvider
  • KT-65683 Analysis API: Dangling file session creation causes a computeIfAbsent contract violation

Analysis API. Code Compilation

  • KT-78946 Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exception

Analysis API. FIR

  • KT-68260 K2 AA: InvalidFirElementTypeException β€œFor CALLABLE_REFERENCE_EXPRESSION with text ::lam1, unexpected element of type: no element found” with illegal callable reference call
  • KT-70896 AA: False positive deprecation warning with override of built-in method in JDK mapped class
  • KT-84711 K2 IDE sometimes loses FIR plugin-generated declarations after file changes
  • KT-84625 Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classes
  • KT-84596 Improve K2 Jooq completion performance
  • KT-84525 KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSite
  • KT-83546 Kotlin analysis reach ClsCustomNavigationPolicy
  • KT-84259 Move CommonDefaultImportsProvider to the frontend independent module
  • KT-82945 Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImpl
  • KT-71135 AA: exception from sealed inheritors checker when analyzeCopy

Analysis API. Infrastructure

Fixes

  • KT-83905 Analysis API: Improve UX with test data
  • KT-84913 Extract compiler classes used by the PSI & Analysis API to a separate module
  • KT-64986 Analysis API: Implement Analysis API tests for different KMP Platforms
  • KT-84776 The test data manager misses the redundancy check in the update mode
  • KT-84962 The test data manager misses -ea flag
  • KT-84388 Preserve the EOF status in the test data manager to avoid extra changes
  • KT-84362 Analysis API tests produce many warnings due to "not yet loaded registry"
  • KT-84279 Test Data Manager fails on a clean build
  • KT-83913 Exclude compiler-based Analysis API tests from Git tracking
  • KT-80379 Extract per-module test generators for AA tests
  • KT-84120 Move CLI modules out of kotlin-compiler-fe10-for-ide
  • KT-83200 Track external dependencies of the Analysis API modules

Analysis API. Light Classes

  • KT-82434 Light classes should prefer enum entries to properties
  • KT-84200 SLC: return type is not boxed for delegated methods with generic original method
  • KT-72451 "CCE: class PsiPrimitiveType cannot be cast to class PsiClassType" with same-named enum class and typealias

Analysis API. PSI

  • KT-84715 removeModifier doesn't delete whitespaces around the removed modifier
  • KT-84564 KtEnumEntry.delete deletes semicolon
  • KT-84781 Use computed properties in KotlinElementTypeProviderImpl
  • KT-83846 Set up guidelines for PSI
  • KT-84135 Deprecate KtSelfType

Analysis API. Providers and Caches

  • KT-82731 Analysis API: Limit granular tree change processing to a few files
  • KT-79234 Analysis API: Usage of asMap() on Caffeine caches bypasses stats counters
  • KT-74090 Analysis API: Support dumb mode (restricted analysis)

Analysis API. Standalone

  • KT-83801 Nested typealiases are not correctly indexed in standalone mode

Analysis API. Stubs and Decompilation

  • KT-85371 StackOverflowError from LLKotlinStubBasedLibrarySymbolProvider and StubBasedClassDeserialization
  • KT-83935 Support KDoc loading in decompiled stubs

Analysis API. Surface

New Features

  • KT-85239 Streaming version of collectDiagnostics()
  • KT-82519 Automatically recognize the appropriate analysis mode for in-memory file copies based on their content
  • KT-73534 SAM method API
  • KT-82993 Support explicit backing fields in the Analysis API

Fixes

  • KT-79186 KtCompletionExtensionCandidateChecker does not work for extensions when using callable references of a type
  • KT-83759 Analysis API: Mark platform interface APIs with @KaPlatformInterface
  • KT-83921 Extend KaKDocProvider to read Kdoc from KLIB metadata
  • KT-77426 KaFirCompilerFacility uses an arbitrary JVM counterpart for common sources
  • KT-84737 KaCallableSymbol#directlyOverriddenSymbols doesn't work for java overrides of kotlin properties
  • KT-84621 Migrate symbol tests to ManagedTest properly
  • KT-80575 KaFirJavaInteroperabilityComponent#getJavaGetterName should not throw exception on incomplete code
  • KT-84397 KtDefaultAnnotationArgumentReference should return only results with value name
  • KT-84804 buildSubstitutor does not work correctly with Java type parameters
  • KT-84389 Cover references with ABI and documentation checks
  • KT-57042 K2, Analysis API: KaJavaInteroperabilityComponent#callableSymbol returns null for a Java getter implementing Kotlin property
  • KT-80856 Analysis API: analysisContextModule incorrectly determines the module of an original file when used for dangling file context assignment
  • KT-84363 AA, isUsedAsExpression: Unhandled Non-KtExpression parent of KtExpression: class org.jetbrains.kotlin.psi.KtContractEffect
  • KT-70476 Analysis API: "KtDefaultAnnotationArgumentReference.resolveToSymbols" does not work in FIR implementation
  • KT-68499 Split KtDefaultAnnotationArgumentReference on K1 and K2 implementation
  • KT-70521 Analysis API: Impossible to distinguish between 'iterator' operator calls dispatched with imports from objects
  • KT-77669 Context arguments are missed on implicit invoke calls
  • KT-77670 resolveToCall: extensionReceiver is incorrectly chosed due to a conflict with context parameters for an implicit invoke call
  • KT-68633 K2 AA: IAE "Expected class KaClassSymbol instead of class KaFirEnumEntrySymbol" with enum entry initializer
  • KT-83777 Analysis API: The resolution scope of a context module accepts elements from associated dangling files
  • KT-82571 No expected type for overridden property without explicit type
  • KT-83223 Support "Explicit context arguments" in the Analysis API
  • KT-65186 K2: Analysis API: KtExpressionTypeProvider.getExpectedType works incorrectly for the right hand side of assignment expressions
  • KT-76011 KaFirNamedClassSymbol#companionObject doesn't provide generated objects generated by compiled plu...
Read more

Kotlin 2.4.0-RC2

Kotlin 2.4.0-RC2 Pre-release
Pre-release

Choose a tag to compare

@KotlinBuild KotlinBuild released this 27 May 12:43

Changelog

Backend. J2KLIB

  • KT-86367 [JKLIB] kotlin.Cloneable built-in class not found

Compose compiler

  • b/511102714 Made the default stability of non-final classes Unknown
    instead of Stable

Tools. Build Tools API

  • KT-86395 [BTA] forward-compatibility violation: NoSuchMethodError on JvmSnapshotBasedIncrementalCompilationConfiguration. breaks IC

Tools. Gradle

  • KT-86346 Compiler warnings printed twice in console β€” once as w: and again as Gradle "Problem found:" block

Tools. Gradle. BCV

  • KT-86268 ABI validation tasks fail with Unsupported platform toolchain type when using kotlin.compilerVersion pointing to an older compiler after BTA migration in 2.4.0-Beta2

Tools. Gradle. Wasm

  • KT-86457 [Wasm, Gradle] BinaryenExec.standardOutput is silently ignored after migration to Gradle Workers

Kotlin 2.4.0-RC

Kotlin 2.4.0-RC Pre-release
Pre-release

Choose a tag to compare

@KotlinBuild KotlinBuild released this 13 May 12:30

Changelog

Backend. J2KLIB

  • KT-84877 [J2KLIB] Remove withKotlinBuiltinsHack present in JKlibIrLinker.kt
  • KT-85846 Tests failing with fake override property missing accessors or backing field
  • KT-85717 IllegalStateException due to already bound symbol
  • KT-86204 [JKlib] Propagate private members from dependecies in the IR tree

Compiler

  • KT-86210 Update -Xannotation-default-target CLI parameter doc
  • KT-85948 Contracts in 2.4 stdlib is not compatible with 2.3 compiler
  • KT-85957 Contract on function is getting discarded if any of effect declarations is unknown
  • KT-86130 False positive UNINITIALIZED_ENUM_COMPANION on LV 2.3 and lower
  • KT-84860 False positive UNINITIALIZED_ENUM_COMPANION in enum access with explicit receiver in enum initializer when enum class has a companion
  • KT-84319 Add JVM target bytecode version 26
  • KT-85825 Context parameter lambda loses context type when wrapped in nested run blocks
  • KT-84960 Property contract leaks unsubstituted type parameter in smart cast

Compose compiler

  • b/509945632 Do not generate groups in inline lambdas without @Composable calls

IR. Interpreter

  • KT-86083 Create a new CLI flag to enable IntrinsicConstEvaluation feature

JVM. Reflection

  • KT-86017 KClass.constructors returns all java.lang.String constructors for mapped type kotlin.String
  • KT-85999 Reflection: ByteArray KType incorrectly has type arguments in Kotlin 2.4.0

Libraries

  • KT-86027 Hide returnsResultOf under a separate flag and remove its usages from kotlin stdlib

Native

  • KT-84733 LLVM Update: rebase LLVM once the upstream stabilizes

Tools. Compiler Plugin API

  • KT-85969 KtLint incompatible with Kotlin 2.4.0-Beta2 (parsing errors / Extensions storage issue)

Tools. Compiler Plugins

  • KT-86170 PowerAssert: Stabilize runtime ABI for initial release
  • KT-85250 PowerAssert: Automatically add runtime library dependency

Tools. Compiler plugins. Serialization

  • KT-85554 Serialization: "IndexOutOfBoundsException" on property generated by Compose plugin
  • KT-85963 IncompatibleClassChangeError: Expected non-static field $stable on deserialization of @Serializable data class when Compose compiler plugin is applied before Serialization plugin

Tools. Gradle

  • KT-85373 Compile against Gradle API 9.5.0
  • KT-85374 Run tests against Gradle 9.5.0

Tools. Gradle. Multiplatform

  • KT-85877 The number of SPM direct dependencies is multiplied on number on targets
  • KT-85706 SwiftPM Import: Updating package version in build script updates version in the lock file
  • KT-83370 Incorrect metadata transformation for stdlib's webMain source set

Tools. Gradle. Native

  • KT-85984 linkReleaseFrameworkIosSimulatorArm64 is executed during Debug iOS build since 2.4.0-Beta2
  • KT-86024 Empty main compilations cause w: [COMPILER_ARGUMENTS_WARNING] There are libraries in -friend-modules CLI argument that are not included in -library CLI argument:

Tools. Gradle. Wasm

  • KT-85974 K/Wasm: Do not set -Xir-per-module for Wasm tasks

Kotlin 2.4.0-Beta2

Kotlin 2.4.0-Beta2 Pre-release
Pre-release

Choose a tag to compare

@KotlinBuild KotlinBuild released this 22 Apr 09:52

Changelog

Analysis API

  • KT-65683 Analysis API: Dangling file session creation causes a computeIfAbsent contract violation

Analysis API. FIR

  • KT-70896 AA: False positive deprecation warning with override of built-in method in JDK mapped class
  • KT-84625 Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classes

Analysis API. Infrastructure

  • KT-84913 Extract compiler classes used by the PSI & Analysis API to a separate module
  • KT-64986 Analysis API: Implement Analysis API tests for different KMP Platforms
  • KT-80379 Extract per-module test generators for AA tests

Analysis API. PSI

  • KT-84715 removeModifier doesn't delete whitespaces around the removed modifier
  • KT-84564 KtEnumEntry.delete deletes semicolon
  • KT-84781 Use computed properties in KotlinElementTypeProviderImpl

Analysis API. Stubs and Decompilation

  • KT-85371 StackOverflowError from LLKotlinStubBasedLibrarySymbolProvider and StubBasedClassDeserialization
  • KT-83935 Support KDoc loading in decompiled stubs

Analysis API. Surface

  • KT-82519 Automatically recognize the appropriate analysis mode for in-memory file copies based on their content
  • KT-85239 Streaming version of collectDiagnostics()
  • KT-83921 Extend KaKDocProvider to read Kdoc from KLIB metadata
  • KT-77426 KaFirCompilerFacility uses an arbitrary JVM counterpart for common sources
  • KT-84737 KaCallableSymbol#directlyOverriddenSymbols doesn't work for java overrides of kotlin properties
  • KT-84621 Migrate symbol tests to ManagedTest properly
  • KT-80575 KaFirJavaInteroperabilityComponent#getJavaGetterName should not throw exception on incomplete code

Backend. Wasm

  • KT-76205 K/Wasm: stabilize and turn on incremental compilation by default
  • KT-83728 [Wasm] Invalid Ir type while suspend call with blocked if null comprehansion
  • KT-81637 K/JS/Wasm interop: Inconsistent behavior of is/as operations for JsReference<C> and C

Compiler

New Features

  • KT-84484 Companion Extensions Analysis & Resolution
  • KT-84298 K2: Generate IR for Companion Blocks & Extensions
  • KT-84292 Enforce Companion Blocks & Extensions Language Feature during Resolution
  • KT-84291 Companion Blocks & Extensions Checkers
  • KT-84290 Callable References to Companion Block Declarations & Extensions
  • KT-84287 Build Raw FIR for Companion Blocks & Extensions
  • KT-73256 Implement all meta-target for annotations
  • KT-84319 Add JVM target bytecode version 26
  • KT-84297 Serialize & Deserialize Companion Block Declarations & Extensions to/from Metadata
  • KT-84199 Implement DontMakeExplicitNullableJavaTypeArgumentsFlexible feature

Fixes

  • KT-80489 Collection literals: experimental version (Frontend)
  • KT-84566 Prevent launching Default dispatcher threads from IJ SDK in kotlin compiler
  • KT-85358 Native: roll back the workaround for KT-84678 once MapLibre has been properly fixed
  • KT-84931 Incorrect type nullability in SAM super type in anonymous class-based SAM conversion
  • KT-83920 False positive "modifier 'value' is not applicable to 'local variable'" with soft keyword in positional destructuring (square bracket) declaration
  • KT-85626 @JvmRecord in commonMain breaks compileCommonMainKotlinMetadata with "Cannot access 'java.lang.Record'"
  • KT-52673 Don't report deprecation warning/error on imports
  • KT-84991 Improve Argument type mismatch diagnostics
  • KT-82216 Sanitize '.kotlin_module' filename
  • KT-84678 K/N: Undefined symbol from SPM-added ObjC frameworks when linking iOS target
  • KT-77726 Move FirUnusedExpressionChecker to the default checkers list
  • KT-85354 checkPsiTypeConsistency: add psi text attachments
  • KT-85479 Improve diagnostic messages for upper bound violations
  • KT-84585 Upper bound violated warning for expansion of type alias in LHS
  • KT-84924 Native: stdlib-cache.lock used by mulitple processes
  • KT-85244 False positive DUPLICATE_BRANCH_CONDITION_IN_WHEN with guard condition
  • KT-78432 No-arg constructor should be generated for regular classes with a value class parameter in case of JvmExposeBoxed
  • KT-85487 Investigate why WrapContinuationForTailCallFunctions does not work in Android Test
  • KT-59633 K2: Implement running AndroidRunner tests with FIR
  • KT-85392 Native: concurrency issues in per-file caches
  • KT-76237 Store File-level annotations in KLIB metadata separately
  • KT-85162 Introduce diagnostics to refine numeric types casting
  • KT-80060 False positive REDUNDANT_CALL_OF_CONVERSION_METHOD in case of overloads
  • KT-85289 False-positive smartcast from == with type parameter based variable
  • KT-83890 return-value-checker: false positive "Unused return value of 'context'" on kotlin.context() functions
  • KT-84106 False negative "NON_EXHAUSTIVE_WHEN": "NoWhenBranchMatchedException" at runtime with sealed and platform type
  • KT-85005 Consider all: target in the checker of repeatable annotations
  • KT-85210 Enabling -XXLanguage:+IntrinsicConstEvaluation breaks highlighting on some broken code
  • KT-85217 Rework implementation supporting simple-to-suspend function conversion
  • KT-85036 Introduce a proper handling of optional expectation annotations in platform checkers during metadata compilation
  • KT-85086 False-negative JVM_EXPOSE_BOXED_CANNOT_BE_THE_SAME
  • KT-84082 [OPT_IN_USAGE_ERROR] duplicates for destructuring declaration
  • KT-84732 Collection literals: "Expected FirCollectionLiteralImpl to be resolved" in RHS of equality operator
  • KT-84841 Collection literals: Drop special treatment of when with expected type
  • KT-85007 Properly implement special rules for kotlin.Result in @JvmExposeBoxed support
  • KT-74383 Support new callable reference nodes in JVM backend
  • KT-84828 Cleanup JVM backend from the old callable references-related code
  • KT-85006 Refine error messages for INAPPLICABLE_ALL_TARGET diagnostic
  • KT-84296 Support Companion Blocks in CFG
  • KT-85058 Remove final field modification in DescriptorRendererOptionsImpl to prevent warnings on JDK 26+
  • KT-85021 False positive SUBCLASS_CANT_CALL_COMPANION_PROTECTED_NON_STATIC error in multi-module project
  • KT-84727 [K/N] Segfault when returning null as generic Int typ...
Read more

Kotlin 2.3.21

Choose a tag to compare

@KotlinBuild KotlinBuild released this 23 Apr 10:11

Changelog

Backend. Wasm

  • KT-84610 [Wasm] Failed to compile klibs in IC mode

Compiler

  • KT-84566 Prevent launching Default dispatcher threads from IJ SDK in kotlin compiler
  • KT-85358 Native: roll back the workaround for KT-84678 once MapLibre has been properly fixed
  • KT-85626 @JvmRecord in commonMain breaks compileCommonMainKotlinMetadata with "Cannot access 'java.lang.Record'"
  • KT-85405 Postpone/Revert DontIgnoreUpperBoundViolatedOnImplicitArguments
  • KT-84678 K/N: Undefined symbol from SPM-added ObjC frameworks when linking iOS target
  • KT-85021 False positive SUBCLASS_CANT_CALL_COMPANION_PROTECTED_NON_STATIC error in multi-module project

JavaScript

  • KT-82395 Support top-level declarations from compiler plugins in JS incremental compilation
  • KT-84475 K/JS: false-positive exportability warnings in multi-module project
  • KT-84633 Kotlin/JS: "Serializer for class not found" error when IR output granularity is whole-program
  • KT-85047 Kotlin/JS: @JsStatic on suspend fun of class companion generates incorrect d.ts
  • KT-84517 K/JS: bad mappings data in outputted Kotlin stdlib source map

Libraries

  • KT-71848 Kotlinx.metadata: Add CompilerPluginData into Km API

Native. C and ObjC Import

  • KT-85399 Kotlin/Native: TypeCastException when casting ObjC Protocol MetaClass with genericSafeCasts enabled
  • KT-85508 K/N: TypeCastException when using nw_parameters_create_secure_tcp block parameter on 2.3.20

Tools. Gradle

  • KT-84729 Update Gradle plugin-publish version to enable configuration cache badge on Gradle plugins portal

Tools. Gradle. Compiler plugins

  • KT-85257 AGP/Compose: MergeMappingFileTask clears R8 artifacts due to @OutputDirectory annotation on AGP 9.1+

Tools. Scripts

  • KT-85105 Scripts: JVM backend internal error (IR lowering) when scratch file contains anonymous object
  • KT-85103 Exception while generating code when explain destructuring decls
  • KT-84842 scriptCompilationClasspathFromContext behavior changed from 2.3.10 to 2.3.20
  • KT-85029 Kotlin Scripting: ScriptDiagnostic reports "at null" instead of error location

Tools. Statistics (FUS)

  • KT-85628 KGP: composite build FUS metrics fail on access of 'configurationTimeMetrics'