Skip to content

Releases: JetBrains/kotlin

Kotlin 2.1.20-Beta1

19 Dec 12:56
Compare
Choose a tag to compare
Kotlin 2.1.20-Beta1 Pre-release
Pre-release

Changelog

Analysis API

  • KT-71907 K2 debugger evaluator failed when cannot resolve unrelated annotation
  • KT-57733 Analysis API: Use optimized ModuleWithDependenciesScopes in combined symbol providers
  • KT-69128 K2 IDE: "Unresolved reference in KDoc" reports existing Java class in reference to its own nested class
  • KT-71613 KaFirPsiJavaTypeParameterSymbol cannot be cast to KaFirTypeParameterSymbol
  • KT-71741 K2 IDE. Classifier was found in KtFile but was not found in FirFile in libraries/tools/kotlin-gradle-plugin-integration-tests/build.gradle.kts in kotlin.git and broken analysis
  • KT-71942 Need to rethrow Intellij Platform exceptions, like ProcessCanceledException
  • KT-70949 Analysis API: "containingDeclaration" does not work on nested Java classes in K2 implementation
  • KT-69736 K2 IDE: False positive resolution from KDoc for value
  • KT-69047 Analysis API: Unresolved KDoc reference to extensions with the same name
  • KT-70815 Analysis API: Implement stop-the-world session invalidation

Analysis API. Code Compilation

  • KT-71263 K2 evaluator: Error in evaluating self property with extension receiver

Analysis API. FIR

Performance Improvements

  • KT-73017 Analysis API: FirReferenceResolveHelper.getSymbolsByResolvedImport searches for classes even when the selected FqName is a known package
  • KT-72025 FileStructureElement: reduce redundant resolve

Fixes

  • KT-72148 K2: KISEWA: Expected FirResolvedArgumentList for FirAnnotationCallImpl of FirValueParameterImpl(DataClassMember) but FirArgumentListImpl found
  • KT-66132 K2: FirRegularClass expected, but FirFileImpl found | Containing declaration is not found
  • KT-72196 K2. KMP. IllegalStateException: expect-actual matching is only possible for code with sources
  • KT-72652 FirProvider#getContainingClass should support FirDanglingModifierSymbol
  • KT-73105 Lazy resolve contract violation (BODY_RESOLVE from BODY_RESOLVE)
  • KT-66261 K2: Analysis API: "FirDeclaration was not found for class org.jetbrains.kotlin.psi.KtProperty, fir is null" with MULTIPLE_LABELS_ARE_FORBIDDEN K2 error
  • KT-72315 K2. KIWA on usage of always-true OR in guard condition
  • KT-65707 K2 IDE: unresolved calls of callables imported with typealias as qualifier
  • KT-61516 K2: Provide an LL FIR implementation for getContainingClassSymbol (in FirHelpers)
  • KT-72853 Expected FirResolvedArgumentList for FirAnnotationCallImpl of FirContextReceiverImpl(Source) but FirArgumentListImpl found
  • KT-64215 K2: do not resolve type annotations of receiver if it is used as an implicit return type
  • KT-64248 K2: do not resolve type annotations of context receiver if it is used as an implicit return type
  • KT-72821 Add assertion to diagnostic tests to check that all declarations have BODY_RESOLVE phase at the end
  • KT-64056 K2: K2: FirLazyBodiesCalculator shouldn't calculate annotation arguments on type phase
  • KT-71651 K2 IDE: False positive NON_LOCAL_SUSPENSION_POINT in suspend function call
  • KT-72164 K2. IllegalArgumentException when pre and post increment are used simultaneously in assignment
  • KT-71174 Illegal scope used
  • KT-72407 FirImplementationByDelegationWithDifferentGenericSignatureChecker: FirLazyExpression should be calculated before accessing
  • KT-72228 K2: Reformat doesn't work in project with Kotlin 2.0.21
  • KT-72308 getOrBuildFir returns null for this expression for plusAssign operator
  • KT-71348 K2: KotlinIllegalStateExceptionWithAttachments: 'By now the annotations argument mapping should have been resolved' during code inspection
  • KT-72024 FirClassVarianceChecker: Expected FirResolvedTypeRef with ConeKotlinType but was FirImplicitTypeRefImplWithoutSource
  • KT-71746 K2 IDE. ISE: Zero or multiple overrides found for descriptor in FirRegularClassSymbol serializing/ExternalSerializer and red code on @Serializer(forClass) ` usage

Analysis API. Infrastructure

  • KT-72922 KotlinFakeClsStubsCache project leakage
  • KT-71988 Improve scripts test coverage by LL FIR
  • KT-64687 K2: Analysis API: migrate AbstractFirLibraryModuleDeclarationResolveTest to kotlin repo

Analysis API. Light Classes

  • KT-66763 K2: Get rid of context receivers in Analysis API and LL API
  • KT-71781 SLC: migrate SLC from KotlinModificationTrackerService to KotlinModificationTrackerFactory
  • KT-67963 K2: PsiInvalidElementAccessException on redeclaration of class with constructor
  • KT-71407 K2: Do not report @JvmField default value as PsiField initializer in K2
  • KT-72078 K2 PSI change for constructor parameter with value class type

Analysis API. Providers and Caches

  • KT-73395 Analysis API: JavaElementPsiSourceWithSmartPointer contains strong references to PSI
  • KT-72390 Kotlin project full of red code
  • KT-72388 KaFirStopWorldCacheCleaner: Control-flow exceptions
  • KT-72644 "PSI has changed since creation" reason is misleading

Analysis API. Standalone

  • KT-70346 Analysis API Standalone: Remove the custom class loader option in Standalone session creation

Analysis API. Stubs and Decompilation

  • KT-69398 K2 IDE: SOE on editing top level private variable name
  • KT-72897 Analysis API: Smart PSI element pointers for KtEnumEntry stubs cannot be restored
  • KT-71565 KtClassOrObject should use isLocal from greenStub

Analysis API. Surface

New Features

  • KT-70301 Analysis API: 'KaSamConstructorSymbol' does not allow to find the constructed SAM type
  • KT-68236 Analysis API: add isExternal property for KtPropertySymbol
  • KT-68598 Analysis API: missed getClassLikeSymbolByClassId API

Performance Improvements

  • KT-60486 Analysis API: optimize KaExpressionTypeProvider.returnType for simple cases

Fixes

  • KT-72099 Analysis API: implement an API to retrieve default imports
  • KT-70356 analyzeCopy with IGNORE_SELF cannot find private members
  • KT-66783 Analysis API: KtFirSymbolProvider creates symbols when given PSI from unrelated modules
  • KT-72937 Migrate KaFirReceiverParameterSymbol to KaFirSymbol/KaFirKtBasedSymbol
  • KT-70243 K2 IDE: PsiMethod.callableSymbol returns null for constructor
  • KT-66608 Support OperatorFunctionChecks#isOperator in AA
  • KT-73068 Analysis API: A KaFirJavaFieldSymbol for a static Java field is open instead of final
  • KT-73055 Get rid of the deprecated Analysis API API
  • KT-65065 Provide KtTypeReference#getShortTypeText()
  • KT-63800 AA: this reference shortener doesn't simplify label
  • KT-72793 Analysis API: 'expressionType' returns raw type for typealiased constructors calls
  • [KT-72658...
Read more

Kotlin 2.1.0

27 Nov 14:17
Compare
Choose a tag to compare

Changelog

Analysis API

New Features

  • KT-68603 KotlinDirectInheritorsProvider: add an option to ignore non-kotlin results

Performance Improvements

  • KT-70757 Performance problem in KaFirVisibilityChecker for KaFirPsiJavaClassSymbol

Fixes

  • KT-70437 Class reference is not resolvable
  • KT-57733 Analysis API: Use optimized ModuleWithDependenciesScopes in combined symbol providers
  • KT-72389 K2: False positive "Redundant 'protected' modifier" for protected property inside protected constructor from private or internal class
  • KT-69190 K2: False-positive "redundant private modifier"
  • KT-64984 Analysis API: Support Wasm target
  • KT-70375 K2: NPE at org.jetbrains.kotlin.analysis.api.fir.symbols.KaFirNamedClassSymbolBase.createPointer
  • KT-71259 K2 evaluator: Invalid smart cast info collecting for Code Fragments
  • KT-69360 Lack of implicit receiver for the last statement under lambda in scripts
  • KT-70890 Analysis API: Experiment with weak references to LL FIR/analysis sessions in session caches
  • KT-70657 Analysis API: Inner types from classes with generics are incorrectly represented by the compiled jars
  • KT-71055 Suspend calls inside 'analyze()' break the block guarantees
  • KT-70815 Analysis API: Implement stop-the-world session invalidation
  • KT-69819 K2 IDE: LHS type in callable references is unresolved when it has type arguments and is qualified
  • KT-68761 Analysis API: Experiment with limited-size cache in KaFirSessionProvider
  • KT-70384 Analysis API Standalone: The same class in the same two renamed jars is unresolved
  • KT-71067 Exceptions from references cancel Find Usages
  • KT-69535 Redesign 'containingSymbol'
  • KT-71025 K2 IDE: Scopes in "importingScopeContext" have reversed ordering and "indexInTower" values
  • KT-67483 K2 IDE: Serializable plugin causes infinite resolve recursion when there is a star import from a class with annotation call
  • KT-69416 K2 IDE / Completion: β€œNo classifier found” on simple value creating
  • KT-70257 CCE: class kotlin.UInt cannot be cast to class java.lang.Number
  • KT-70376 K2 IDE / Kotlin Debugger: IAE β€œOnly componentN functions should be cached this way, but got: toString” on evaluating toString() method for value class
  • KT-70264 AA: service registration via XML fails with AbstractMethodError in Lint CLI
  • KT-69950 Analysis API: Introduce isSubtypeOf(ClassId)
  • KT-68625 K2: β€œlazyResolveToPhase(STATUS) cannot be called from a transformer with a phase STATUS.”
  • KT-67665 K2: contract violation for value class with a constructor parameter with an implicit type
  • KT-67009 Analysis API: Add abbreviated type tests for type aliases from source modules
  • KT-69977 KaFirFunctionalType#getAbbreviation is always null
  • KT-68341 Analysis API: Expanded function types from libraries don't have an abbreviated type
  • KT-68857 Analysis API: Refactor annotations
  • KT-70386 Do not filter out overloads from different libraries in dangling files
  • KT-65552 K2: CANNOT_CHECK_FOR_ERASED in KtTypeCodeFragment
  • KT-65803 K2: Analysis API: KtFirTypeProvider#getSubstitutedSuperTypes throws an exception in the case of "Wrong number of type arguments"
  • KT-68896 Support VirtualFile binary dependency inputs to Analysis API modules
  • KT-69395 K2 IDE: incorrect overload selection from binary dependencies in a shared native source set
  • KT-68573 ISE: "Unexpected constant value (kotlin/annotation/AnnotationTarget, CLASS)" at Kt1DescUtilsKt.toKtConstantValue()
  • KT-69576 Analysis API: FIR implementation of "isImplicitReferenceToCompanion" returns false for companion references in implicit invoke operator calls
  • KT-69568 Analysis API: FIR implementation of "isImplicitReferenceToCompanion" returns true for non-companion references in qualified calls
  • KT-69436 Analysis API Platform: Encapsulate LLFirDeclarationModificationService as an engine service
  • KT-63004 K2: Analysis API: Design API for querying declarations generated by compiler plugins (similar to indices)
  • KT-69452 AA FIR: wrong source PSI after compile-time evaluation
  • KT-69598 AA: definitely not-null type at receiver position should be wrapped in parenthesis
  • KT-60484 Analysis API: add support for KtType pointers similar to KtSymbolPointer
  • KT-68884 Analysis API: Rename/deprecate/remove declarations as part of Stabilization
  • KT-69453 AA FIR: miss to handle expected type of lambda with explicit label
  • KT-69533 Protect implementation parts of Analysis API with opt-in annotations

Analysis API. FIR

Performance Improvements

  • KT-71566 FirElementBuilder#getFirForNonKtFileElement should iterate a Psi file over and over
  • KT-71224 Analysis API: FirElementFinder.collectDesignationPath relies on naive iteration through FIR files

Fixes

  • KT-70327 Analysis API: Batch inspection causes deadlock in ValueWithPostCompute
  • KT-69070 Analysis API: Querying declared member scope for Java symbols results in exception in some use cases
  • KT-68268 LLSealedInheritorsProvider: reduce scope to kotlin files
  • KT-69671 TYPES phase contract violation through JavaSymbolProvider
  • KT-70624 Declaration symbols from code fragments are treated as not local
  • KT-70662 NPE: FirLazyBodiesCalculatorKt.calculateLazyBodyForProperty
  • KT-70859 Do not fail highlighting due to resolution problems
  • KT-70474 FirLazyResolveContractViolationException from JavaSymbolProvider
  • KT-70323 FirLazyResolveContractViolationException: lazyResolveToPhase(TYPES) cannot be called from a transformer with a phase TYPES
  • KT-71567 LLFirCompilerRequiredAnnotationsTargetResolver should calculate annotation arguments on demand
  • KT-71584 getNonLocalContainingOrThisDeclaration treats KtParameter from functional type as non-local

Analysis API. Light Classes

Performance Improvements

  • KT-69998 Drop redundant cache from ClassInnerStuffCache

Fixes

  • KT-69833 Support value classes
  • KT-71693 Wrong name mangling for JvmField class property and companion property clash
  • KT-71469 KtLightClassForDecompiledDeclaration: missed kotlinOrigin
  • KT-70710 Provide light classes for KMP modules in Android Lint
  • KT-70548 SLC: text of class object access expression is not the same as raw text
  • KT-70572 SLC: missing isInheritor implementation for type parameter
  • KT-70491 SLC: inconsistent source PSI of no-arg constructor for all default values
  • [KT-70458](https://youtrack.jetbrains.co...
Read more

Kotlin 2.1.0-RC2

18 Nov 14:12
Compare
Choose a tag to compare
Kotlin 2.1.0-RC2 Pre-release
Pre-release

Changelog

Compiler

  • KT-72345 K2: Method 'get' without @Override annotation not called
  • KT-73065 CCE with context receivers
  • KT-72996 false-positive unresolved reference error on an overloaded callable reference in a lambda return position on the left-hand size of an elvis operator

Compose compiler

  • CMP-6926 iOS compilation failure: Unresolved reference 'copy'

IR. Inlining

  • KT-72884 Internal error in body lowering: IllegalStateException: Can't inline given reference, it should've been lowered

JavaScript

  • KT-70533 KJS: changed string concatenation behavior in 2.0
  • KT-14013 JS toString produces different result for nullable/non-nullable ref to the same array
  • KT-43567 KJS: toString() method and string interpolation of variable produce different code
  • KT-72732 KJS / ES6: "SyntaxError: 'super' keyword unexpected here" with enabled -Xir-generate-inline-anonymous-functions and disabled arrow functions

Klibs

  • KT-72965 Ignore subclassOptInRequired constructor warning

Tools. Compiler Plugins

  • KT-72804 Regression in Kotlin 2.1.0: compilation fails when building iOS
  • KT-72824 Kotlin power-assert plugin StringIndexOutOfBoundsException

Tools. Gradle

  • KT-47897 Official Kotlin Gradle plugin api
  • KT-58858 Add KDoc documentation for Kotlin Gradle plugin API
  • KT-73076 Kotlin Gradle Plugin API Reference: adjust settings
  • KT-70543 Gradle: create migration guide for those who are using Kotlin compiler classes indirectly available in buildscripts

Kotlin 2.1.0-RC

04 Nov 14:34
Compare
Choose a tag to compare
Kotlin 2.1.0-RC Pre-release
Pre-release

Changelog

Backend. Wasm

  • KT-72297 [Wasm] Unused associated object class lead to compiler fail

Compiler

  • KT-72281 K/N: "Failed to wait for cache to be built"
  • KT-72238 Argument type mismatch in builder inside extension function after ?:
  • KT-71751 K2: Skipping code in last statement of lambda
  • KT-72552 AutoboxingTransformer fails on during linkage on nested lambdas with cinteroped types
  • KT-71649 K2: Put operator on mutableMap<T?, V>() causes crashes on null key
  • KT-71508 JAVA_CLASS_INHERITS_KT_PRIVATE_CLASS isn't reported when java class is inherited from an effectively private class
  • KT-72178 K2: "Unexpected FirPlaceholderProjectionImpl" exception when using "_" as key type in EnumMap
  • KT-72302 K2: no error on type operator in annotation parameter default value
  • KT-72173 K2: simple object names from root package are resolved without imports in non-root packages when used as values

Compose compiler

  • b/376058538 Fix stack overflow when inferring stability of indirect generic loop
  • b/339322843 Transform @Composable property delegate references

IR. Inlining

  • KT-72521 Kotlin/Native: java.lang.AssertionError: kfun:androidx.compose.runtime#access$<get-androidx_compose_runtime_ProvidedValue$stable>$p$tComposerKt(){}kotlin.Int
  • KT-72623 Don't generate synthetic accessors in files other than the one being lowered

IR. Interpreter

  • KT-72356 K2 Native: IllegalStateException when annotation has the same source range as a constant in another file

Native. Runtime. Memory

  • KT-71401 K/N: CMS barrier can be executed on an unregisterred thread

Tools. CLI

  • KT-72311 KotlinCliJavaFileManagerImpl caches empty result and broke repeated analyses

Tools. Daemon

  • KT-72530 The daemon has terminated unexpectedly on startup attempt #1 with error code: Unknown

Tools. Gradle

  • KT-72467 kotlin.sourceSets extension not added for KotlinBaseApiPlugin.createKotlinAndroidExtension()
  • KT-72495 Warn about kotlin-compiler-embeddable loaded along KGP
  • KT-72387 KGP 2.1.0-RC-227 changes cause KSP to crash calling produceUnpackedKlib
  • KT-72303 KGP 2.1.0-Beta2 broke compatibility with KSP
  • KT-72651 Unable to use target for KotlinBaseApiPlugin.createKotlin(Jvm/Android)Extension()

Tools. Gradle. Multiplatform

  • KT-72454 Revert changes made in KT-69899 i.e. make kotlin.android.buildTypeAttribute.keep = false by default again

Tools. Gradle. Native

  • KT-72366 KGP 2.1.0-Beta2 doesn't download kotlin-native-prebuilt when running Dokka
  • KT-71051 K/N dependencies are re-downloaded multiple times on Windows

Tools. JPS

  • KT-68565 K2: IllegalStateException: Source classes should be created separately before referencing

Tools. Kapt

  • KT-71776 K2 Kapt in 2.1.0-Beta1 fails with e: java.lang.IllegalStateException: FIR symbol "class org.jetbrains.kotlin.fir.symbols.impl.FirValueParameterSymbol" is not supported in constant evaluation

Kotlin 2.1.0-Beta2

14 Oct 12:52
Compare
Choose a tag to compare
Kotlin 2.1.0-Beta2 Pre-release
Pre-release

Changelog

Analysis API. Caches and Invalidation

  • KT-71700 Cache result of resolveToCall
  • KT-71520 Analysis API: LLFirNativeForwardDeclarationsSymbolProvider spends a lot of time in indices

Analysis API. Lazy Resolution

  • KT-71567 LLFirCompilerRequiredAnnotationsTargetResolver should calculate annotation arguments on demand
  • KT-71584 getNonLocalContainingOrThisDeclaration treats KtParameter from functional type as non-local
  • KT-71566 FirElementBuilder#getFirForNonKtFileElement should iterate a Psi file over and over
  • KT-71224 Analysis API: FirElementFinder.collectDesignationPath relies on naive iteration through FIR files

Analysis API. Light Classes

  • KT-71693 Wrong name mangling for JvmField class property and companion property clash
  • KT-71469 KtLightClassForDecompiledDeclaration: missed kotlinOrigin

Analysis API. Stubs and Decompilation

  • KT-71565 KtClassOrObject should use isLocal from greenStub

Analysis API. Surface

  • KT-71731 directlyOverridenSymbols/allOverridenSymbols works incorrectly for intersection overrides

Analysis. API

Performance Improvements

  • KT-70165 Introduce PSI-based KaSymbols for K2

Fixes

  • KT-64984 Analysis API: Support Wasm target
  • KT-70375 K2: NPE at org.jetbrains.kotlin.analysis.api.fir.symbols.KaFirNamedClassSymbolBase.createPointer
  • KT-57733 Analysis API: Use optimized ModuleWithDependenciesScopes in combined symbol providers
  • KT-70437 Class reference is not resolvable
  • KT-70327 Analysis API: Batch inspection causes deadlock in ValueWithPostCompute
  • KT-71259 K2 evaluator: Invalid smart cast info collecting for Code Fragments
  • KT-65110 Analysis API: In Standalone mode the order of symbols is unstable
  • KT-71468 Drop redundant logic from LLFirJavaFacadeForBinaries
  • KT-70890 Analysis API: Experiment with weak references to LL FIR/analysis sessions in session caches
  • KT-70474 FirLazyResolveContractViolationException from JavaSymbolProvider
  • KT-70657 Analysis API: Inner types from classes with generics are incorrectly represented by the compiled jars
  • KT-71055 Suspend calls inside 'analyze()' break the block guarantees
  • KT-70815 Analysis API: Implement stop-the-world session invalidation
  • KT-69819 K2 IDE: LHS type in callable references is unresolved when it has type arguments and is qualified
  • KT-68761 Analysis API: Experiment with limited-size cache in KaFirSessionProvider
  • KT-70384 Analysis API Standalone: The same class in the same two renamed jars is unresolved
  • KT-71067 Exceptions from references cancel Find Usages
  • KT-69190 K2: False-positive "redundant private modifier"
  • KT-63390 K2: Analysis API: add annotations to KtClassInitializerSymbol
  • KT-71025 K2 IDE: Scopes in "importingScopeContext" have reversed ordering and "indexInTower" values

Apple Ecosystem

  • KT-69093 Xcode 16 support in Kotlin
  • KT-66894 XCFramework task fails when name passed to xcframework DSL is different from framework's name
  • KT-65675 XCFrameworkTask produces an xcframework with mismatched casing in embedded frameworks

Backend. Native. Debug

  • KT-71374 lldb: step out breaks breaking in Xcode 16

Backend. Wasm

  • KT-72156 custom-formatters.js exists in JAR after publishToMavenLocal but not in the published artifact in Maven public
  • KT-70331 Support incremental compilation for the Wasm backend
  • KT-71686 K/Wasm: Add functions to convert between Kotlin and JS array types
  • KT-71473 K/Wasm: Use --closed-world and related options for Binaryen
  • KT-71800 Wasm compiler: Fix member generation for data classes with an array-type property
  • KT-71580 String::toFloat on wasm behaves differently compared to other targets
  • KT-71523 K/Wasm: cleanup after fix for KT-71474
  • KT-71475 K/Wasm: KClass::qualifiedName returns incorrect result for nested or companion objects
  • KT-71474 K/Wasm: KProperty*Impl equals work incorrectly for clabbale reference created in different files or modules
  • KT-71294 Wasm Artifacts/Resource are being loaded relatively instead of absolutely

Compiler

New Features

  • KT-71094 Kotlin/Native incremental compilation: fail compilation if cache build failed
  • KT-70679 Kotlin/Native: fill WritableTypeInfo from Swift Export type mapping
  • KT-54227 Cannot use nullable Nothing as reified type parameter
  • KT-71430 Kotlin-to-Java direct actualization implementation
  • KT-68163 Expose supplementary compiler warnings via CLI

Performance Improvements

  • KT-71159 [K2] OOM on large enum classes with fields

Fixes

  • KT-71480 JAVA_CLASS_INHERITS_KT_PRIVATE_CLASS isn't reported while java object isn't created
  • KT-71508 JAVA_CLASS_INHERITS_KT_PRIVATE_CLASS isn't reported when java class is inherited from an effectively private class
  • KT-71260 K2: Internal compiler error in IrFakeOverrideSymbolBase.getOwner when there is no actual for expect
  • KT-58820 OPT_IN_USAGE_ERROR's message text does not account for SubclassOptInRequired
  • KT-71034 Failing compiler/testData/codegen/box/inlineClasses/kt70461.kt
  • KT-71016 K/Wasm: Failing compiler/testData/codegen/box/inlineClasses/kt70461.kt
  • KT-60521 Drop language versions 1.4 and 1.5
  • KT-72154 Dokka fails with not array: KClass<out Annotation> on Kotlin 2.1.20-dev with @SubclassOptInRequired
  • KT-70562 @SubclassOptInRequired cannot accept multiple experimental marker
  • KT-71708 False negative UNSUPPORTED for collection literals as trailing return value
  • KT-52469 Deprecate reified type parameter instantiating into intersection types
  • KT-71563 'llegalStateException: Source classes should be created separately before referencing' when actualized through typealias and java direct actualization
  • KT-71756 K2 evaluator: broken resolve of private members during debug of Kotlin project itself
  • KT-71550 JVM IR: NPE on identity equals of boolean true with null
  • KT-71490 K2: missing REDUNDANT_ELSE_IN_WHEN
  • KT-64403 Implement BlackBoxCodegenTestSpecGenerated for K2
  • KT-71551 JVM IR K1: NPE on generating a function imported from an object from another module
  • KT-71210 K2: false negative FUNCTION_CALL_EXPECTED / NESTED_CLASS_ACCESSED_VIA_INSTANCE_REFERENCE with companion objects
  • KT-69549 Try to move callable reference transformation earlier in pipeline
  • KT-71228 K2: "IllegalAr...
Read more

Kotlin 2.0.21

10 Oct 11:45
Compare
Choose a tag to compare

Changelog

Apple Ecosystem

Backend. Native. Debug

  • KT-71374 lldb: step out breaks breaking in Xcode 16

Compiler

Fixes

  • KT-69735 K2: Static fields are missing from the declaration list of corresponding IrClass for java class
  • KT-71122 Regression in Kotlin Compiler 2.0 causing NPE in the runtime
  • KT-70931 K2 / Scripts: "cannot convert IrExpression to ConstantValue" when using function annotation
  • KT-70584 K2: "IllegalStateException: flow for PostponedLambdaExitNode not initialized - traversing nodes in wrong order?"
  • KT-70808 K2: "node has already been visited" with anonymous object in dead code
  • KT-69985 K2: Classifier declarations from root package are resolved without imports in non-root packages
  • KT-70683 K2: Internal compiler error in IrFakeOverrideSymbolBase.getOwner
  • KT-70901 False positive Public-API inline function cannot access non-public-API property accessor
  • KT-70930 K2: Java annotations not present on ENUM_ENTRY IR elements
  • KT-70194 K2 IDE: exception on a very red file
  • KT-69399 Native: IllegalStateException: "Failed to build cache"

Compose compiler

Fixes

  • b/329477544 Force open / overridden Composable functions to be non-restartable.
  • b/361652128 Disable live literal transform if the corresponding flag is disabled

IR. Actualizer

  • KT-70894 IR crash. Unprocessed IrFunctionFakeOverrideSymbol when actualize to Java

IR. Tree

  • KT-71191 SymbolTable: Check if the provided signature is public before adding a symbol to the SymbolTable

Native. Build Infrastructure

  • KT-71485 K/N runtime parts don't build due to _Float16 issues on x86_64 macOS

Native. C Export

  • KT-69507 LLVM 11 clang with Xcode 16 headers: standard c++ headers

Native. C and ObjC Import

  • KT-71029 Investigate why stdarg.h declarations leak into testModuleA

Native. Platform Libraries

  • KT-70566 LLVM 11 clang with Xcode 16 headers: 'sys/cdefs.h' file not found
  • KT-71624 Eliminate remaining UIKit/AppKit removed signatures
  • KT-70031 Rebuild platform libraries in 2.0.21 with Xcode 16

Native. Testing

  • KT-70603 C++ with -fmodules: cyclic dependency in module 'std': std -> _wctype -> __wctype -> std in dev llvm toolchains

Tools. CLI. Native

  • KT-71262 KotlinNativeLink tasks fetching from network despite -Xoverride-konan-properties=dependenciesUrl= being set

Tools. Compiler Plugins

  • KT-71038 PowerAssert: Constant on RHS of elvis operator leads to compiler crash

Tools. Daemon

  • KT-35381 Get rid of the native-platform usage in kotlin compiler

Tools. Gradle. Multiplatform

  • KT-71444 Certain POMs produced by Kotlin 2.0.20 cannot be consumed by KMP projects with Android targets
  • KT-70700 Gradle 8.10: The value for task ':commonizeNativeDistribution' property 'kotlinNativeBundleBuildService' cannot be changed any further
  • KT-71396 Gradle client side JVM explodes with OOM due to xcodebuild logs

Tools. Gradle. Native

  • KT-71419 Light bundle KGP IT run against a stable K/N version

Tools. JPS

  • KT-71450 Constant build failure: com.intellij.util.io.ClosedStorageException: storage is already closed

Kotlin 2.0.21-RC

01 Oct 08:42
Compare
Choose a tag to compare
Kotlin 2.0.21-RC Pre-release
Pre-release

2.0.21-RC

Apple Ecosystem

Backend. Native. Debug

  • KT-71374 lldb: step out breaks breaking in Xcode 16

Compiler

Fixes

  • KT-69735 K2: Static fields are missing from the declaration list of corresponding IrClass for java class
  • KT-71122 Regression in Kotlin Compiler 2.0 causing NPE in the runtime
  • KT-70931 K2 / Scripts: "cannot convert IrExpression to ConstantValue" when using function annotation
  • KT-70584 K2: "IllegalStateException: flow for PostponedLambdaExitNode not initialized - traversing nodes in wrong order?"
  • KT-70808 K2: "node has already been visited" with anonymous object in dead code
  • KT-69985 K2: Classifier declarations from root package are resolved without imports in non-root packages
  • KT-70683 K2: Internal compiler error in IrFakeOverrideSymbolBase.getOwner
  • KT-70901 False positive Public-API inline function cannot access non-public-API property accessor
  • KT-70930 K2: Java annotations not present on ENUM_ENTRY IR elements
  • KT-70194 K2 IDE: exception on a very red file
  • KT-69399 Native: IllegalStateException: "Failed to build cache"

Compose compiler

Fixes

  • b/329477544 Force open / overridden Composable functions to be non-restartable.
  • b/361652128 Disable live literal transform if the corresponding flag is disabled

IR. Actualizer

  • KT-70894 IR crash. Unprocessed IrFunctionFakeOverrideSymbol when actualize to Java

IR. Tree

  • KT-71191 SymbolTable: Check if the provided signature is public before adding a symbol to the SymbolTable

Native. Build Infrastructure

  • KT-71485 K/N runtime parts don't build due to _Float16 issues on x86_64 macOS

Native. C Export

  • KT-69507 LLVM 11 clang with Xcode 16 headers: standard c++ headers

Native. C and ObjC Import

  • KT-71029 Investigate why stdarg.h declarations leak into testModuleA

Native. Platform Libraries

  • KT-70566 LLVM 11 clang with Xcode 16 headers: 'sys/cdefs.h' file not found
  • KT-71624 Eliminate remaining UIKit/AppKit removed signatures
  • KT-70031 Rebuild platform libraries in 2.0.21 with Xcode 16

Native. Testing

  • KT-70603 C++ with -fmodules: cyclic dependency in module 'std': std -> _wctype -> __wctype -> std in dev llvm toolchains

Tools. CLI. Native

  • KT-71262 KotlinNativeLink tasks fetching from network despite -Xoverride-konan-properties=dependenciesUrl= being set

Tools. Compiler Plugins

  • KT-71038 PowerAssert: Constant on RHS of elvis operator leads to compiler crash

Tools. Daemon

  • KT-35381 Get rid of the native-platform usage in kotlin compiler

Tools. Gradle. Multiplatform

  • KT-71444 Certain POMs produced by Kotlin 2.0.20 cannot be consumed by KMP projects with Android targets
  • KT-70700 Gradle 8.10: The value for task ':commonizeNativeDistribution' property 'kotlinNativeBundleBuildService' cannot be changed any further
  • KT-71396 Gradle client side JVM explodes with OOM due to xcodebuild logs

Tools. Gradle. Native

  • KT-71419 Light bundle KGP IT run against a stable K/N version

Tools. JPS

  • KT-71450 Constant build failure: com.intellij.util.io.ClosedStorageException: storage is already closed

Kotlin 2.1.0-Beta1

17 Sep 13:09
Compare
Choose a tag to compare
Kotlin 2.1.0-Beta1 Pre-release
Pre-release

Changelog

Analysis. API

New Features

  • KT-68603 KotlinDirectInheritorsProvider: add an option to ignore non-kotlin results
  • KT-69961 resolveToCallCandidates should support properties
  • KT-69960 resolveToCallCandidates should support operators

Performance Improvements

  • KT-70757 Performance problem in KaFirVisibilityChecker for KaFirPsiJavaClassSymbol
  • KT-70529 KaSymbol: reduce the number of cached usages

Fixes

  • KT-65618 K2: resulted FirClass.psi != requested PsiClass from completion
  • KT-70323 FirLazyResolveContractViolationException: lazyResolveToPhase(TYPES) cannot be called from a transformer with a phase TYPES
  • KT-69535 Redesign 'containingSymbol'
  • KT-70859 Do not fail highlighting due to resolution problems
  • KT-67483 K2 IDE: Serializable plugin causes infinite resolve recursion when there is a star import from a class with annotation call
  • KT-63490 Analysis API: Accessing the Analysis API should be prohibited during dumb mode
  • KT-69416 K2 IDE / Completion: β€œNo classifier found” on simple value creating
  • KT-70663 KaFirDestructuringDeclarationSymbol: Failed requirement
  • KT-70662 NPE: FirLazyBodiesCalculatorKt.calculateLazyBodyForProperty
  • KT-70661 Invalid FirDeclarationOrigin ScriptTopLevelDestructuringDeclarationContainer
  • KT-70624 Declaration symbols from code fragments are treated as not local
  • KT-70257 CCE: class kotlin.UInt cannot be cast to class java.lang.Number
  • KT-69070 Analysis API: Querying declared member scope for Java symbols results in exception in some use cases
  • KT-70199 K2: ConcurrentModificationException at FirCallCompleter$LambdaAnalyzerImpl.analyzeAndGetLambdaReturnArguments
  • KT-70376 K2 IDE / Kotlin Debugger: IAE β€œOnly componentN functions should be cached this way, but got: toString” on evaluating toString() method for value class
  • KT-70264 AA: service registration via XML fails with AbstractMethodError in Lint CLI
  • KT-69381 Analysis API: Investigate the viability of current KaSymbol caches
  • KT-69950 Analysis API: Introduce isSubtypeOf(ClassId)
  • KT-68625 K2: β€œlazyResolveToPhase(STATUS) cannot be called from a transformer with a phase STATUS.”
  • KT-67009 Analysis API: Add abbreviated type tests for type aliases from source modules
  • KT-69977 KaFirFunctionalType#getAbbreviation is always null
  • KT-68341 Analysis API: Expanded function types from libraries don't have an abbreviated type
  • KT-68857 Analysis API: Refactor annotations
  • KT-70386 Do not filter out overloads from different libraries in dangling files
  • KT-65552 K2: CANNOT_CHECK_FOR_ERASED in KtTypeCodeFragment
  • KT-69360 Lack of implicit receiver for the last statement under lambda in scripts
  • KT-69699 Receiver type is not substituted in the case of conflict declarations
  • KT-70206 anonymousSymbol API throws an exception for regular functions
  • KT-65803 K2: Analysis API: KtFirTypeProvider#getSubstitutedSuperTypes throws an exception in the case of "Wrong number of type arguments"
  • KT-68896 Support VirtualFile binary dependency inputs to Analysis API modules
  • KT-69671 TYPES phase contract violation through JavaSymbolProvider
  • KT-69395 K2 IDE: incorrect overload selection from binary dependencies in a shared native source set
  • KT-68573 ISE: "Unexpected constant value (kotlin/annotation/AnnotationTarget, CLASS)" at Kt1DescUtilsKt.toKtConstantValue()
  • KT-69576 Analysis API: FIR implementation of "isImplicitReferenceToCompanion" returns false for companion references in implicit invoke operator calls
  • KT-69568 Analysis API: FIR implementation of "isImplicitReferenceToCompanion" returns true for non-companion references in qualified calls
  • KT-55124 Design common ancestor for KtValueParameter and KtReceiverParameterSymbol
  • KT-69436 Analysis API Platform: Encapsulate LLFirDeclarationModificationService as an engine service
  • KT-63004 K2: Analysis API: Design API for querying declarations generated by compiler plugins (similar to indices)
  • KT-69452 AA FIR: wrong source PSI after compile-time evaluation
  • KT-69679 KaDelegatedConstructorCall should have substituted signature
  • KT-69696 KaSymbolByFirBuilder should filter call-site substitutions
  • KT-69598 AA: definitely not-null type at receiver position should be wrapped in parenthesis
  • KT-60484 Analysis API: add support for KtType pointers similar to KtSymbolPointer
  • KT-68884 Analysis API: Rename/deprecate/remove declarations as part of Stabilization
  • KT-69292 K2: Analysis API: A property's MUST_BE_INITIALIZED diagnostic is not updated after changing field usage in an accessor
  • KT-69453 AA FIR: miss to handle expected type of lambda with explicit label
  • KT-69371 Analysis API: expose only interfaces/abstract classes for the resolution API
  • KT-69533 Protect implementation parts of Analysis API with opt-in annotations
  • KT-68268 LLSealedInheritorsProvider: reduce scope to kotlin files

Analysis. Light Classes

  • KT-70710 Provide light classes for KMP modules in Android Lint
  • KT-70548 SLC: text of class object access expression is not the same as raw text
  • KT-70572 SLC: missing isInheritor implementation for type parameter
  • KT-70491 SLC: inconsistent source PSI of no-arg constructor for all default values
  • KT-70458 SLC: missed auxiliaryOriginalElement for delegated property
  • KT-70232 Support a companion object inside value classes
  • KT-70349 @delegate:` annotations are missed for light class fields
  • KT-69833 Support value classes
  • KT-69998 Drop redundant cache from ClassInnerStuffCache
  • KT-68328 Move KtLightClassBase to ULC

Apple Ecosystem

  • KT-66262 Deprecate and remove support for bitcode embedding from the Kotlin Gradle plugin
  • KT-69119 xcodeVersion task fails if Xcode isn't installed and apple-specific native targets aren't declared

Backend. Wasm

  • KT-70786 Improve DX of the variable view during debugging in Chrome/Firefox for Kotlin/Wasm
  • KT-68185 [WasmJs] Attach js exception object to JsException
  • KT-65799 K/Wasm: remove default exports from wasm exports
  • KT-61130 K/Wasm: Function signatures may clash with base class internal methods from a friend module
  • KT-70394 Investigate increased wasm binary size after switching stdlib compilation to K2
  • KT-69627 Remove `create###A...
Read more

Kotlin 2.0.20

22 Aug 11:10
Compare
Choose a tag to compare

Changelog

Analysis. API

New Features

  • KT-68143 Analysis API: support KtWhenConditionInRange call resolution

Performance Improvements

  • KT-67195 K2: do not call redundant resolve on body resolution phase for classes

Fixes

  • KT-67360 Analysis API: KtDestructuringDeclarationSymbol#entries shouldn't be KtLocalVariableSymbol
  • KT-67748 K2: AllCandidatesResolver modifies the original FirDelegatedConstructorCall
  • KT-68198 Analysis API: Support application service registration in plugin XMLs
  • KT-62936 Analysis API: NativeForwardDeclarationsSymbolProvider is not supported for Kotlin/Native
  • KT-68689 LL API: support analysis from builtins module
  • KT-69630 KAPT User project builds with KAPT4 enabled fail with Metaspace overflow
  • KT-65417 K2 IDE: KTOR false positive expect-actual matching error on enum class because of implicit clone() in non-JVM source sets
  • KT-68882 Analysis API: Refactor KaSymbols
  • KT-65413 K2 IDE: KTOR unresolved serializer() call for @Serializable class in common code
  • KT-67996 Analysis API: rename Kt prefix to Ka
  • KT-67775 Analysis API: expose only interfaces/abstract classes for the user surface
  • KT-68009 K2: lowering transformers of Compose compiler plugin access AbstractFir2IrLazyFunction modality, which results in null point exception
  • KT-68918 collectCallCandidates works incorrectly for parenthesis invoke
  • KT-68462 Analysis API: Integrate project-structure module into analysis-api and analysis-api-platform-interface
  • KT-69131 AA: "provideDelegate" operator is not resolved from the delegation reference in FIR implementation
  • KT-69055 Analysis API: Stabilize KaScopes
  • KT-66216 K2 IDE. "FirDeclaration was not found for class org.jetbrains.kotlin.psi.KtProperty, fir is null" on incorrect string template
  • KT-68959 Introduce KaSeverity
  • KT-53669 Analysis API: redesign KtSymbolOrigin to distinguish kotlin/java source/library declarations
  • KT-68846 Mark KaFirReference and all implementations with internal modifier
  • KT-68845 Move KaSymbolBasedReference to resolution package
  • KT-68844 Move KaTypeProjection to types package
  • KT-65849 K2: Rename 'high-level-api' family of JARs to 'analysis-api'
  • KT-62540 Remove uses of TypeInfo.fromString and TypeInfo.createTypeText from Kotlin plugin
  • KT-62889 K2 IDE. FP MISSING_DEPENDENCY_CLASS on not available type alias with available underlying type
  • KT-68155 Analysis API: Add PSI validity check to analyze
  • KT-62343 Analysis API: fix binary incopatibility problems cause by KtAnalysisSessionProvider.analyze being inline
  • KT-68498 To get reference symbol the one should be KtSymbolBasedReference
  • KT-68393 Analysis API: Rename KaClassLikeSymbol. classIdIfNonLocal to classId
  • KT-62924 Analysis API: rename KtCallableSymbol.callableIdIfNonLocal -> callableId
  • KT-66712 K2 IDE. SOE on settings string template for string variable with the same name
  • KT-65892 K2: "We should be able to find a symbol" for findNonLocalFunction
  • KT-68273 AA: support KtFirKDocReference#isReferenceToImportAlias
  • KT-68272 AA: KtFirReference.isReferenceToImportAlias doesn't work for references on constructor
  • KT-66996 Analysis API: Expose the abbreviated type of an expanded KtType
  • KT-66646 K2: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImpl from FirJsHelpersKt.isExportedObject
  • KT-68203 K2: Analysis API: wrong type of receiver value in case of imported object member
  • KT-68031 LL resolve crash in case of PCLA inference with local object
  • KT-67851 K2: PsiReference#isReferenceTo always returns false for references to Java getters
  • KT-68076 AA: use type code fragments for import alias detection
  • KT-65915 K2: Analysis API: extract services registration into xml file
  • KT-68049 Analysis API: do not expose imported symbols
  • KT-68075 K2: Analysis API: Type arguments for delegation constructor to java constructor with type parameters not supported
  • KT-65190 AA: reference to the super type is not resolved
  • KT-68070 AA: KtExpressionInfoProvider#isUsedAsExpression doesn't work for KtPropertyDelegate
  • KT-67743 K2: Stubs & AbbreviatedTypeAttribute
  • KT-67706 K2: "KtDotQualifiedExpression is not a subtype of class KtNamedDeclaration" from UnusedChecker
  • KT-68021 Analysis API: do not break the diagnostic collection in a case of exception from some collector
  • KT-67973 AA FIR: wrong KtCall modeling for == from type bound
  • KT-67949 AA: Type arguments of Java methods' calls are not reported as used by KtFirImportOptimizer
  • KT-67988 AA: functional type at receiver position should be wrapped in parenthesis
  • KT-66536 Analysis API: ContextCollector doesn't provide implicit receivers from FirExpressionResolutionExtension
  • KT-67321 AA: Type arguments of Java methods' calls are not resolved
  • KT-64158 K2: "KotlinIllegalArgumentExceptionWithAttachments: No fir element was found for KtParameter"
  • KT-60344 K2 IDE. "KotlinExceptionWithAttachments: expect createKtCall to succeed for resolvable case with callable symbol" on attempt to assign value to param named getParam
  • KT-64599 K2: "expect createKtCall to succeed for resolvable case with callable" for unfinished if statement
  • KT-60330 K2 IDE. ".KotlinExceptionWithAttachments: expect createKtCall to succeed for resolvable case with callable symbol" on attempt to assign or compare true with something
  • KT-66672 K2 IDE. False positive INVISIBLE_REFERENCE on accessing private subclass as type argument in parent class declaration
  • KT-67750 Analysis API: Remove infix modifiers from type equality and subtyping functions
  • KT-67655 Analysis API: declare a rule how to deal with parameters in KtLifetimeOwner
  • KT-61775 Analysis API: KtKClassAnnotationValue lacks complete type information
  • KT-67168 K2: Analysis API: Rendering is broken for JSR-305 enhanced Java types
  • KT-66689 Analysis API: KtFirPackageScope shouldn't rely on KotlinDeclarationProvider for binary dependencies in standalone mode
  • KT-60483 Analysis API: add isTailrec property to KtFunctionSymbol
  • KT-67472 K2: Analysis API FIR: KtFunctionCall misses argument with desugared expressions
  • KT-65759 Analysis API: Avoid hard references to LLFirSession in session validity trackers
  • KT-60272 K2: Implement active invalidation of KtAnalysisSessions
  • KT-66765 K2: Analysis API: support classpath substituti...
Read more

Kotlin 2.0.20-RC2

13 Aug 12:18
Compare
Choose a tag to compare
Kotlin 2.0.20-RC2 Pre-release
Pre-release

Changelog

Backend. Wasm

  • KT-70591 To much sources that don't exist inside SourceMap file

Compiler

  • KT-70186 Kotlin 2.0.20-Beta2: Unexpected number of type arguments: 0
  • KT-69835 K2 / Native: kotlin.native.binary.gc=cms throws library cached but its dependency isn't error
  • KT-70417 DELEGATED_MEMBER_HIDES_SUPERTYPE_OVERRIDE leads to NPE in BE
  • KT-69964 K2: Returning from an in-place lambda doesn't compile
  • KT-69995 K2: Slow compilation when star projecting mutually recursive bounds from java
  • KT-69773 K2: "Overload resolution ambiguity between candidate" with arrays
  • KT-70238 K2: false negative VOLATILE_ON_VALUE for constructor properties
  • KT-69766 K2: False negative: Internal setter of generic class is accessible from another module
  • KT-69898 K2: Performance degradation in fir2ir caused by changes around intersection types

Compose compiler

  • b/357878245 Disallow open @Composable functions with default params to fix binary compatibility issues.

JavaScript

  • KT-70592 "Error: HttpClientCall expected" on HTTP request when targeting es2015 with KTOR
  • KT-67355 KJS / ES6: 'super' in lambda with enabled -Xir-generate-inline-anonymous-functions leads to JS errors

Libraries

  • KT-70196 Introduce ExperimentalUuidApi annotation for marking Uuid API

Native

  • KT-70166 Native: EXC_BAD_ACCESS on watchOS when using Dispatchers
  • KT-69246 K2: linkPodDebugFrameworkIosArm64 takes 15 (!!) times longer

Native. Runtime

  • KT-70043 Native: EXC_BAD_ACCESS on watchOS when using Random

Tools. Compiler plugins. Serialization

  • KT-70516 KxSerialization: @KeepGeneratedSerializer and sealed class cause initialization error

Tools. Gradle. JS

  • KT-70077 [2.0.20-Beta2] KGP reports confusing warnings about js/wasmJS source sets

Tools. Wasm

  • KT-70220 K/Wasm: Upgrade NPM dependencies