Skip to content

Releases: JetBrains/kotlin

Kotlin 2.0.0-RC3

10 May 11:01
Compare
Choose a tag to compare
Kotlin 2.0.0-RC3 Pre-release
Pre-release

Changelog

Apple Ecosystem

  • KT-67892 KotlinNativeLink task instantiates with a fixed list of apiFiles

Compiler

  • KT-67993 K2: PCLA Inference throws exception with local objects
  • KT-67912 K2: Cannot inference type properly from inline function with Type parameter
  • KT-68056 Prohibit referencing java field in case of conflict with property from companion object of the derived class
  • KT-67609 K2: False negative INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_ERROR
  • KT-67875 K2: Resolution ambiguity between Iterable and varargs
  • KT-67699 Not enough information to infer type argument for 'Error' using Arrow's Raise context receiver since Kotlin 2.0.0-Beta3
  • KT-59897 K2: Disappeared PACKAGE_OR_CLASSIFIER_REDECLARATION
  • KT-50020 K2: False-negative USAGE_IS_NOT_INLINEABLE when lambda in receiver position
  • KT-67810 K2: public-API inline function cannot access non-public-API annotation enum

JavaScript

  • KT-67978 K2: Declaration of such kind (expect) cannot be exported to JavaScript

Native

  • KT-67218 Native: nested classes in kx.serialization ProtoBuf produce empty array for release binary

Tools. Gradle

  • KT-67746 Indicate for users they need to apply the new Kotlin Compose Gradle plugin
  • KT-67387 Enable intrinsic remember by default in compose compiler gradle plugin
  • KT-67762 Rename Kotlin Compose Compiler plugin on Gradle portal
  • KT-67778 Clarify documentation for compose metricsDestination property

Tools. Gradle. Multiplatform

  • KT-67806 KMP import fails if android target has flavors
  • KT-67636 Gradle configuration error when use withJava()
  • KT-67042 K2: Unresolved reference 'convertRadiusToSigma'

Tools. Scripts

  • KT-67727 Kotlin Scripting with language version 2.0 fails during IR lowering on empty scripts

Tools. Wasm

  • KT-67785 Kotlin/Wasm: Node.JS 22 does not need experimental-wasm-gc flag anymore

1.9.24

07 May 09:49
Compare
Choose a tag to compare

Changelog

Backend. Wasm

  • KT-64890 K/Wasm compiler crash with external class and Kodein

Compiler

  • KT-65235 JDK 21 might lead to change in overloads resolution
  • KT-66768 K1: False positive UNRESOLVED_REFERENCE in super.getFirst/getLast call

Native

  • KT-67218 Native: nested classes in kx.serialization ProtoBuf produce empty array for release binary

Tools. Gradle

  • KT-67139 Build reports can be overridden
  • KT-67138 Json report is empty for incremental compilation

Tools. Gradle. Multiplatform

  • KT-67127 KMP: IDE Dependency Resolver for CInterops reports errors on linux and windows machines
  • KT-66514 Don't get output file from Cinterop task for IDE Import if host os doesn't support it

Tools. JPS

  • KT-65043 JPS dumb mode should respect maps needed for the compiler

Tools. Wasm

  • KT-67785 Kotlin/Wasm: Node.JS 22 does not need experimental-wasm-gc flag anymore
  • KT-65864 K/Wasm: update Node.js to 22.x

Kotlin 2.0.0-RC2

29 Apr 13:40
Compare
Choose a tag to compare
Kotlin 2.0.0-RC2 Pre-release
Pre-release

Changelog

Backend. Wasm

  • KT-66515 Wasm: "call param types must match" during the build
  • KT-67435 K/Wasm: import.meta.url transforming into absolute local path in webpack
  • KT-66905 K/Wasm: support new version of exception handling proposal

Compiler

New Features

  • KT-59688 K2: consider removing smartcasts only from the only visibile property with specific name, not from all of them

Performance Improvements

  • KT-67388 FP intellij: performance degradation in build 611
  • KT-67507 K2: Slow compilation times when a class has a lot of possibly conflicting declarations

Fixes

  • KT-57678 K2: Inconsistency in how K2 analyzes unresolved code for loops and changing closures
  • KT-66976 Some value class diagnostics are missed
  • KT-54920 K2: when with a single branch stops being exhaustive the second time it's done
  • KT-67307 K2: "Cannot find cached type parameter by FIR symbol" in JpaRepository.saveAll
  • KT-65771 K2: "IndexOutOfBoundsException: Cannot pop operand off an empty stack" when calling method imported using typealias as callable qualifier
  • KT-67502 K2: "property must be initialized or be abstract" with try-finally in secondary constructor
  • KT-67456 K2: "property must be initialized or be abstract" depending on constructor declaration order
  • KT-67628 K2: "IllegalArgumentException: Expected nullable type" β€” alias of nullable type analyzed as non-nullable in type parameter
  • KT-67625 K2: Array aliases can't be used as vararg values
  • KT-67624 K2: False negative "The feature "break continue in inline lambdas" is experimental and should be enabled explicitly" in elvis operator
  • KT-60271 K2: origins are not set on compare operators
  • KT-44557 Implement main function detection to FIR
  • KT-67593 K2: false negative SUPER_CALL_WITH_DEFAULT_PARAMETERS
  • KT-67484 K2: FIR2IR generates incorrect access to f/o of lateinit internal var
  • KT-67486 K2: Calling method from a Java (implementing a Kotlin class) with named parameters is no longer possible if Java method has different parameter names
  • KT-47382 JVM / IR: "AssertionError: Unbound private symbol IrFieldSymbolImpl" caused by string template in constructor and extension property
  • KT-67581 K2: Compiler fails on actualizing abstract class with sealed Java class via type alias
  • KT-67014 K1/K2 handle when expression as annotation target differently
  • KT-67254 K1/K2 both allow annotations on loops, assignments, array sets
  • KT-67224 K2/Native: Member overrides different '@Throws' filter from separate module
  • KT-66960 K2. KMP. False negative 'when' expression must be exhaustive without sealed class inheritor from common source-set
  • KT-63466 @NonNull on a type-variable usage doesn't take precedence over a wildcard type argument
  • KT-56134 K2: NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER diagnostic is reported for the wrong symbol
  • KT-59872 K2: Disappeared TYPE_MISMATCH
  • KT-67192 K2: Disappeared TYPE_MISMATCH [3]
  • KT-67191 K2: Disappeared TYPE_MISMATCH [4]
  • KT-64860 K2: Consider using different ConstraintPosition when fixing variables for PCLA
  • KT-67189 K2: Disappeared TYPE_MISMATCH [5]
  • KT-67551 K2: No wrong annotation target error for for statement
  • KT-67367 K2: Incorrect resolution to top-level function with less specific signature in presence of SAM constructor on the same tower level
  • KT-67374 K2: Object is not smartcasted to type parameter type
  • KT-67264 K2: "argument type mismatch" with suspend lambda and java wildcard
  • KT-67221 K2: "new inference error [NewConstraintError at Incorporate TypeVariable" for captured type
  • KT-67311 K2: "Argument type mismatch" caused by lambda type when using named arguments
  • KT-62043 K2: Fix FirCompileKotlinAgainstCustomBinariesTest.testRawTypes
  • KT-66743 Lambda receivers and anonymous function parameters of inaccessible types are allowed
  • KT-67315 K2: Some default imports are not excluded
  • KT-56126 Avoid using descriptors at JvmPlatformAnalyzerServices::computePlatformSpecificDefaultImports
  • KT-66513 K2: Suppressing OPT_IN_USAGE_ERROR is now a warning in K2, preventing safe code gen compatible with -Werror
  • KT-67314 PCLA works inconsistently with smart-cast related CS forks
  • KT-67144 K2: potential NPE when assigning to unstable vars
  • KT-66971 K2: missing SMARTCAST_IMPOSSIBLE on open val declared in another module
  • KT-66904 K2: possible NPE when reassigning captured variables
  • KT-67212 K2: "Failed to find functional supertype for class org.jetbrains.kotlin.fir.types.ConeCapturedType"
  • KT-67283 K2: No SAM conversion for fun interface with abstract toString
  • KT-66768 K1: False positive UNRESOLVED_REFERENCE in super.getFirst/getLast call
  • KT-67318 Compiler fails with OutOfMemoryError on combination of PCLA+smart cast
  • KT-65812 K2: "OutOfMemoryError: Java heap space" in kotlin.utils.SmartList.add
  • KT-66956 K2: false negative CONST_VAL_WITH_NON_CONST_INITIALIZER for inc/dec operators
  • KT-67205 K2: can't deserialize annotation with local class as argument
  • KT-65449 K2: build KAPT user project and pass it to CI
  • KT-67142 K2: IrFakeOverrideBuilder: AbstractMethodError on raw type argument in a Java superclass
  • KT-62570 IncompatibleClassChangeError due to overriding final method
  • KT-67190 K2: Disappeared TYPE_MISMATCH [2]
  • KT-67188 K2: Disappeared TYPE_MISMATCH [6]
  • KT-67187 K2: Disappeared TYPE_MISMATCH [1]
  • KT-63381 IrFakeOverrideBuilder: PublishedApi affects overridability of internal members
  • KT-59856 K2: Check ConeDiagnostics that are not mapped to KtDiagnostics
  • KT-57502 K2: Smart casts should be forbidden if variable that remembers the smart cast is declared by delegation
  • KT-63967 K2: Missing getterSignature in metadata for script variables
  • KT-59372 K2: Missing SELF_CALL_IN_NESTED_OBJECT_CONSTRUCTOR_ERROR
  • KT-60526 K2: Fix the TODO in convertToIr.kt
  • KT-67027 K2: Review all use-sites of annotation arguments utilities
  • KT-66953 K2: toByte() call on Char leads to ClassCastException for klib backends
  • KT-65415 K2: Stdlib K2 build error: IrConstructorSymbolImpl is already bound

IR. Actualizer

  • KT-67488 K2: AssertionError No such value argument slot in IrConstructorCallImpl: 0 (total=0

JavaScript

Read more

Kotlin 2.0.0-RC1

09 Apr 09:03
Compare
Choose a tag to compare
Kotlin 2.0.0-RC1 Pre-release
Pre-release

Changelog

Analysis. API

Fixes

  • KT-65616 K2: FirDeclarationStatusImpl cannot be cast to FirResolvedDeclarationStatus from STATUS
  • KT-64241 K2: Unresolved calls to functions in scripts depending on included projects
  • KT-65813 Analysis API Standalone: FirDeclarationForCompiledElementSearcher does not find compiled elements
  • KT-66052 AA: render expect/actual modifier
  • KT-66795 KtCodeFragment.clone() is broken
  • KT-66532 K2 CodeGen AA: missing annotation setup for function in source module but not in a compile target file
  • KT-65561 Analysis API: dummy.kt is not a physical file
  • KT-64833 Analysis API: Members implemented by delegation have no overridden symbols
  • KT-62405 Analysis API: Symbols SUBSTITUTION_OVERRIDE have no overridden symbols
  • KT-66749 K2: "Collection contains no element matching the predicate" on an unresolved call
  • KT-66719 AbstractGetKlibSourceFileNameTest: The dependency to ":native:analysis-api-klib-reader" breaks JPS compilation
  • KT-66603 Analysis API: support type annotations in KtPsiTypeProviderMixIn#asPsiType
  • KT-64505 Analysis API Standalone: Remove test-specific calculation of sealed class inheritors
  • KT-66013 Analysis API Standalone: Sealed inheritors aren't correctly calculated for source classes
  • KT-62880 K2 IDE: Unresolved java annotation methods in KDoc
  • KT-66530 K2: Analysis API: KtPsiTypeProvider#asKtType crashes on PsiClassType for Java type parameter with wrong use site
  • KT-66485 Substituted types are not provided for callable references
  • KT-66498 Analysis API: 'KtFe10SymbolDeclarationOverridesProvider' considers a class to be a subclass of itself
  • KT-66189 K2 / IDE: KtFirExpressionTypeProvider bugs
  • KT-59732 FirLazyResolveContractViolationException: lazyResolveToPhase(IMPORTS) cannot be called from a transformer with a phase IMPORTS from serialisation plugin

Analysis. Light Classes

  • KT-66692 SLC: findAttributeValue for attribute w/ default value in Java returns null

Apple Ecosystem

  • KT-66446 Diagnostic never showed, and build fails when CocoaPods dependency is used with embedAndSign task and linking type is dynamic
  • KT-66445 Diagnostic never showed when CocoaPods dependency is used with embedAndSign task and linking type is static

Backend. Wasm

  • KT-66471 Null method reference with Kotlin/Wasm on 2.0.0-Beta4
  • KT-65210 K/Wasm ::class operator produces Number KClass for Short expression
  • KT-58088 [PL] Support & enable partial linkage for Wasm
  • KT-66104 Wasm: compiler crash: NoSuchElementException: Sequence contains no element matching the predicate
  • KT-64449 K2: Implement K1WasmWasiCodegenBoxTestGenerated for K2
  • KT-61263 K/Wasm: add a way to turn on k2 in wasm examples using Compose

Compiler

New Features

  • KT-32754 Choose existing extensions over additional built-ins members from JDK except overrides
  • KT-64350 K2: deprecate using typealias as a callable qualifier in imports
  • KT-62547 Introduce a language feature flag for smartcasts based on "memory" variables

Performance Improvements

  • KT-65005 K2: Investigate testCommonSuperTypeContravariant performance
  • KT-65579 K2: performance regression in FP Space
  • KT-61121 [K/N] Kotlin Native compiler performance is slow when generating large frameworks

Fixes

  • KT-67185 K2: Incorrect coercion-to-Unit leading to CCE at runtime
  • KT-63836 K2: No deprecation error message in common metadata compilation
  • KT-57618 K2: complex deprecation messages are not printed in the error
  • KT-61787 K2 doesn't report warnings for some Gradle tasks
  • KT-62063 K2: drop pre-release flag in 2.0-RC
  • KT-65578 K2: implement a deprecation warning for KT-57014 (wrong nullability returned from JDK SAM constructor lambda)
  • KT-65120 K2 Consider turn into platform checkers ones which checks for objC
  • KT-67090 K2: Exception from metadata compilation when compiling class with annotations from dependencies
  • KT-59479 K2: build KorGE
  • KT-62560 K2: KAPT4: annotation @ReplaceWith is missing a default value for the element 'imports'
  • KT-67027 K2: Review all use-sites of annotation arguments utilities
  • KT-60096 K2: Introduced API_NOT_AVAILABLE
  • KT-64151 K2: consider implementing FIR-level constant evaluation
  • KT-65195 K2: Unexpected exception when executing dynamic array element inc/dec
  • KT-63416 K2 / Contracts: False positive "Leaked in-place lambda" warning caused by suspend lambda with callsInPlace contract
  • KT-57812 K2: support serialization of type annotation's arguments
  • KT-66717 Incorrect diagnostics around intersection property overrides
  • KT-65603 K2: No approximation is done on public, but effectively private property
  • KT-59932 K2: Disappeared AMBIGUOUS_ANONYMOUS_TYPE_INFERRED
  • KT-66527 K2: type mismatch on override for type
  • KT-59400 K2: Missing CANNOT_INFER_VISIBILITY
  • KT-64534 K2: org.jetbrains.kotlin.util.FileAnalysisException: Somewhere in file
  • KT-65649 K2: IR has incorrect origins for some inplace updating operators
  • KT-66748 K2: False-positive AMBIGUOUS_SUPER in toString
  • KT-67013 K2: ClassCastException: class FirConstructorSymbol cannot be cast to class FirNamedFunctionSymbol
  • KT-52175 K2: WRONG_ANNOTATION_TARGET for annotation that used inside if
  • KT-66902 K2: "Named arguments are prohibited for non-Kotlin functions" with Java interop
  • KT-66793 K2: "assigning single elements to varargs in named form is prohibited." caused by varargs supplied from java with elvis operator
  • KT-65235 JDK 21 might lead to change in overloads resolution
  • KT-66350 K2: "IllegalStateException: Unsupported compile-time value STRING_CONCATENATION" when evaluating an annotation argument string
  • KT-65035 IrFakeOverrideBuilder: AbstractMethodError on inheritance from Java subclass of CharSequence with inherited implementations
  • KT-66447 Implement KT-59138 under a language feature
  • KT-66701 K2: Java interface method override via Kotlin class rejected
  • KT-66730 K2: False positive RETURN_TYPE_MISMATCH in return statement in SAM constructor
  • KT-66909 K2: Implement a diagnostic for returning null from a lambda with expected return type Unit!
  • KT-66570 Generic wildcard upper bound inference error
  • KT-65272 K2: invoke operator applies "restricted suspen...
Read more

Kotlin 2.0.0-Beta5

20 Mar 13:10
Compare
Choose a tag to compare
Kotlin 2.0.0-Beta5 Pre-release
Pre-release

Changelog

Analysis. API

New Features

  • KT-65327 Support reading klib contents in Analysis API

Performance Improvements

  • KT-65560 K2: Anaysis API: ContextCollector triggers redundant resolution in the case of file elements

Fixes

  • KT-65571 Support VirtualFile inputs to Analysis API modules
  • KT-65600 Analysis Api: FirFile for KtCodeFragments are created and not updated on changes
  • KT-64579 K2 IDE: "Expected FirResolvedArgumentList for FirAnnotationCallImpl of FirValueParameterImpl(Source) but FirArgumentListImpl found"
  • KT-65978 Analysis API: Use soft references in FileStructureCache
  • KT-64051 K2 IDE: Analysis API: Unresolved links to typealias in KDoc
  • KT-66276 K2: Analysis API: TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM false positive for script parameter
  • KT-66232 K2: Analysis API: cover ScriptWithCustomDefDiagnosticsTestBaseGenerated by LL FIR tests
  • KT-60996 K2: Stub Based Deserializer: Set versionRequirements to enable VERSION_REQUIREMENT_DEPRECATION diagnostics
  • KT-66306 K2: Analysis API: drop ability to enable global phase resolve lock
  • KT-64919 K2 IDE: Implement KMP support for sealed class inheritors
  • KT-65563 Analysis API: Missing session component FirExpectActualMatchingContextFactory in LLFirLibrarySession
  • KT-66173 K2: No 'org.jetbrains.kotlin.fir.scopes.impl.FirDelegatedMembersFilter' in array owner: LLFirLibrarySession
  • KT-66238 Gradle kotlin build scripts - a lot of unresolved symbols after latest changes in kotlin master
  • KT-65099 K2: Recursive local storage cache check for Fir2IrDeclarationStorage::createAndCacheIrPropertySymbols()
  • KT-65265 Analysis API: Add library session invalidation tests
  • KT-56288 Analysis API: Add tests for session invalidation on the Analysis API side
  • KT-64000 K2: make AnnotationArgumentsStateKeepers more accurate
  • KT-63606 K2: Analysis API: rewrite FirLazyAnnotationTransformer to avoid redundant transformations
  • KT-65191 KtFirMultiplatformInfoProvider#getExpectForActual doesn't return expect function for slightly broken code
  • KT-62136 Analysis API: Add concurrent tests for CleanableSoftValueCache
  • KT-61222 K2: Add lifecycle management for KtResolveExtension
  • KT-65960 Analysis API: Test infrastructure indexes binary libraries from decompiled files instead of stubs during IDE mode tests
  • KT-65240 K2: CodeGen API fails to resolve Annotation parameter type when it runs FIR2IR for a class with a parent class from other module if the parent class has an annotation from another module
  • KT-65344 K2: make FirScript statements (declarations) independent
  • KT-65930 AA: receiver type for Int?::foo misses nullability
  • KT-65914 AA: receiver type for this::foo returns return type of the target callable
  • KT-65780 K2: polish FileStructure implementation for FirFile
  • KT-62840 K2 Script: everything around destructuring declaration on top level of scripts are broken
  • KT-65683 Analysis API: Dangling file session creation causes a computeIfAbsent contract violation
  • KT-64884 K2 IDE. FP [NAMED_PARAMETER_NOT_FOUND] for copy method of library data class when class has not parameter-properties
  • KT-65763 K2: value parameter from library data class copy have RAW_FIR phase
  • KT-65665 Analysis API: support KtDelegatedSuperTypeEntry in KtFirExpressionInfoProvider.isUsedAsExpression
  • KT-65655 Analysis API: KtCodeCompilationException should not strongly reference FIR sessions
  • KT-65345 K2: unify FirDesignation and LLFirResolveTarget

Analysis. Light Classes

  • KT-61734 SLC: wildcard suppression not honored
  • KT-65112 Symbol Light Classes don't support annotations on type parameters
  • KT-65843 K2: Light method returns kotlin.Unit type for TestResult return type
  • KT-65653 SLC: wrong binary resolution to function with value class
  • KT-65393 SLC: missing deprecated-hidden property
  • KT-64772 SLC: presence of source PSI for compiler-generated declaration

Apple Ecosystem

  • KT-62373 "Xcode higher than tested" diagnostic
  • KT-64096 Diagnostic when embedAndSign used for framework with cocoapods-dependencies

Backend. Native. Debug

  • KT-65553 K2: Native: kt42208WithPassingLambdaToAnotherFunction test fails with K2

Backend. Wasm

New Features

  • KT-58088 [PL] Support & enable partial linkage for Wasm
  • KT-66327 Include information about particular Wasm target into KLib manifest
  • KT-65009 Generate TypeScript definitions for the @JsExport declarations in K/Wasm

Fixes

  • KT-65660 [WasmJs] Support catching JS exceptions
  • KT-64890 K/Wasm compiler crash with external class and Kodein
  • KT-66104 Wasm: compiler crash: NoSuchElementException: Sequence contains no element matching the predicate
  • KT-66065 [Wasm] Make specialisations for closured primitive values
  • KT-65778 Create the same TypeScript tests infrastructure for Kotlin/Wasm that we have now for Kotlin/JS
  • KT-65411 Kotlin/Wasm: Boolean boxed instances are not the same
  • KT-65713 Kotlin/Wasm generates a wrapper that cannot run in Deno
  • KT-65777 Implement named export for Kotlin/Wasm
  • KT-65824 Wasm: Allow unsigned primitives to be used inside functions annotated with @JsExport
  • KT-63939 Kotlin/Wasm Support lazy associated object initialisation
  • KT-61888 [Kotlin/wasm] in kotlin.test support for @AfterTest for async tests

Compiler

New Features

  • KT-64350 K2: deprecate using typealias as a callable qualifier in imports
  • KT-65478 JVM: Change inlined variable naming format
  • KT-26565 Choose existing extensions over additional built-ins members from JDK
  • KT-65859 Calls refinement extension point
  • KT-45375 Generate all Kotlin lambdas via invokedynamic + LambdaMetafactory by default
  • KT-65681 K2: Improve error message of UPPER_BOUND_VIOLATED when upper bound is a captured type or other non-denotable type
  • KT-65153 K/N: extract liveness analysis to a separate phase
  • KT-59098 Support -Xjdk-release=1.6/1.7 with -jvm-target 1.8
  • KT-63670 Implement platform specific declaration clash diagnostics across all backends

Performance Improvements

  • KT-66341 K2: Don't build IdSignatures in FIR2IR with IR f/o builder
  • KT-66172 K2: Improve memory consumption of KtPsiSourceElement
  • KT-62798 'in' range checks are not intrinsified in kotlin-stdlib
  • [KT-65579](htt...
Read more

Kotlin 1.9.23

07 Mar 09:32
Compare
Choose a tag to compare

1.9.23

Apple Ecosystem

  • KT-65542 Cinterop tasks fails if Xcode 15.3 is used

Backend. Wasm

  • KT-64486 Kotlin/Wasm/WASI exported function callback for coroutines support

Compiler

  • KT-53478 Could not load module
  • KT-66044 JDK's new API is used over Kotlin's SDK functions
  • KT-64640 Prevent mutating SequenceCollection methods from JDK 21 be available on read-only collections
  • KT-65441 K1: Remove JDK 21 getFirst()/getLast() in (Mutable)List interfaces
  • KT-65634 K/N: data race during monolithic cache creation
  • KT-53109 CompilationErrorException generateUnboundSymbolsAsDependencies with builder inference and lambdas
  • KT-52757 Type inference for builders fails if inferred from a function

Tools. Gradle

  • KT-65792 Add JSON build report
  • KT-65091 Update compiler metrics in build reports
  • KT-62490 KGP dropping resource directories

Tools. Gradle. JS

  • KT-64119 K/JS: Migrate package manager from Yarn onto NPM
  • KT-64561 K/JS tests are not executed after upgrade to 1.9.22

Tools. Gradle. Multiplatform

  • KT-65954 commonTest dependencies affect commoMainMetadata compilation

Tools. Gradle. Native

  • KT-64573 Default value for produceUnpackedKlib was not provided

Kotlin 2.0.0-Beta4

13 Feb 12:07
Compare
Choose a tag to compare
Kotlin 2.0.0-Beta4 Pre-release
Pre-release

Changelog

Analysis. API

Performance Improvements

  • KT-64987 Analysis API: 50GB memory allocation on creating empty kotlinx.collections.immutable.persistentMapOf

Fixes

  • KT-65268 K2: Checking the presence of the delegated constructor call forces AST loading
  • KT-63330 Analysis API: Stub-based deserialized symbol providers provide unresolved enum entry annotation arguments
  • KT-65418 Analysis API: LLFirAbstractSessionFactory loads anchor module sessions eagerly
  • KT-64718 Analysis API: do not expose SealedClassInheritorsProvider and FirRegularClass to IDE Plugin
  • KT-65075 K2: getContainingDeclaration() is broken for declarations inside code fragments
  • KT-61332 Support KtTypeCodeFragment in PsiRawFirBuilder
  • KT-65150 AA: incorrect result from KtTypeProvider#getReceiverTypeForDoubleColonExpression for Java static method
  • KT-55750 LL FIR: Implement multi-threaded resolve
  • KT-56551 LL FIR: implement parallel resolve for jumping phases
  • KT-65223 Psi: avoid KtFile usages
  • KT-65307 Analysis API FE10: support KtFe10AnalysisSessionProvider.getAnalysisSessionByUseSiteKtModule
  • KT-62695 K2 IDE: Unresolved extension functions in KDoc
  • KT-65152 Analysis API: KDoc references to packages are not fully resolved
  • KT-64988 K2 IDE: Navigation from the named argument in safe call does not work
  • KT-64074 K2: Investigate LL divergence for Script.testTopLevelPropertyInitialization
  • KT-64921 K2 IDE: references in platform code resolve to expect classifier instead of actual
  • KT-62441 K2: IDE K2: "No dangling modifier found"
  • KT-64528 K2 IDE: MPP: unregistered component 'org.jetbrains.kotlin.fir.scopes.impl.FirDelegatedMembersFilter'
  • KT-64993 Analysis API: KtExpressionTypeProvider.getExpectedType works incorrectly for arguments of safe calls
  • KT-64883 Allow direct creation of KtCommonFile
  • KT-64646 K2: properly forbid ast loading during raw fir phase in tests
  • KT-64862 Psi: missed parenthesis in type reference presentation
  • KT-62893 K2 IDE. FP 'when' expression must be exhaustive with Java sealed interface from library
  • KT-63795 K2: lazyResolveToPhase(BODY_RESOLVE) cannot be called from a transformer with a phase BODY_RESOLVE from SealedClassInheritorsProviderIdeImpl

Analysis. Light Classes

  • KT-65425 K2 IDE: Seeing a reference to the class generated by compiler plugin exposed from Java code caused NPE from light classes
  • KT-64937 SLC: internal setters are not mangled

Apple Ecosystem

  • KT-63212 podInstall task fails without a proper diagnostic when xcodeproj gem is outdated

Backend. Wasm

  • KT-63939 Kotlin/Wasm Support lazy associated object initialisation
  • KT-64803 K/Wasm: non-capturing lambdas are not singleton unlike same lambdas in jvm
  • KT-64449 K2: Implement K1WasmWasiCodegenBoxTestGenerated for K2
  • KT-64829 K/Wasm: division remainder has a wrong sign
  • KT-65009 Generate TypeScript definitions for the @JsExport declarations in K/Wasm

Compiler

New Features

  • KT-63670 Implement platform specific declaration clash diagnostics across all backends
  • KT-62547 Introduce a language feature flag for smartcasts based on "memory" variables

Fixes

  • KT-63344 K2: False positive ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED
  • KT-58845 K2: SAM checker can run incorrectly in presence of an expect supertype
  • KT-61843 K2: Missing TYPE_MISMATCH for nested array literals
  • KT-61798 K2 incorrectly calculates modality of property accessors
  • KT-65255 K2 / KJS: "IllegalArgumentException: Candidate is not successful, but system has no contradiction"
  • KT-65341 K2: "Cannot find cached type parameter by FIR symbol" caused by not-null assertion operator inside string in throw
  • KT-49283 Support contribution type info from a nested builder inference call
  • KT-64077 K2: Builder inference ignores constraints from nested builder inference
  • KT-49160 Couldn't infer a type argument through several builder inference calls broken by a local class
  • KT-61310 K2: "Not enough information to infer type variable R" for transformLatest
  • KT-63733 Builder-style type inference can't resolve to extension overloads when they're more applicable than member ones
  • KT-57707 K1: inconsistent TYPE_MISMATCH in builder inference
  • KT-55057 Builder inference changes behaviour sporadically based on BI annotation on unrelated call
  • KT-60663 Builder inference does not work inside a nested unrelated builder inference lambda
  • KT-53639 TYPE_MISMATCH: compiler can't infer the list's type when using buildList {} builder or Collection#isNotEmpty
  • KT-60291 K2: "IllegalStateException: Cannot serialize error type: ERROR CLASS: Cannot infer argument for type parameter T" during FIR serialization
  • KT-65033 K2: Fir2LazyIr: Lazy type aliases not supported
  • KT-57709 Inconsistent extension function call resolution in builder inference
  • KT-53740 Builder inference with multiple lambdas leads to unsound type
  • KT-60877 Builder inference from the null literal results in Nothing instead of Nothing? for producing positions of the postponed type variable
  • KT-53553 Builder inference: inconsistent types in different lambda scopes
  • KT-54400 K2: builder inference does not work with assignments of literals to member properties
  • KT-53109 CompilationErrorException generateUnboundSymbolsAsDependencies with builder inference and lambdas
  • KT-52757 Type inference for builders fails if inferred from a function
  • KT-63840 Builder inference fails on calls to identity-shaped functions with postponed type variables inside select-constructions
  • KT-64276 [K/N][K2] K2 behaviorial difference with inconsistent inheritance of ObjCName
  • KT-59782 K2: Forbid local delegated properties with private accessors in public inline functions
  • KT-65482 K2: NoSuchFieldError due to using unboxed type
  • KT-63208 K2: Implement deprecation cycle and fix missing errors for error-level nullable arguments of warning-level Java types
  • KT-64891 K2: consider supporting/forbidding foo.(bar)() syntax
  • KT-62134 K2: handle non-simple types during FirStatusResolver.isPrivateToThis check
  • KT-65290 K2: No override for FUN DEFAULT_PROPERTY_ACCESSOR
  • KT-65111 K2: Java star imports don't work in KJK interdependencies
  • KT-59012 K2: Support inferring types based on self upper bounds
  • KT-65373 K2: there is a crash in KJK hierarchy with an extension member pro...
Read more

Kotlin 2.0.0-Beta3

18 Jan 12:17
Compare
Choose a tag to compare
Kotlin 2.0.0-Beta3 Pre-release
Pre-release

Changelog

Analysis. API

Fixes

  • KT-62895 K2 IDE. FP 'when' expression must be exhaustive with sealed interface from library
  • KT-64805 Analysis API: introduce common entry point for multi-file test cases
  • KT-64714 K2: Analysis API: CollectionsKt.map doesn't resolves from Java in kotlin repo
  • KT-64647 K2: Allow to calculate decompiled inheritors for sealed classes in tests
  • KT-64595 AA: stackoverflow while simplifying a type with a recursive type parameter
  • KT-64825 Analysis API. Cannot compute containing PSI for unknown source kind 'org.jetbrains.kotlin.KtFakeSourceElementKind$DefaultAccessor' exception on getContainingSymbol call for default setter parameter
  • KT-64080 K2: Analysis API: On-air resolve does not trigger resolution of delegated super call arguments
  • KT-64243 K2: proper lazy resolution for fake overrides
  • KT-62891 K2 IDE. FP [EXPOSED_FUNCTION_RETURN_TYPE] on overriding library method which returns protected type
  • KT-61890 Analysis API: Migrate KtFirScopeProvider to ContextCollector instead of onAirResolve
  • KT-64197 K2: Code fragments are only supported in JVM
  • KT-64604 K2: IDE K2: "Modules are inconsistent during performance tests"
  • KT-62357 K2 IDE. False positive on generated component methods and false negative on getter of @JvmRecord classes in Java
  • KT-62892 K2 IDE. Java outer class from other module is not resolved when nested class is accessed with fq name in a type position
  • KT-62888 K2 IDE. IDE infers reference to KMutableProperty as reference to just KProperty
  • KT-64584 K2: StubBasedFirDeserializedSymbolProvider: support deserialization of delegated declarations
  • KT-60324 K2 IDE: "NoSuchElementException: List is empty at JavaOverrideChecker#buildErasure"
  • KT-62896 K2 IDE. FP ABSTRACT_MEMBER_NOT_IMPLEMENTED on inheriting class from library which implements interface by delegation
  • KT-62947 Analysis API: Error while resolving FirPropertyImpl
  • KT-64468 Analysis API: Implement mixed multi-module tests which support different kinds of KtModules
  • KT-63547 K2 IDE. False Positive AMBIGUOUS_ANNOTATION_ARGUMENT
  • KT-62832 K2: ClassCastException: FirDeclarationStatusImpl cannot be cast to FirResolvedDeclarationStatus
  • KT-64205 Analysis API: Do not import non-top-level callables by default
  • KT-63056 K2: Cannot mutate an immutable ImplicitReceiverValue on FirCodeFragment analysis
  • KT-64108 K2: KtFirSymbolDeclarationOverridesProvider shouldn't provide fake overrides
  • KT-63752 K2: java.lang.StackOverflowError FirFieldSymbol.getHasInitializer
  • KT-63718 Analysis API: Stub-based dependency symbol providers of library source sessions compute the wrong package name sets
  • KT-64186 Analysis API: ContextCollector provides incorrect scopes for anonymous objects
  • KT-63979 K2 IDE: presentation of types in completion is too verbose
  • KT-63681 K2: LL FIR: Improve isResolved check coverage of after lazy resolution

Analysis. Light Classes

  • KT-63087 K2 IDE: in .java source reference to JvmName names on unsigned type / value class are unresolved
  • KT-64605 K2 IDE: usage of @Repeatable annotation in Java: false positive "Duplicate annotation"
  • KT-64795 SLC: distinguish last v.s. non-last vararg value parameter type during binary resolution
  • KT-61605 K2 IDE: Light elements do not obey platform contracts
  • KT-57536 SLC: no need to populate members with expect modifier
  • KT-63949 K2 IDE. Analyze hang on @Autowired constructor analysis
  • KT-64320 Decouple kotlin psi from java PSI
  • KT-64282 Decouple KotlinIconProviderService from java PSI

Apple Ecosystem

  • KT-63821 Copy framework to BUILT_PRODUCTS_DIR in the embedAndSign task

Backend. Wasm

  • KT-58852 WASM: two methods with different varargs: Class korlibs.template.dynamic.DynamicShape has 2 methods with the same signature [register(kotlin.Array)

Compiler

New Features

  • KT-4113 Smart casts for properties to not-null functional types at invoke calls

Fixes

  • KT-64261 K2 / WASM: Extension function with star projection throws "RuntimeError: unreachable"
  • KT-64877 K2: PCLA doesn't allow infer types from value parameter having TV type
  • KT-63932 K2/Native codegen test failures around builder inference
  • KT-64222 K2: "return type is not a subtype of the return type of the overridden member"
  • KT-57094 K1: wrong type inferred for an instance of a local class inside a generic property
  • KT-62069 K2: ASSIGNMENT_TYPE_MISMATCH is reported in addition to NO_ELSE_IN_WHEN
  • KT-62776 FirLazyResolveContractViolationException: "lazyResolveToPhase(STATUS) cannot be called from a transformer with a phase TYPES" on Java annotation usage
  • KT-60056 K2: Introduced UNRESOLVED_REFERENCE
  • KT-59791 K2: Implement partially constrained lambda analysis
  • KT-42020 Psi2ir: IllegalStateException: "IrSimpleFunctionPublicSymbolImpl for public [...] is already bound" on generic function whose substitution leads to IdSignature clash
  • KT-64771 Investigate subtle FIR_DUMP difference for reversed order analysis
  • KT-62584 K2: different signature in subclass of local class declared in extension value getter
  • KT-64615 Inconsistent error messages for platform type nullability assertions
  • KT-59938 K2: Disappeared AMBIGUOUS_ACTUALS
  • KT-64501 K2: False-positive WRONG_INVOCATION_KIND when using default arguments
  • KT-64640 Prevent mutating SequenceCollection methods from JDK 21 be available on read-only collections
  • KT-63644 K2: Create special IR symbols for fake-overrides in fir2ir in mode with IR f/o generator
  • KT-62476 K2: Enable building fake overrides by ir on non-JVM targets
  • KT-63638 K2: Compiler crashes with "Inline class types should have the same representation"
  • KT-36220 NI: false positive NON_APPLICABLE_CALL_FOR_BUILDER_INFERENCE if one use cannot resolve
  • KT-64121 K2: Actual modifier is missed on override fun toString() fro value class in native
  • KT-63703 K2: Eliminate call to Candidate.usesSAM and samResolver.getFunctionTypeForPossibleSamType in AbstractConeCallConflictResolver.toTypeWithConversion
  • KT-64435 K2: FIR2IR: Source offsets for data class members are inconsistent with PSI2IR
  • KT-64090 K2: false-positive new inference error on invoking from another module a generic function on Java list type with wildcard type argument bounded by raw-typed Java inner class
  • KT-64044 K2: Java mapped method should have a source from Java method, not from mapped Kotlin source class
  • KT-46674 ClassCastException with smartcast if plus opera...
Read more

Kotlin 1.9.22

21 Dec 16:27
Compare
Choose a tag to compare

Changelog

JavaScript

  • KT-63719 KJS: Test results ignored for ES module kind
  • KT-63808 compileTestDevelopmentExecutableKotlinJs failed in JsIntrinsicTransformers

Native

  • KT-64139 Weird bug with while and coroutine in Kotlin Native
  • KT-63471 linkDebugTestIosX64 Failed to build cache: NoSuchFileException bitcode_deps
  • KT-63789 Native: Incremental compilation problem with compose

Tools. CLI

  • KT-64485 CLI: cache and optimize parsing of command-line arguments

Tools. Gradle

  • KT-63990 "Cannot query the value of property 'buildFlowServiceProperty' because it has no value available" with Isolated Projects

Tools. Gradle. Native

  • KT-63363 Kotlin Gradle Plugin: KotlinNativeHostSpecificMetadataArtifact breaks configuration cache, implicitly includes output file as configuration cache input
  • KT-63742 Gradle wrongly caches Kotlin/Native compiler flags

Tools. JPS

  • KT-64305 Kotlin JPS builder requests chunk rebuild with graph implementation
  • KT-64112 Avoid using IJ's JPS mappings in Kotlin JPS tests
  • KT-63799 Make plugin classpath serialization path agnostic

Checksums

File Sha256
kotlin-compiler-1.9.22.zip 88b39213506532c816ff56348c07bbeefe0c8d18943bffbad11063cf97cac3e6
kotlin-native-linux-x86_64-1.9.22.tar.gz c2b0a6481ced5401db4a7028661c039b7466996efaa554bbcc6a3d421ac5e7d4
kotlin-native-macos-x86_64-1.9.22.tar.gz 4646c9bc289d48a228064f565f3a968dde3dcccd7821f403717c708f6ffa8285
kotlin-native-macos-aarch64-1.9.22.tar.gz 8a95c0e0eb46b41b6d02a1942dc7dfe8c70082a2a26679490a77cd486f0ec8dd
kotlin-native-windows-x86_64-1.9.22.zip a9d7bcf38a41a84002ba7a733b08e97b554225a39656d5158fc31dc6d0acede4

Kotlin 2.0.0-Beta2

15 Dec 09:09
Compare
Choose a tag to compare
Kotlin 2.0.0-Beta2 Pre-release
Pre-release

Changelog

Analysis. API

Fixes

  • KT-62982 K2: Cannot get a PSI element for 'Enum.values'
  • KT-59732 FirLazyResolveContractViolationException: lazyResolveToPhase(IMPORTS) cannot be called from a transformer with a phase IMPORTS from serialisation plugin
  • KT-61757 K2 IDE: resolution to buitlins does not work for from common module
  • KT-62676 K2 IDE: Reference shortener does not recoginize redundant this references
  • KT-63627 K2 IDE: shorten reference shortens required qualifier
  • KT-62675 K2 IDE: Reference shortener does not recoginize redundant labels
  • KT-63771 fe10: KtNamedClassOrObjectSymbol#isInline does not cover value classes
  • KT-62947 Analysis API: Error while resolving FirPropertyImpl
  • KT-60327 K2 IDE. "IllegalArgumentException: source must not be null" during delegation declaration
  • KT-63700 K2: "FirLazyExpression should be calculated before accessing" in the case of secondary constructor
  • KT-62111 K2 IDE. IllegalArgumentException on for loop with iterator declaration attempt
  • KT-63538 Analysis API: Removing a contract statement via PsiElement.delete() does not trigger an out-of-block modification
  • KT-63694 K1/K2 IDE. "RuntimeException: Broken stub format, most likely version of kotlin.FILE (kotlin.FILE) was not updated after serialization changes" exception on incorrect class name
  • KT-63560 Analysis API: Modifiable PSI tests cannot rely on the cached application environment to allow write access
  • KT-62980 Implement KtFirSimpleNameReference#getImportAlias
  • KT-63130 Analysis API: No receiver found for broken code during commit document
  • KT-60170 K2 IDE: CCE from KtFirCallResolver on invalid code with wrong implicit invoke
  • KT-61783 K2: Analyze 'KtCodeFragment' in a separate session
  • KT-62010 K2: IDE K2: "ConeClassLikeTypeImpl is not resolved to symbol for on-error type"
  • KT-62957 Analysis API: NullPointerException on call resolution when builtins are not available
  • KT-62899 K2 IDE. IDE ignores @Suppress annotation for errors
  • KT-62935 Analysis API: kotlin.Cloneable should not be available in Kotlin/Native sources
  • KT-62910 Analysis API: create AbstractFirPsiNativeDiagnosticsTest for LL FIR
  • KT-63096 K2: Analysis API: KotlinAnnotationsResolver for IDE is created with incorrect scope
  • KT-63282 K2 Script: annotation arguments phase should resolve propagated annotations
  • KT-63223 Analysis API: reference to declarations with kotlin* package are not resolved
  • KT-63195 AA: incorrect results from KtTypeProvider#getReceiverTypeForDoubleColonExpression

Analysis. Light Classes

  • KT-63552 Symbol Light Classes don't support arrayOf and similar without parameters in property initializers and default parameter values
  • KT-63486 SLC: a lot of RAM is allocated in org.jetbrains.kotlin.asJava.LightClassUtil.isMangled

Backend. Wasm

  • KT-62863 Execution failed for task ':kotlinx-serialization-properties:wasmJsD8Test' in serialization in the K2 QG

Compiler

New Features

  • KT-22004 Allow to resolve CONFLICTING_OVERLOADS with Deprecated(HIDDEN)
  • KT-61955 Support more wider actual member visibility, if the expect member is effectively final

Fixes

  • KT-63695 JVM: Don't use plugin extensions when compiling code fragment
  • KT-59903 K2: Disappeared DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE
  • KT-62961 K2 / KMP: NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS with expect enum class and typealias
  • KT-59369 K2: Missing BUILDER_INFERENCE_STUB_RECEIVER
  • KT-53749 Support builder inference restriction in FIR
  • KT-59390 K2: Missing BUILDER_INFERENCE_MULTI_LAMBDA_RESTRICTION
  • KT-59887 K2: Disappeared ACTUAL_MISSING
  • KT-62885 Introduce a language feature entry for expect actual classes for easier configuration of MPP projects
  • KT-62589 K2: Investigate need of non-nullable IdSignature in Fir2IrLazyDeclarations
  • KT-63329 K2: difference in SAM-conversion casts generation
  • KT-64062 K2 IDE. NPE on typing nullable parameter in return
  • KT-63761 K2: False positive "Unresolved reference" caused by object's parameter in enum class which is passed as annotation parameter
  • KT-55252 Backend Internal error during psi2ir in native compile tasks (NPE in getKlibModuleOrigin)
  • KT-50453 Improve builder inference diagnostics with type mismatch due to chosen inapplicable overload
  • KT-56949 K2: Builder inference violates upper bound
  • KT-64028 K2: Investigate questionable condition in FirBuilderInfernceSession
  • KT-60031 K2: Introduced NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS
  • KT-63646 K2: "IllegalStateException: Return type of provideDelegate is expected to be one of the type variables of a candidate, but D was found"
  • KT-59881 K2: Disappeared UNSUPPORTED
  • KT-64136 K2: NSME with Anvil compiler plugin
  • KT-63448 K2: CONFLICTING_INHERITED_JVM_DECLARATIONS with @JvmField
  • KT-63865 K2: "IllegalArgumentException: Failed requirement." caused by lambda parameters with different type in init block
  • KT-62609 K2. Type argument inference changed for object of Java class with several common parents
  • KT-63081 Optimize new native caches: CachedLibraries.computeVersionedCacheDirectory()
  • KT-63580 "AssertionError: access of const val: GET_FIELD" caused by const value and variable with delegation
  • KT-63567 "NoSuchMethodError" on getting value of lazily initialized property by companion's const value
  • KT-63540 Restrict the CONFLICTING_OVERLOADS + DeprecatedLevel.HIDDEN ignore to final callables
  • KT-30369 Smartcasts from safe call + null check don't work if explicit true/false check is used
  • KT-30376 Smartcasts don't propagate to the original variable when use not-null assertion or cast expression
  • KT-30868 Unsound smartcast if smartcast source and break is placed inside square brackets (indexing expression)
  • KT-31053 Nothing? type check isn't equivalent to null check is some places
  • KT-29935 Smartcasts don't work if explicit annotated true/false check is used
  • KT-30903 Smartcast to null doesn't affect computing of exhaustiveness
  • KT-62847 K2: Introduce FIR node for SAM conversion
  • KT-63564 K/Wasm: CompilationException with 2.0.0-Beta1
  • KT-63345 K2: FIR2IR chooses an incorrect type for smartcast in case of SAM conversion
  • KT-63848 ReflectiveAccessLowering does not count arguments of super-calls
  • KT-61920 K2: False negative CONST_VAL_WITH_NON_CONST_INITIALIZER when initializer is Java ...
Read more