Commit Graph

3950 Commits

Author SHA1 Message Date
Sebastian Sellmair f06a1c89ef [stdlib-mpp] Publish patched/custom kpsm to list 'commonMain' included into 'nativeApiElements'
Native/Shared Source Sets still requires stdlib:commonMain.klib as
dependency for IDE analysis.

See: KT-56278
^KT-60901 Verification Pending
2023-08-11 14:52:02 +00:00
Ilya Gorbunov 3e4cbd6dd2 Publish Gradle metadata for kotlin-stdlib-common, KT-60911
This makes it depend on kotlin-stdlib in all targets
and have no artifacts from Gradle's point of view
2023-08-11 08:49:23 +00:00
Nikita Bobko d39755b578 [FE] Convert specific diagnostic for actual function with default arguments into a common incompatibility
^KT-59665 Fixed
Review: https://jetbrains.team/p/kt/reviews/11039/timeline

It's better to have this logic in common place
(AbstractExpectActualCompatibilityChecker) to avoid missing compilation
errors in the future

This commit fixes:
1. Missing compilation error for actual function with default arguments
   for 'actual typealias' KT-59665
2. Missing compilation error for actual function with default arguments
   for actual fake-override KT-59665

Alternative solution for KT-59665 is to create a special checker.

"incompatibility" vs "special checker":

Arguments for common incompatibility:
- What if we had a rule that expect and actual default params must
  match? If so then it certainly would be an incompatibility.
- Technically, we do the matching of expect and actual params (because
  we allow default params in common ancestors of expect and actual
  declarations).
- It's hard to check that the actual definition doesn't use default
  params because `ExpectedActualResolver.findActualForExpected` filters
  out fake-overrides and doesn't return them. It's not clear logic for
  me, that I'm afraid to touch.
  implicitActualFakeOverride_AbstractMap.kt test breaks if you drop this
  weird logic
- WEAK incompatibilities can be considered as "checkers". So it doesn't
  matter how it's implemented, as a "incompatibility" or a "checker"

Arguments against common incompatibility:
- Although we match expect and actual declarations to allow default
  params in common ancestors of expect and actual declarations, it's
  still can be considered that we check that the actual declaration
  doesn't have default params. And it doesn't feel right that we check
  correctness of the actual declaration in expect-actual matcher.
- ~~It may change the rules of expect actual matching~~ (It's not true,
  because ActualFunctionWithDefaultParameters is declared as WEAK
  incompatibility)
2023-08-10 15:46:46 +00:00
Ilya Gorbunov 0882c645dd [stdlib-mpp] Move dependency constraints to api dependencies, KT-55297
Constrained alignment is also required for compile time dependencies
2023-08-10 10:35:54 +00:00
Aleksei.Cherepanov c8c3565a24 Fix JPS import
Exclude kotlin-stdlib-js project for JPS build. Related to KT-56106

#KT-61059 Fixed


Merge-request: KT-MR-11527
Merged-by: Aleksei Cherepanov <aleksei.cherepanov@jetbrains.com>
2023-08-09 14:37:21 +00:00
Anton Lakotka 7c5dd7c451 [stdlib-mpp] Add dependency constraint on kotlin-stdlib-common for...
...other variants where it can be expected. Such as:

* commonMainMetadataElements (legacy metadata)
* metadataElements (klib metadata)
* nativeApiElements

This would prevent from leaking kotlin-stdlib-common dependencies of
older Kotlin versions. So every KGP configuration where
stdlib dependencies is configured automatically will enforce dependency
constraints on kotlin-stdlib-common.

^KT-61053 Verification Pending
2023-08-09 07:52:35 +00:00
Igor Yakovlev 223e590dcd [Wasm] Temporary task to provide wasm stdlib tests 2023-08-08 18:10:20 +02:00
Igor Yakovlev 983991d46c [Wasm] Add box and stdlib tests in wasi mode 2023-08-08 18:10:19 +02:00
Igor Yakovlev f42d0b1ed4 [Wasm] Add wasi kotlin.test target gradle buildscript 2023-08-08 18:10:19 +02:00
Igor Yakovlev d1c7caf15c [Wasm] Add wasi stdlib target gradle buildscript
KT-56608
2023-08-08 18:10:19 +02:00
Igor Yakovlev 8cc0660693 [Wasm] Wasi stdlib implementation
KT-56608
2023-08-08 18:10:19 +02:00
Igor Yakovlev 090f393f97 [Wasm] Make std internal functions have a bodies 2023-08-08 18:10:19 +02:00
Ilya Gorbunov 0072189fb1 [stdlib-mpp] Configure SBOM for published artifacts KT-53791 2023-08-08 12:32:18 +00:00
Abduqodiri Qurbonzoda 21619264d0 [K/N] Add a note to Regex documentation about future changes of behavior
This note will allow us to fix https://youtrack.jetbrains.com/issue/KT-58198/Native-Regex-issues in the future.

Co-authored-by: Ilya Gorbunov <Ilya.Gorbunov@jetbrains.com>


Merge-request: KT-MR-11387
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-08-08 08:21:10 +00:00
Alexander Udalov cceb138c6c Stdlib: do not check radix twice in Byte/Short.toString
`checkRadix` is already called in `Int.toString`.
2023-08-07 21:47:10 +00:00
Ilya Gorbunov 1a8cb02a43 [stdlib-mpp] Fix implicit signing task dependency on shared javadoc artifact
By not using shared javadoc artifact for all publications.
See the commit e6df34805f for details.
2023-08-04 16:11:56 +00:00
Ilya Gorbunov 28992b1302 [stdlib-mpp] Move KGP obsolete property suppress closer to usage
Also remove no-op property enableGranularSourceSetsMetadata
2023-08-04 16:11:56 +00:00
Ilya Gorbunov d72631a773 [stdlib-mpp] Workarounds for opt-in problems caused by languageSettings DSL rework
KT-56106
2023-08-03 14:47:21 +00:00
Ilya Gorbunov 21565c6128 [stdlib-mpp] Add dependency constraints to JVM variant, KT-55297 2023-08-03 14:47:21 +00:00
Ilya Gorbunov 671451fb67 [stdlib-mpp] publish legacy MPP common metadata additionally in a variant under 'common' classifier 2023-08-03 14:47:21 +00:00
Ilya Gorbunov a9bc8fa402 [stdlib-mpp] Exclude kotlin-stdlib-js/js-ir projects and use kotlin-stdlib instead
- Specify disambiguating attributes in kotlin-dom-api-compat
  compile dependency configurations
  because it uses the flag that removes JS compiler type attribute
  from all configurations and variants

  KT-56106
2023-08-03 14:47:21 +00:00
Ilya Gorbunov a4c75338f3 [stdlib-mpp] js artifacts for dist
KT-56106
2023-08-03 14:47:21 +00:00
Ilya Gorbunov 8e78a433e7 [stdlib-mpp] Suppress warnings to please the Kotlin compiler in Gradle DSL
KT-56106
2023-08-03 14:47:21 +00:00
Ilya Gorbunov 19cbd4dd3e [stdlib-mpp] Disable js-v1 test execution and compilation and remove the corresponding workarounds
KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov 51dcbc8520 [stdlib-mpp] Disable browser test runs on TC
KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov 12c314cfa4 [stdlib-mpp] Fix artifact classifiers for dist
KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov 69a87efdd9 js.tests: change paths to kotlin-stdlib-js.klib
Change the expected klib name of stdlib

KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov 34720f27d4 [stdlib-mpp] Switch kotlin-stdlib project to multiplatform
#KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov fac620df0b [stdlib-mpp] Setup custom publishing, disable default publications
KT-56106, KT-53791

Co-authored-by: Anton Lakotka <anton.lakotka@jetbrains.com>
2023-08-03 14:47:20 +00:00
Ilya Gorbunov 184cbd6eb1 [stdlib-mpp] Exclude transitive mpp stdlib dependency when compiling with legacy js plugin
#KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov 3090181cc5 [stdlib-mpp] Workaround legacy JS stdlib test run not using freshly-built kotlin.js
Move kotlin.js and kotlin-test-js-v1 output
closer to kotlin-stdlib-js-v1-test to avoid picking (or missing)
kotlin.js from bootstrap higher in hierarchy

#KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov d7d14e7e9e [stdlib-mpp] Do not merge legacy js content into kotlin-stdlib-js.klib
#KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov 58c5746fe4 [stdlib-mpp] Reconfigure jvm, js-ir, js-v1 mpp stdlib compilations
- jdk7/8 source sets
- source copying task dependencies
- jar manifest entries
- module-info.class
- jdk 9-11 test runs
- sources jars

#KT-56106
2023-08-03 14:47:20 +00:00
Ilya Gorbunov 9ed6574979 [stdlib-mpp] Disable sources for IDEA sync in conflicting projects
#KT-56106
2023-08-03 14:47:19 +00:00
Ilya Gorbunov 46cee9d0a3 [stdlib-mpp] Setup JVM, JS-IR and JS-legacy unit tests
The latter do not work for now

#KT-56106
2023-08-03 14:47:19 +00:00
Ilya Gorbunov 5c6d3b03df [stdlib-mpp] add JS-IR target
#KT-56106
2023-08-03 14:47:19 +00:00
Ilya Gorbunov 34fc6278ea [stdlib-mpp] initial approach in a separate project
- produce similar jvm, js and common jars
- try default publishing

#KT-56106
2023-08-03 14:47:19 +00:00
Vsevolod Tolstopyatov 64c8ce18a0 Make enumEntries intrinsic public
It is implemented in JVM, JS and Native backends already

^KT-53154 fixed


Merge-request: KT-MR-11355
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
2023-08-02 18:07:51 +00:00
Ilya Goncharov b9e5b8a087 [Gradle, Wasm] Add wasmWasi target, replace wasm target onto wasmJs
KT-60654
2023-08-01 13:11:36 +00:00
Artem Kobzar cd840997b1 [K/Wasm] Rework Wasm enumEntriesIntrinsic declaration to fix stdlib compilation 2023-08-01 11:53:14 +00:00
Zalim Bashorov 2d728727da [Wasm] Don't use the new br_on_cast* instructions since they are not supported in Node.js yet
#KT-60835 Fixed
2023-08-01 08:46:59 +00:00
Zalim Bashorov 4572680877 [Wasm] Migrate to the latest br_on_cast* instructions
#KT-59722 Fixed
2023-07-28 16:16:33 +00:00
Abduqodiri Qurbonzoda 524df83265 Deprecate kotlin.jvm.internal.collectionToArray 2023-07-27 11:16:58 +00:00
Abduqodiri Qurbonzoda 7fc90c02f1 Rename copyToArrayImpl to collectionToArray 2023-07-27 11:16:58 +00:00
Abduqodiri Qurbonzoda 7010bf2c20 Move copyToArrayImpl implementation to Common source set 2023-07-27 11:16:58 +00:00
Abduqodiri Qurbonzoda 6fdfd4e8dd Null-terminate Collection.toArray destination only in JVM
In other platforms the elements following the collection elements
should not be changed.

As a part of efforts to stabilize Native stdlib.
2023-07-27 11:16:58 +00:00
Abduqodiri Qurbonzoda 60455daa9d Update AbstractCollection.toArray documentation 2023-07-27 11:16:58 +00:00
Artem Kobzar 85ee2d71d2 [K/JS] Remove FILE target from JsName annotation and use the new experimental JsFileName annotation instead 2023-07-27 09:44:28 +00:00
Artem Kobzar 029c71ebb1 [K/JS, K/Wasm] Implement enumEntries top-level function ^KT-59712 Fixed 2023-07-27 09:43:01 +00:00
Abduqodiri Qurbonzoda df16fa3306 [K/N] Regex matching zero length should split surrogate pairs #KT-57401
Merge-request: KT-MR-11110
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-07-26 14:19:25 +00:00