Commit Graph

3812 Commits

Author SHA1 Message Date
Bogdan Mukvich 303b01b89b Add SBOM configuration for all published artifacts by default 2023-06-06 13:27:26 +00:00
Vyacheslav Gerasimov e0a477f16d Build: Refactor sbom configuration & wire it with main publication 2023-06-06 13:27:25 +00:00
Bogdan Mukvich 18f52832f5 Configure SBOM maven publishing for stdlib 2023-06-06 13:27:25 +00:00
Artem Kobzar bfd57fd2df [K/JS, K/Wasm] Optimize simple objects declaration and usage ^Fixed KT-58797 2023-06-02 14:23:40 +00:00
Abduqodiri Qurbonzoda 7d9ea28604 Deprecate lazy() that synchronizes on a given lock in non-JVM platforms
Because the overload has a meaningful implementation only in JVM.
In other platforms the specified lock object is ignored.
In K/N it throws UnsupportedOperationException.
2023-06-01 19:40:02 +00:00
Abduqodiri Qurbonzoda 7acaf6e473 [K/N] String.indexOf matches byte sequences not on the char boundary #KT-56637
If the found index is odd, retry search from index + 1.

Merge-request: KT-MR-10364
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-06-01 12:56:32 +00:00
Nikita Bobko 4be7ac930b Update KClass.isData KDoc to include info about data objects
^KT-58985 Fixed
Review: https://jetbrains.team/p/kt/reviews/10385

`isData` returns `true` for `data object`s even if kotlin-reflect
version is old (1.2.0), so it looks like we got correct `KClass.isData`
behaviour for "free". That's why this behaviour was never covered with
tests.

This commit updates the documentation and covers the behaviour described
in the KDoc with tests.
2023-06-01 12:09:15 +00:00
Igor Yakovlev c71a2c6dd3 Codereview 2023-05-31 10:46:24 +00:00
Igor Yakovlev 78b72efd32 [Wasm] Make Arrays' constructors with size and lambda inline
Fixed #KT-58746
2023-05-31 10:46:24 +00:00
Ilya Gorbunov e11ebcadb4 Test refactor: extract big duration adjustment to a separate test 2023-05-31 04:45:15 +00:00
Ilya Gorbunov f8f3862f0c Make TimeMark adjustment test more stable 2023-05-31 04:45:15 +00:00
Igor Yakovlev 1749bafc30 [Wasm] Rename dateref to structref 2023-05-19 15:50:07 +00:00
Igor Yakovlev 6437d0919c [Wasm] Replace deprecated cast instructions 2023-05-19 15:50:06 +00:00
Igor Yakovlev a224feefd2 [Wasm] Fix invalid rounding for reminder calculation
#Fixed KT-58681
2023-05-16 15:53:01 +00:00
Ilya Gorbunov bbb36ce501 KT-58046 Promote time sources, time marks, measureTime to stable 2023-05-16 11:42:32 +00:00
Alexander Udalov 98fb4f1f45 Stdlib tests: annotate serialized lambdas explicitly
Behavior is going to change in KT-45375 and lambdas will no longer be
serializable by default.
2023-05-12 19:55:25 +00:00
Vsevolod Tolstopyatov 5b474bc5d3 Stabilize EnumEntries stdlib signature
* Also, mention implementation details of EnumEntries to enable safe uses of a 'EnumEntries' as a set
* Fix testdata for opt-in marker in enum entries

^KT-58548 fixed

Merge-request: KT-MR-10037
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
2023-05-11 09:18:44 +00:00
Ilya Gorbunov b35b727d73 KT-53778 Remove experimental annotations from open ranges 2023-04-28 17:12:15 +00:00
Filipp Zhinkin cadf4f63b0 KT-54739 Return single empty inst from collection builders(all src-sets)
Fixed remaining builders, added additional checks to a test.

^KT-54739 fixed
2023-04-26 12:05:15 +00:00
Ivan Kochurkin 0c1d957711 KT-54739 Return single empty instance from collection builders on JVM
- return single instance of emptySet for build method from SetBuilder
- return single instance of emptyMap for build method from MapBuilder
- return single instance of emptyList for build method from ListBuilder

^KT-54739 fixed
2023-04-26 12:05:15 +00:00
Ilya Gorbunov 2100f08655 Make subarrayContentToString internal 2023-04-26 10:44:52 +00:00
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
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
Sergey Bogolepov fce878d63a [K/N] KT-56464: implementation of HiddenFromObjC for classes in backend 2023-04-26 09:36:10 +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
Alexander Udalov bab88c05c3 JvmDefault: deprecate JvmDefault annotation class with ERROR
#KT-54746 Fixed
2023-04-25 14:33:00 +00:00
Alexander Udalov e0b5ae7781 JvmDefault: remove diagnostics related to @JvmDefault
#KT-54746
2023-04-25 14:33:00 +00:00
Ilya Gorbunov ace2279631 Refactor helper function to run/not run block of common code on specific platform
Use it in StringBuilder tests
2023-04-25 13:55:04 +00:00
Ilya Gorbunov 454e963aa7 StringBuilder capacity test: fixup deprecation suppression 2023-04-25 13:55:04 +00:00
Ilya Gorbunov 6dc2960b77 Relax back an assertion in testLongAdjustmentElapsedPrecision
Reverts the assertion strictening happened in commit 1014434475
2023-04-25 13:54:39 +00:00
Zalim Bashorov 77491ded1b Use Array constructor with size to create Array of nulls
Change the constructor visibility from public to private as it should be.
2023-04-22 17:41:23 +00:00
Svyatoslav Kuzmich 933f47aaf9 [Wasm] Rename JsHandle to JsReference
Decision to do this was made at Kotlin/Wasm interop design meeting
2023-04-21 15:03:20 +00:00
Svyatoslav Kuzmich 7ba8f7cce2 Revert "[Wasm] Deprecate @JsFun with warning"
Reason: Design of js(code) replacement is still in flux.
        It would be better to delay deprecation until we converge
        to proper solution.

This reverts commit 3566d918d2.
2023-04-21 15:03:20 +00:00
Svyatoslav Kuzmich 7c2fa3290e [Wasm] Revert removal of some Dynamic functions
Deprecate them with ERROR instead to improve compiler messages
2023-04-21 15:03:19 +00:00
Filipp Zhinkin 50841e7cb0 KT-42589 Add listOf, setOf, mapOf overloads for a single value to common src-set
`listOf`, `setOf` and `mapOf` overloads were defined in some source-sets
but common source-set was missing it.
This change adds common definition of these methods and also add
declarations for source-sets that were previously
missing it.

^KT-42589 fixed
2023-04-20 08:42:15 +00:00
Ivan Kylchik 2e836494f5 Rewrite primitives' generation using simple DSL 2023-04-20 08:18:58 +00:00
Ivan Kylchik dd0267f4ad [WASM] Mark necessary methods that must be evaluated at compile-time
It includes methods and properties from Boolean, Char, String,
Enum and KCallable.
2023-04-20 08:18:58 +00:00
Ivan Kylchik 695229e288 [JS] Mark necessary methods that must be evaluated at compile-time
It includes methods and properties from Boolean, Char, String,
Enum and KCallable.
2023-04-20 08:18:57 +00:00
Ivan Kylchik 07ca981632 Unify generation of Primitives files for all backends 2023-04-20 08:18:57 +00:00
Abduqodiri Qurbonzoda da0cc2ea4d [K/N] Deprecate Char.MIN_RADIX and MAX_RADIX constants
As a part of efforts to stabilize Native stdlib.
2023-04-19 20:33:33 +00:00
Abduqodiri Qurbonzoda b25f3be81b [K/N] Experimental Char code point constants and functions
Internalize WASM Char code point functions.

As a part of efforts to stabilize Native stdlib.
2023-04-19 20:33:33 +00:00
Abduqodiri Qurbonzoda c6eaadb44f [WASM] Internalize MutableList.replaceAll function
It will be introduced later in Common: KT-57152.
2023-04-19 20:32:56 +00:00
Abduqodiri Qurbonzoda 954e11c265 [K/N] Mark MutableList.replaceAll with ExperimentalNativeApi
As a part of efforts to stabilize Native stdlib #KT-55765.
2023-04-19 20:32:55 +00:00
Abduqodiri Qurbonzoda 040fcee04e [K/JS] Loosen StringBuilder.capacity() deprecation level to WARNING 2023-04-19 20:20:43 +00:00
Abduqodiri Qurbonzoda 88181404df [K/N] Remove deprecation from StringBuilder.capacity() function
As a part of efforts to stabilize K/N stdlib.
2023-04-19 20:20:43 +00:00
Abduqodiri Qurbonzoda 208b279d2b [K/N] Internalize CharCategory.value/valueOf
As a part of efforts to stabilize K/N stdlib.
2023-04-19 20:20:42 +00:00