Commit Graph

12492 Commits

Author SHA1 Message Date
Dmitriy Novozhilov a64d8e8a31 [Stdlib] Deprecate and make open Number.toChar()
^KT-46465 Fixed
2023-03-27 10:46:13 +00:00
Dmitriy Novozhilov 90ec84d7b7 [Stdlib] Update copyrighting in generated stdlib sources 2023-03-27 10:46:11 +00:00
Ilya Goncharov 68dd89c593 [Gradle, JS] Fix binaryen registering tasks
^KT-57203 fixed
2023-03-27 09:32:09 +00:00
Kirill Rakhman 60b227c519 [FIR] Sort HMPP dependencies topologically for symbol providers
This fixes an issue where an actual class from an intermediate module
has more supertypes than its expect declaration which leads to a
false-positive resolution error because a type reference resolves to the
expect class. The fix is to sort the dependencies topologically from
"most actual" to "most expect" when creating the list of symbol
providers.

#KT-57369 Fixed
2023-03-27 07:41:05 +00:00
Alexander.Likhachev 5baeae3bfd [Gradle] Set the useK2 option in AbstractKotlinCompileConfig
It's a common compiler argument and may be applied to any compile task, there's no reason to set it separately for K/JS and K/JVM, and now it sets the compiler argument for metadata compilation tasks as well
2023-03-24 18:08:10 +00:00
Yahor Berdnikau b5e36a3c1b Allow to force values in kotlin-compiler-arguments-plugin
Added readme how to use with external projects
2023-03-24 16:40:30 +00:00
Alexander.Likhachev ca59092318 [Gradle] Read the kotlin.useK2 gradle property value for K/N tasks 2023-03-24 16:07:23 +00:00
Artem Daugel-Dauge 1c72ce173f [Gradle] Remove workarounds for KT-55751 in cocoapods tests 2023-03-23 21:02:20 +00:00
Sebastian Sellmair c45a9d6510 [Gradle] KotlinNativeTasks: buildDependencies: Add naive dependency loop protection
^KT-57531 Verification Pending
2023-03-23 20:56:41 +00:00
Sebastian Sellmair 89df0ed213 [Gradle] KotlinNativeTasks: buildDependencies: Filter constraint dependencies
^KT-57531 Verification Pending
2023-03-23 20:56:41 +00:00
Sebastian Sellmair 3f4b37693f [Gradle] Implement test Kotlin Native Link with cycle in dependency constraints
... to cover KT-57531
2023-03-23 20:56:41 +00:00
nataliya.valtman f3592088fe Temporary Ignore flaky test 2023-03-23 16:05:01 +00:00
Abduqodiri Qurbonzoda 9076e5b112 [K/N] Mark BitSet usages in stdlib with @ObsoleteNativeApi 2023-03-23 14:48:23 +00:00
nataliya.valtman d6a9bca5ec Create plugin for test to set language and api kotlin versions 2023-03-23 12:34:01 +00:00
Ilya Goncharov d14a55d775 [Gradle, JS] Remove redundant composites in K/JS Gradle Plugin
KT-47351
2023-03-23 10:13:00 +00:00
Ilya Goncharov 956682d1ca [Gradle, JS] No specific handling of composite dependencies
^KT-47351 fixed
2023-03-22 13:05:34 +00:00
Ilya Gorbunov 9892a49c4b KT-54452 Use js-ir sources for building stdlib-js sources.jar and API docs 2023-03-22 05:57:14 +00:00
Ivan Kylchik 6bce668cac Introduce language version 2.1 2023-03-21 20:02:42 +00:00
Ilya Goncharov 723aa84ea7 [Gradle, JS] No error on default compiler
^KT-57480 fixed
2023-03-21 13:23:32 +00:00
Anton Bannykh b0de442d76 JS IR: fix throwable descendants
^ KT-43490 fixed
2023-03-21 12:32:41 +00:00
hungvietnguyen 4f3244fb78 IC: Compute symbols impacted by classpath changes (#5111)
IC: Compute symbols impacted by classpath changes

Incremental compilation has 4 key steps:
  1. Compile changed/impacted files
  2. Detect symbols that have changed after compiling
  3. Detect symbols that are impacted by the changed symbols
  4. Based on the changed-or-impacted symbols, identify files that need
     to be recompiled. Go back to step 1.

Normally, step 2 and 3 are done together when the changed symbols
and impacted symbols are in the same module.

However, if the changed symbols and impacted symbols are in different
modules (e.g., a `Subclass` in lib1 extends a `Superclass` in lib2),
we currently do not compute symbols in the current module that are
impacted by changes in another module (step 3 above).

This is the case for both the new IC and the old IC.

In this commit, we will compute impacted symbols for the new IC. We can
fix the old IC later if necessary (they can't be fixed together easily).

Test: Added BaseIncrementalCompilationMultiProjectIT.testChangeInterfaceInLib
^KT-56197 Fixed
2023-03-21 13:12:15 +01:00
Ilya Goncharov bb09395952 [Gradle, JS] Unique name for NPM projects based on project path
^KT-56025 fixed
^KT-32209 fixed
2023-03-21 11:43:37 +00:00
Ilya Goncharov 5ce3132f9f [Gradle, JS] No format-util in gradle plugin dependencies 2023-03-21 10:18:42 +00:00
Vyacheslav Gerasimov 76c54a8ff3 Build: Fix usages of apis deprecated in Gradle 8 2023-03-20 19:45:39 +00:00
Vyacheslav Gerasimov bd9f096cfd Build: Replace configuration dependencies with extends
Configuration dependencies on configuration are not allowed in Gradle 8
2023-03-20 19:45:38 +00:00
Nikolay Krasko 8b12b3f18d Minor: remove code from top-level and move to task configurations 2023-03-20 17:58:15 +00:00
Sebastian Sellmair 4039ccbb05 [Tests] Use custom test tasks instead of gradle test suites for kgp functionalTests
^KT-57380 Verification Pending
2023-03-20 12:29:51 +00:00
nataliya.valtman 730502638a Dont call GC for every task 2023-03-20 11:33:03 +00:00
Vsevolod Tolstopyatov 33d13474c5 Make EnumEntries implementation eager
* Addresses the recent design changes of the corresponding language feature
* Also rework JS/Wasm enumEntries implementation with the function that accepts array instead of fabric function


^KT-57318


Co-authored-by: Artem Kobzar <Artem.Kobzar@jetbrains.com>

Merge-request: KT-MR-9204
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
2023-03-20 10:18:28 +00:00
Artem Daugel-Dauge e75fac271d [Gradle] Fix red CocoaPods tests which were hidden by an installation issue 2023-03-17 14:19:13 +00:00
Artem Daugel-Dauge df3ec232b2 [Gradle] Explicitly specify CocoaPods version in tests 2023-03-17 14:19:13 +00:00
Artem Kobzar 4da81b2b6e [K/JS] Remove an internal system property and replace it with the new compiler flag 2023-03-17 12:38:34 +00:00
Mads Ager 46db4b4e6d [K2] Ignore failing metadata tests while working on them. 2023-03-17 07:15:14 +00:00
Mads Ager 683220a32c [K1] Remove compiler version requirements for context receivers in metadata. 2023-03-17 07:15:13 +00:00
Mads Ager ed84fbd8a6 Sort kotlinp output in tests to reduce diff between K1 and K2. 2023-03-17 07:15:13 +00:00
Mads Ager 04a088039c [K2] Add support for running Kotlinp tests with K2.
The tests fail spectacularly at this point in time.
2023-03-17 07:15:12 +00:00
Ilya Goncharov f2ecb097f1 [Gradle, JS] Remove webpack 4 support
^KT-57387 fixed
2023-03-16 22:07:31 +00:00
Ilya Goncharov 484d3ad273 [Gradle, JS] Upgrade npm dependencies
^KT-57386 fixed
2023-03-16 19:28:18 +00:00
Ilya Gorbunov 9a7468254d Do not add duplicate content roots to kotlin-dom-api-compat during IDEA sync
Otherwise, stdlib-js source roots are not recognized in the IDE
2023-03-16 18:58:56 +00:00
nataliya.valtman 37eefc2a05 KT-57296 And backward compatibility with old Idea versions 2023-03-16 16:30:56 +00:00
Artem Kobzar 948c511284 [K/JS] Rework ES modules part with squashed JsImport and right renaming strategy inside import/export statements 2023-03-16 10:28:39 +00:00
Svyatoslav Kuzmich 76b4498399 [Wasm] IDL bindings improvements
- Generated types extend JsAny
- Use JsAny instead of Dynamic
- Use JsArray instead of Array
- Use JsNumber, JsString and JsBoolean in JsAny context
- Refactor dictionary constructor functions
2023-03-16 09:12:08 +00:00
Svyatoslav Kuzmich 2a10cf3de2 [Wasm] Dukat: use IDL conversion API directly without dukat CLI
Copy unmodified convertToModel.kt from dukat
2023-03-16 09:12:08 +00:00
Svyatoslav Kuzmich 1208a26fc4 [Wasm] Use JsAny, JsHandle and other Js* types in stdlib and kotlin-test 2023-03-16 09:12:07 +00:00
Svyatoslav Kuzmich d6886d69ec [Wasm] Add internal JsPrimitive annotation
Before external classes could only represent JS object types and are
type-checked with `instanceof`.
@JsPrimitive allows external classes to represent primitive types with
`typeof` checks.
2023-03-16 09:12:07 +00:00
Yahor Berdnikau c17668a225 Add Android project level compiler options DSL
Works the same as JVM project compiler options DSL. 'android
.kotlinOptions' now configures compilerOptions from extension basically
behaving same way as newly added DSL.

^KT-57159 Fixed
2023-03-15 15:39:09 +00:00
Yahor Berdnikau edc6194737 Fix reporting compiler stats
Now it should report actual values for languageVersion, apiVersion and
progressiveMode for any compilation invocation.

^KT-57159 In Progress
2023-03-15 15:39:08 +00:00
Yahor Berdnikau dfec9efbb0 Add JVM project level compiler options DSL
These options are used as initial convention values for compilerOptions
in target compilations.

^KT-57159 In Progress
2023-03-15 15:39:08 +00:00
Yahor Berdnikau 6509b0201c Add method to sync options from one instance to another as convention
^KT-57159 In Progress
2023-03-15 15:39:08 +00:00
Yahor Berdnikau 4d4e5f4701 Split compiler options implementation and helper methods
Such split allows to reuse default implementation for different
use-cases. Helpers, in this case, allows to do manipulations with
options where required.

^KT-57159 In Progress
2023-03-15 15:39:07 +00:00