Commit Graph

100371 Commits

Author SHA1 Message Date
Leonid Startsev fa8f38c2c8 Don't fail if there is no serializer for type parameters of contextual serializer
Return null instead.
Such behaviour is needed to support cachedChildSerializers logic.
Since this field creator doesn't provide genericGetter (because it's
static),
type param serializer can't be retrieved, and the whole contextual
serializer shouldn't be cached.

#KT-58067 Fixed
2023-04-19 10:09:06 +00:00
Ilya Goncharov bf757d3163 [Gradle, JS] Support custom attributes for public package json configuration
^KT-57985 fixed
^KT-57817 fixed
2023-04-19 09:50:19 +00:00
Vsevolod Tolstopyatov af9252aa96 Mark all Worker-related API as obsolete.
* Explain what obsolete means and why workers are obsolete
* Add some documentation to workers to explain its common pitfalls

^KT-54702


Merge-request: KT-MR-9563
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
2023-04-19 09:28:23 +00:00
Alexander.Likhachev ec4fab57a7 [Build] Add the kotlin- prefix to the build tools API modules names
KT-57396
2023-04-19 09:09:26 +00:00
Mikhail Glukhikh b6fdc2dbfc DiagnosticReporterByTrackingStrategy: replace TODO() with assertions/errors
#KT-55079 Fixed
2023-04-19 07:24:05 +00:00
Mikhail Glukhikh d4f81cf67f K1: remove unused resolution diagnostic
Related to KT-55079
2023-04-19 07:24:05 +00:00
Pavel Mikhailovskii 3bb66e8432 KT-57714 Fix remapping of signatures with reified type parameters 2023-04-19 07:20:51 +00:00
Vladimir Dolzhenko e10e821cd4 Fix onTheFlyDiagnosticsCallback
KtNamedFunction, KtClass etc are KtAnnotated.
Annotation recursion could happen within onTheFlyDiagnosticsCallback if
KtAnnotated has some annotations.

#KTIJ-25219

Merge-request: KT-MR-9652
Merged-by: Vladimir Dolzhenko <Vladimir.Dolzhenko@jetbrains.com>
2023-04-18 19:44:00 +00:00
Dmitriy Dolovov cd9924dafe [PL] Disable PL for GradleIT that check linkage error messages 2023-04-18 19:11:13 +00:00
Zalim Bashorov 4f76827ea9 [Wasm] Tune Binaryen options and add some notes about 112 2023-04-18 20:40:17 +02:00
Alexander.Likhachev 1e0eccba35 [Gradle] Move KGP configurations name declaration, make them all internal 2023-04-18 18:19:25 +00:00
Alexander.Likhachev 0727ee5a4f [Gradle] Use custom classloader and ServiceLoader to load bt-api implementation
#KT-57397 Fixed
2023-04-18 18:19:25 +00:00
Alexander.Likhachev 5699cf6784 [Gradle] Add ClassLoadersCachingBuildService
#KT-57397 In Progress
2023-04-18 18:19:25 +00:00
Alexander.Likhachev bb635d1bdb [Gradle] Add useCompilerVersion to Kotlin extension
It allows to override default Kotlin compiler version that is used to run compilation via the build tools api
#KT-57397 In Progress
2023-04-18 18:19:24 +00:00
Alexander.Likhachev 22720f62f6 [Build] Add build-tools-api to KGP install dependencies
#KT-57397 In Progress
2023-04-18 18:19:24 +00:00
Alexander.Likhachev 3b69a4c770 [Gradle] Add GradleBuildToolsApiCompilerRunner
It could be enabled via the `kotlin.compiler.runViaBuildToolsApi` Gradle property globally or the `AbstractKotlinCompileTool.runViaBuildToolsApi` task property for a particular task
#KT-57397 In Progress
2023-04-18 18:19:24 +00:00
Alexander.Likhachev 9127919e01 [Build] Enable explicit API mode for build-tools-api
#KT-57396 Fixed
2023-04-18 18:19:23 +00:00
Alexander.Likhachev 7d29d34bf9 [Build] Configure binary-compatibility-validator for build-tools-api
#KT-57396 In Progress
2023-04-18 18:19:23 +00:00
Alexander.Likhachev 3a8d7c0839 [Build] Add build-tools-api and build-tools-impl modules
#KT-57396 In Progress
2023-04-18 18:19:23 +00:00
Nataliya.Valtman 3ab057b5e8 Fix BuildFusStatisticsIT flaky test 2023-04-18 17:55:36 +00:00
Abduqodiri Qurbonzoda f14f88b7ff [K/N] Inline Array constructor
As a part of efforts to stabilize Native stdlib.

Merge-request: KT-MR-9643
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-04-18 17:30:53 +00:00
Mikhail Glukhikh 9374202ebc FirCallResolve: disable property resolve optimization in builder inference
#KT-57889 Fixed
2023-04-18 17:05:01 +00:00
Mikhail Glukhikh f9a7a7fda2 K2: reproduce KT-57889 2023-04-18 17:05:00 +00:00
Zalim Bashorov 34f8851ac1 [psi2ir] Ignore private members when creating fake overrides from descriptors
The behavior is unified with the IR deserializer.
See `isOverridableMemberOrAccessor` in IrOverridingUtil.kt

Without this change, if we add a private member to the Any in wasm stdlib,
the compiler starts crashing with a linker error.

It's hard to write a relevant, self-contained box test for that since it requires
adding a private member to Any and affects **only** "virtual" FunctionN interfaces.
2023-04-18 18:44:47 +02:00
Ilya Gorbunov 0c1afcac67 KT-58046 Wrap hrtime array reading into a class
To achieve nice toString and proper equals/hashCode semantics of ValueTimeMark
2023-04-18 15:25:31 +00:00
Ilya Gorbunov 1014434475 KT-58046 Use saturated math in LongTimeMark implementation
- keep offset in range (-1..+1) of time source units
- when adding big or infinite offset, saturate startedAt instead
- displace initial reading to zero, similar to MonotonicTimeSource
- fix the zero reading in TestTimeSource by calling markNow in constructor
- use more precise reading adjustment in TestTimeSource for big durations
- add a note about comparable time marks for AbstractLongTimeSource and TestTimeSource
2023-04-18 15:25:31 +00:00
Ilya Gorbunov 7a6947ad35 KT-58046 Generalize saturating duration math to arbitrary units 2023-04-18 15:25:31 +00:00
Ilya Gorbunov 17d977977c KT-58058 Duration truncation internal helper function 2023-04-18 15:25:30 +00:00
Yahor Berdnikau b3decace6b Add KotlinApiPlugin in Gradle plugin variants
This plugin should apply specific implementations for variant Gradle
version including project isolation one.

^KT-55624 Fixed
2023-04-18 15:21:43 +00:00
Yahor Berdnikau cc1aaf4ba8 Add api compatible way to get if project isolation is enabled
Gradle 8.0 internal API has changed returned type. To fix incorrect KGP
behaviour has to add additional Gradle 8.0 plugin variant and provide
project isolation start parameter accessor implementation for older
Gradle versions.

^KT-55624 In Progress
2023-04-18 15:21:43 +00:00
Yahor Berdnikau 19b0ffd85c Bump Gradle API to 8.0
^KT-55624 Fixed
2023-04-18 15:21:43 +00:00
Yahor Berdnikau 8d02a415b2 Remove 'classifier' method usages in tests
^KT-55624 In Progress
2023-04-18 15:21:42 +00:00
Yahor Berdnikau 7f4c65fe10 Update AGP versions in tests
^KT-55624 In Progress
2023-04-18 15:21:42 +00:00
Yahor Berdnikau 7216a8bd95 Update Gradle versions in tests
^KT-55624 In Progress
2023-04-18 15:21:42 +00:00
Svyatoslav Scherbina f559533545 Bump Kotlin/Native version to 1.9.0-dev-5836
Also, fix KGP IT for linkage error messages:
the message text in the presence of compiler caches was changed because
of ab89203, and this commit effectively reverts expected message changes
made in ebaa09a.
2023-04-18 14:57:38 +00:00
Stanislav Erokhin f06087d5d3 [gradle] Deprecate kotlin-js plugin in favor of kotlin-multiplatform
#KT-57901 Verification Pending
2023-04-18 14:27:21 +00:00
Ilya Goncharov e4b6f3c12a [Gradle, JS] Not filter jar files in friendDependencies
^KT-56690 fixed
2023-04-18 14:25:54 +00:00
Kirill Rakhman ff7072830f [FIR] Make lambda parameters of dynamic function calls dynamic
#KT-57961 Fixed
2023-04-18 13:43:45 +00:00
Kirill Rakhman a3bf61c3f7 [FIR] Fix false positive error for trailing lambda on dynamic call
#KT-57961
2023-04-18 13:43:44 +00:00
Ilya Goncharov 418132c240 [Gradle, JS] Fix destinations of js and wasm dists
^KT-57629 fixed
2023-04-18 13:34:00 +00:00
Dmitriy Novozhilov faf212ca04 [FIR] Don't extract contracts in DFA during non-body resolution stages 2023-04-18 13:31:29 +00:00
Dmitriy Novozhilov bde4d003be [FIR] Extract contracts from original functions of fake overrides
^KT-57911 Fixed
2023-04-18 13:31:29 +00:00
Dmitriy Novozhilov f8dc8057f0 [FIR] Prohibit referencing type parameters in contracts ...
...if they are not reified or not belong to owner declaration of the contract

KT-57911
2023-04-18 13:31:28 +00:00
Dmitriy Novozhilov 5a92eb2c67 [FIR] Properly track problems in contract description during effect extraction 2023-04-18 13:31:28 +00:00
Alexander Korepanov 79d378f2bd [JS IR] Perform optimizations on the generated JS code
The patch adopts and reuses the optimizations from the legacy backend.

The optimizations remove useless temporary variables,
statements and simplify generated JS code.

The optimizations can be disabled by `-Xoptimize-generated-js=false`.

Related to KT-51139
2023-04-18 12:49:33 +00:00
Alexander Korepanov 84b5af3c89 [JS IR] Style fixes 2023-04-18 12:49:32 +00:00
Alexander Shabalin 9fd05632f0 [K/N] Track object counts during sweep ^KT-55364
Previously object count was tracked via allocator. It adds additional
burden on every allocation. Tracking via sweeper is better because
it mostly happens on the GC thread during a concurrent sweep.
2023-04-18 12:08:02 +00:00
Alexander Shabalin 63231f7b73 [K/N] Create ObjectFactory only w/o custom allocator ^KT-55364 2023-04-18 12:08:01 +00:00
Alexander Shabalin cb7698a8c2 [K/N] Track current heap size ^KT-55364 2023-04-18 12:08:01 +00:00
Alexander Shabalin 18b6351d5d [K/N] Tweak GC logs ^KT-55364
In info log one big chunk at the end of the GC iteration.
2023-04-18 12:08:00 +00:00