Commit Graph

100699 Commits

Author SHA1 Message Date
Ilya Gorbunov 937a14146a Hide experimental Duration functions that are not intended to be stabilized 2023-04-26 10:44:52 +00:00
Ilya Gorbunov f260b55810 Raise deprecation of js synchronized {} to error 2023-04-26 10:44:52 +00:00
Abduqodiri Qurbonzoda 2248f4ea33 Remove supportsNamedCapturingGroup flag in tests
Now it is true on all platforms
2023-04-26 10:44:21 +00:00
Abduqodiri Qurbonzoda 175566fe56 KT-51908 Common MatchGroupCollection.get(name) extension function 2023-04-26 10:44:21 +00:00
Ilya Gorbunov 448e9fc5e7 Drop functions hidden since 1.4 (inline-only or experimental in JVM)
Since it's no longer possible to use API version less than 1.4,
these functions can be no longer called at all.
2023-04-26 10:31:03 +00:00
AngryGami bfeff81867 Presence of (transient) delegated field in the serialized class breaks deserialization (#5103)
Do not include delegated field into generated constructor even though it
might have backing field.

Test that shows issue was added. Properties that are explicitly marked
as delegated are now excluded.

Fixes https://github.com/Kotlin/kotlinx.serialization/issues/2091
2023-04-26 12:28:57 +02:00
Abduqodiri Qurbonzoda 63a5a74613 Introduce HexFormat for formatting and parsing hexadecimals #KT-57762
Merge-request: KT-MR-9460
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-04-26 09:54:25 +00:00
Ilya Chernikov 5ef0b52ac5 Add test to the fix of maven script executor
related to the fix of #KT-58101
2023-04-26 09:52:58 +00:00
Yahor Berdnikau 66648b36df Introduce 'kotlin.experimental.tryK2' gradle property
Once configured this property changed default language version
convention for all compiler options to '2.0'.

On usage, it produces a warning that it should not be used in
production.

^KT-57736 In Progress
2023-04-26 09:51:36 +00:00
Sergey Bogolepov c7b100a41a [K/N] KT-56464: backend tests 2023-04-26 09:36:10 +00:00
Sergey Bogolepov fce878d63a [K/N] KT-56464: implementation of HiddenFromObjC for classes in backend 2023-04-26 09:36:10 +00:00
Denis.Zharkov 6651e6ed8c K2: Avoid inappropriate approximation of captured type to Nothing?
There's a heuristic for approximation of a captured type that once
it has non-trivial lower bound (other than Nothing), it's worth
approximating it to sub-type even while the containing
top-level type is being approximated to super-type.

And that sounds reasonable in case the lower bound is indeed non-trivial,
but that's not the case because nullability here comes from
the nullability of captured type position.

So, the fix is basically not to treat such approximations as non-trivial.
And while that seems to be a bit of a change in the language semantics,
it still looks reasonable (see other changes in test data and KT-58087)

^KT-57958 Fixed
^KT-58087 Fixed
2023-04-26 09:21:19 +00:00
Denis.Zharkov 0a631ed8fc K2: Fix undesirable NEW_INFERENCE_ERROR for case of return + buildList
While plainly repeating K1 behavior might be a dumb solution,
but inventing another one might be quite complicated
because we need to stop fixing variables into Nothing in many cases,
but probably not in all of them (see KT-58232).

^KT-58149 Fixed
^KT-58232 Related
2023-04-26 09:20:02 +00:00
Ilya Goncharov 133992d0bc [Gradle, JS] Use live collections for webpack configurations
^KT-57116 fixed
2023-04-26 09:09:01 +00:00
Alexander Shabalin f058ee21b0 [K/N] Do not hold GC locks when finalizer thread is starting
Merge-request: KT-MR-9799
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2023-04-26 08:29:07 +00:00
Yahor Berdnikau c52ad22795 Remove 'KotlinCompile.classpath' input
^KT-53748 Fixed
2023-04-26 08:22:39 +00:00
Alexander Shabalin 82f94015f1 [K/N] Dispose ObjC objects from main thread on main thread. ^KT-56402
Merge-request: KT-MR-9515
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2023-04-26 07:35:44 +00:00
Jinseong Jeon 5282e60328 AA standalone: register LL FIR session configurator extension
Also, introduce an API to register user's own project extension points
2023-04-26 01:01:53 +00:00
Ilya Kirillov 96b7abc6cf [Analysis API] add API to get KtScope for resolve extensions
^KT-58262
2023-04-25 23:42:11 +00:00
Ilya Kirillov 06b616957c [Analysis API] remove unused parameter from KtFirScopeProvider 2023-04-25 23:42:10 +00:00
Ilya Kirillov 1ae56a49f7 [Analysis API] fix LLFirResolveExtensionToolDeclarationProvider.getTopLevelCallableNamesInPackage
it should provide callable names instead of classifier names

^KT-58262
2023-04-25 23:42:10 +00:00
Ilya Kirillov d6e9b8b003 [Analysis API] reduce memory consumption by KtFirPackageScope 2023-04-25 23:42:10 +00:00
Ilya Kirillov aa4fe51945 [Analysis API] add support for generated declarations to KtFirPackageScope
^KT-58262
2023-04-25 23:42:09 +00:00
Anton Lakotka 2abe9ac1ef [Gradle] Fix configuration cache issues for LinkFramework tasks
^KT-58261 Verification Pending
2023-04-25 20:51:16 +00:00
Stanislav Erokhin 96f8bcdf43 [Gradle/MPP] Added IT for android -> androidTarget rename
#KT-57903 In Progress
2023-04-25 19:40:53 +00:00
Stanislav Erokhin 65ffdb418a [Gradle/MPP] Update message about missing android target
#KT-57903 In Progress
2023-04-25 19:40:53 +00:00
Stanislav Erokhin 5eaa6696f4 [Gradle/MPP] Replace android -> androidTarget in functionalTests 2023-04-25 19:40:53 +00:00
Stanislav Erokhin 70c9d6dc44 [Gradle/MPP] Deprecated android in favour androidTarget in MPP DSL
ReplaceWith was added only to `android()` and `android(name)`
because it isn't working for other functions: KTIJ-25383.

#KT-57903 In Progress
2023-04-25 19:40:53 +00:00
Stanislav Erokhin becf50ee0f [Gradle/MPP] Refactored KotlinTargetContainerWithPresetFunctions
Android preset functions were moved to a separate interface
because we need to write custom deprecation with ReplaceWith
due KT-57903.
After that we had generated:
 - all the K/N preset functions
 - jvm functions.
I decided to move jvm function to separate file too,
so the whole division to several files would be somewhat sane.

I kept the KotlinTargetContainerWithPresetFunctions interface to
keep source/binary compatibility for the `android`/ `jvm` preset
functions users

#KT-57903 In Progress
2023-04-25 19:40:53 +00:00
Ilya Goncharov 725cfb4ea5 [Gradle, JS] Fix package in js composite build test 2023-04-25 17:52:26 +00:00
Zalim Bashorov 4e36f5b391 [Wasm, JS] Add a warning that dumping reachability and size infos to file is supported only for Kotlin/Wasm 2023-04-25 19:44:03 +02:00
Zalim Bashorov 0a1116376c [CLI, JS, Wasm] Regenerate K2JSCompilerArgumentsCopyGenerated.kt 2023-04-25 19:44:03 +02:00
Zalim Bashorov ef28bf27ae [CLI tests] Update testdata 2023-04-25 19:44:03 +02:00
Zalim Bashorov bd852e87ab [Wasm] Add an option to dump declaration IR sizes to file 2023-04-25 19:44:03 +02:00
Zalim Bashorov 3c343e3074 [Wasm, JS] Minor: make description non-nullable 2023-04-25 19:44:02 +02:00
Zalim Bashorov 62b21ac078 [Wasm] Add an option to dump reachability info to file 2023-04-25 19:44:02 +02:00
Sebastian Sellmair 7486a11bd1 [Gradle] Remove deprecated dependsOnClosure and withDependsOnClosure extensions
^KT-58220 Verification Pending
2023-04-25 17:09:00 +00:00
Sebastian Sellmair 00138f8ea4 [Gradle] Update deprecation message for non-hmpp mode
^KT-58220 Verification Pending
See: KT-58243
2023-04-25 17:09:00 +00:00
Sebastian Sellmair 0889b3eb2e [Gradle] Schedule KotlinCompilation.source for removal in 2.0
Having only one SourceSet being associated with a KotlinCompilation
will simplify multiple code paths and prevents misconfiguration
from users.

^KT-58220 Verification Pending
See: KT-58234
See: KT-58235
2023-04-25 17:09:00 +00:00
Sebastian Sellmair 1313cffe01 [Gradle] Schedule 'overrideDisambiguationClassifierOnIdeImport' and 'useDisambiguationClassifierAsSourceSetNamePrefix' for removal in 2.0
^KT-58220 Verification Pending
See: KT-58231
2023-04-25 17:08:59 +00:00
Sebastian Sellmair e72f236bd4 [Gradle] Schedule 'KotlinSourceSet.requiresVisibilityOf' for removal in 2.0
^KT-58220 Verification Pending
See: KT-58228
2023-04-25 17:08:59 +00:00
Sebastian Sellmair fa40c1115a [Gradle] Schedule 'relatedConfigurationNames' for removal in 2.0
^KT-58220 Verification Pending
See: KT-58225
2023-04-25 17:08:59 +00:00
Sebastian Sellmair 25c2fe03a9 [Gradle] Update 'Scheduled for removal' deprecations
^KT-58220 Verification Pending
2023-04-25 17:08:59 +00:00
Sebastian Sellmair f98765f254 [Gradle] Remove KotlinCompilation.moduleName
^KT-58220 Verification Pending
2023-04-25 17:08:59 +00:00
mvicsokolova 75b4469757 [K/N] Stabilization of Atomics API
`AtomicInt`, `AtomicLong`, `AtomicReference` and `AtomicNativePtr` classes were moved to `kotlin.concurrent` package. The corresponding classes from `kotlin.native.concurrent` were deprecated with warning since Kotlin 1.9.

In order to prepare for further commonization of Atomics API the following changes were made:
* `kotlin.concurrent.AtomicInt`: 
    * `increment(): Unit` and `decrement(): Unit` methods were deprecated with error
    * New methods were added: `incrementAndGet(): Int` , `decrementAndGet(): Int`, `getAndIncrement(): Int`, `getAndDecrement(): Int`, `getAndSet(newValue: Int): Int` 
* `kotlin.concurrent.AtomicLong`:
    * `increment(): Unit` and `decrement(): Unit` methods were deprecated with error
    * New methods were added: `incrementAndGet(): Long`, `decrementAndGet(): Long`, `getAndIncrement(): Long`, `getAndDecrement(): Long`, `getAndSet(newValue: Long): Long`
    * Deprecated `AtomicLong()` constructor with default parameter value
* For all atomic classes `compareAndSwap` method was renamed to `compareAndExchange`

See KT-58074 for more details.

Merge-request: KT-MR-9272
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-04-25 16:55:42 +00:00
Mikhail Glukhikh 1c56a71b14 FirClassSubstitutionScope: don't recreate constructor type parameters w/out need
#KT-58008 Fixed
2023-04-25 16:42:59 +00:00
Mikhail Glukhikh 5daafd5ed5 FirNestedClassifierScope: don't give empty map substitutor to a processor
Optimization related to KT-58008 (hides the issue in some cases)
2023-04-25 16:42:59 +00:00
Mikhail Glukhikh 4172ce1018 K2: reproduce KT-58008 2023-04-25 16:42:59 +00:00
Artem Kobzar 27b103e2ca [K/JS] Eliminate duplication of init block inside exported ES-classes ^KT-58246 Fixed 2023-04-25 16:21:08 +00:00
Anton Lakotka 9afddb1a7a [Gradle] Fix configuration cache for cleanNativeDistributionCommonization
^KT-57482 Verification Pending
2023-04-25 16:16:52 +00:00