Commit Graph

100842 Commits

Author SHA1 Message Date
Dmitry Savvinov 4e479cb54b [mpp] Migrate UnusedSourceSetsChecker to the new infra 2023-05-02 14:32:13 +00:00
Dmitry Savvinov ee9a952da2 [mpp] Migrate jvmWithJava preset deprecation to the new infra 2023-05-02 14:32:13 +00:00
Dmitry Savvinov 05662eae7a [mpp] Migrate MissingNativeStdlibWarning to the new infra 2023-05-02 14:32:13 +00:00
Dmitry Savvinov 07142a4083 [mpp] Migrate checks of commonMain.dependsOn to the new infra 2023-05-02 14:32:13 +00:00
Dmitry Savvinov 7a5f1d694f [mpp] Migrate checks of deprecated K/N targets to new infra 2023-05-02 14:32:13 +00:00
Dmitry Savvinov a539db932c [mpp] Migrate HMPP-flags deprecations to the new infra 2023-05-02 14:32:13 +00:00
Dmitry Savvinov 29223dbd4a [Gradle] Add integration tests on new diagnostics infrastructure 2023-05-02 14:32:13 +00:00
Dmitry Savvinov 5cd94d1db2 [Gradle] Support testing new diagnostics infrastructure in functionalTests 2023-05-02 14:32:13 +00:00
Dmitry Savvinov 4a88e01a8e [Gradle] Add new infrastructure for diagnostics in KGP 2023-05-02 14:32:13 +00:00
Dmitry Savvinov 5dd52f7d40 [tests] Apply modern plugins instead of legacy ones
KotlinPlatform*Plugins are plugins from pre 1.3 MPP and shouldn't
be used. The intention was to apply usual 'kotlin("jvm")' and
'kotlin("android")'-plugins, for which KotlinPluginWrapper and
KotlinAndroidPlugin stand respectively
2023-05-02 14:32:13 +00:00
Dmitry Savvinov 0a33eef518 [build] Fix weird dependencies management
kotlin-gradle-plugin-integration-tests on runtime uses relocated
compiler jars. A special handling is required to support this.

Looks like 'kotlin-gradle-plugin-test-utils' was meant to help
here somehow, but was accidentally broken at some point. It went
unnoticed because not much classes from transitive dependencies
of 'kotlin-gradle-plugin-test-utils' were used.

The change in this commit still leaves a few questions about this
configuration, but at leats it makes it possible to use compiler
classes (e.g. KotlinTestUtils)
2023-05-02 14:32:12 +00:00
Dmitry Savvinov e22a9b7108 [mpp] Minor: drop obsolete reporting of HMPP flags
Now any usages of HMPP-flags are deprecated and reported in
deprecationDiagnostics.kt, which can sometimes lead to duplicated
reports
2023-05-02 14:32:12 +00:00
Dmitry Savvinov 31eb012b6b [tests] Minor: add support of DevKit in Gradle IT
This should provide some nicities in IDEA like folders for navigating
to testData
2023-05-02 14:32:12 +00:00
Denis.Zharkov e95b8b843b K2: Support Unit-typed synthetic Java property
^KT-57979 Fixed
2023-05-02 14:24:23 +00:00
Sergej Jaskiewicz c022c451a4 Adjust the code style to use trailing commas in parameter lists 2023-05-02 13:36:56 +00:00
Kirill Rakhman 3bfb0866cb [FIR] Report CANNOT_CHECK_FOR_ERASED independent of reified parameters
This changes the logic so that Foo<T> is reported no matter if T is
reified or not. Even for Array<reified T> to align K2 with K1 logic.

#KT-55903 Fixed
2023-05-02 13:14:47 +00:00
Mikhail Glukhikh bbee881b5b K1: add separate TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM_IN_AUGMENTED_ASSIGNMENT
This is made to have a correct error message for a problem
described in KT-48546
#KT-48546 Fixed
2023-05-02 12:57:15 +00:00
Mikhail Glukhikh c5fe4b53cf FE: add more augmented assignment tests around KT-48546 2023-05-02 12:57:15 +00:00
Kirill Rakhman bdc5a37552 [Gradle IT] Enable integration test after Native version bump
#KT-58219
2023-05-02 13:25:30 +02:00
Dmitriy Dolovov 38a777fa94 [PL][tests] Mute K/N codegen/box tests failing in K1/one-stage mode
For details, see #KT-57747.
2023-05-02 10:58:38 +00:00
Alexander Udalov 926aa07ca1 Gradle: do not set fragments/fragmentRefines for non-MPP
Otherwise kapt-generated Kotlin sources do not end up in any module,
which causes an error in KT-58301. The error is only happening with K2
because fragments/fragmentRefines arguments are checked more strictly
than commonSources used in K1.

 #KT-58301 Fixed
2023-05-02 10:52:23 +00:00
Alexander Udalov b72b1ad7cd CLI: fix confusing error message about JvmDefault
#KT-58351 Fixed
2023-05-02 10:52:01 +00:00
Anna Kozlova 8106505166 [decompiler] get rid of indexers in decompiled text 2023-05-02 10:30:35 +00:00
Anna Kozlova 1102dc1d0e [psi] define common constant expressions types 2023-05-02 10:30:34 +00:00
Anna Kozlova 956294821b [psi] don't load text for compiled code
use stubs when possible, when stub doesn't contain anything,
decompiled text won't contain it either,
no sense to load
2023-05-02 10:30:34 +00:00
Dmitriy Novozhilov e9c8be3b64 [FIR] Don't generated fake-overrides for private declarations of actualized super classes
^KT-58252 Fixed
2023-05-02 10:24:53 +00:00
Aleksei.Glushko cfa481d38f [K/N] Benches for parallel mark: life + splay with mark helpers
Merge-request: KOTLIN-MR-669
Merged-by: Aleksej Glushko <aleksei.glushko@jetbrains.com>
2023-05-02 10:24:25 +00:00
Aleksei.Glushko 8173091fee [K/N] print thread id in assertion failed
Merge-request: KOTLIN-MR-668
Merged-by: Aleksej Glushko <aleksei.glushko@jetbrains.com>
2023-05-02 10:23:38 +00:00
Svyatoslav Scherbina cfd363e232 Bump Kotlin/Native version to 1.9.20-dev-293 2023-05-02 10:12:10 +00:00
Sergej Jaskiewicz ac79f0c456 [test] Don't run JVM-specific irText test against other backends 2023-05-02 09:53:57 +00:00
Ilya Goncharov f8c51dcfee [Gradle, JS] Fix configuration cache for NodeJsExec and D8Exec
^KT-58250 fixed
^KT-58256 fixed
2023-05-01 20:15:37 +00:00
Ilya Goncharov 83db4a06d9 [Gradle, JS] Make esModules property finalized on read 2023-05-01 19:35:31 +00:00
Ilya Goncharov b824c091da [Gradle, JS] Add additional diagnostic for composite build test 2023-05-01 19:12:54 +02:00
Nikolay Krasko 0fb5934ebd [213] Add library dependencies to kotlin-native.jar
While dependency is added to backend.native, it's than
transitively packed to :kotlin-native:shadowJar. Without it
running gradle with -Pkotlin.native.useEmbeddableCompilerJar=false fails
with

e: java.lang.NoClassDefFoundError: org/codehaus/stax2/typed/TypedXMLStreamException

KTI-1114
2023-05-01 14:58:48 +00:00
Justin Paupore ae70edb1c8 [Parcelize] Recombine for-ide libraries.
K2 IDE support requires that the entire plugin is in a single JAR, so we
need to have the K1, K2, and CLI (CompilerPluginRegistrar) libraries
available on a single for-ide target.

This reverts commit c9badd14a7.

^KT-57795 fixed
2023-05-01 16:27:49 +02:00
Jinseong Jeon 501ec4fdbf AA: fix typo in KtLibrarySourceModule description 2023-05-01 16:26:54 +02:00
Sebastian Sellmair e547ea29b3 [Gradle] Raise min required AGP version for Multiplatform to 7.0
^KT-58281 Verification Pending
2023-05-01 13:07:37 +00:00
Sebastian Sellmair f2270ccdc7 [Gradle] Enable Multiplatform/Android SourceSetLayout v2 by default
^KT-58281 Verification Pending
2023-05-01 13:07:37 +00:00
Sebastian Sellmair 56ba5a284d [Gradle] Add unit test, checking which metadata compilations are created
This will quickly notify any developer if some code
has unexpected effects on the creation of metadata compilations

^KT-58319 Verification Pending
2023-05-01 13:05:47 +00:00
Sebastian Sellmair 8273328726 [Gradle] ProjectMetadataProvider: Allow nullable compiled metadata for SourceSet
The commit leading to the issue described in KT-58319 was:
510eca9da1
[Gradle] Implement source set inspection methods as 'suspend'

In this commit one method called
'getCommonSourceSetsForMetadataCompilation' was implemented
in a suspend style.

This re-implementation however introduced a semantic change to the function:
Previously this method (counterintuitively) returned commonMain
even if the SourceSet only participated in a single platform compilation.
This is because the KotlinMetadataTarget still cas a 'main' compilation
that includes 'commonMain'. The previous implementation did not filter
this compilation therefore found two platform types for the SourceSet,
assuming that it can be compiled to metadata.

This lead to a 'commonMain' compilation created which then gets
correctly disabled by 'isMetadataCompilationSupported'.

After the commit, a single target project did not create a 'commonMain'
compilation anymore. This leads to no metadata being provided
by the metadata provider. This seems OK, but the 'ProjectMetadataProviderImpl'
threw an error in cases the IDE requested this metadata.

^KT-58319 Verification Pending
2023-05-01 13:05:47 +00:00
Sebastian Sellmair 900f26f3c5 [Gradle] Implement KT58319ProjectMetadataProviderTest to cover KT-58319 2023-05-01 13:05:47 +00:00
Pavel Kunyavskiy f55fd481e9 [K/N] Refactor default argument lowering to avoid boxing
Current inline classes API is not compatible between different backends.
So implementing common function required for this optimization
was not possible in Native backend.

So, common default arguments lowering was refactored to make bigger
piece of code replaceable in backends.

^KT-57860
2023-05-01 13:04:21 +00:00
Alexander Korepanov 2aea5822b2 [JS IR] Unmute all fir invalidation tests 2023-05-01 12:56:12 +00:00
Alexander Korepanov 9da9c95105 [JS IR] Add IC test for interface with default implementation 2023-05-01 12:49:07 +00:00
Mikhail Glukhikh 180613e1c6 K2: calculate deprecations for backing field properly
#KT-58224 Fixed
2023-05-01 11:59:20 +00:00
Mikhail Glukhikh 94c94d0605 K1: add a language feature to negate new errors from DiagnosticReporterByTrackingStrategy
Related to KT-55055, KT-55056, KT-55079, KT-57854
2023-05-01 11:47:01 +00:00
Mikhail Glukhikh 4188bca9b8 K1: don't report RECEIVER_TYPE_MISMATCH with -ProperTypeInferenceConstraintProcessing
Related to KT-55056
#KT-57854 Fixed
2023-05-01 11:47:01 +00:00
Mikhail Glukhikh 04812332f9 FE: add tests reproducing KT-57854 2023-05-01 11:47:01 +00:00
Ilya Goncharov a3d45964f3 [Gradle, JS] Add test with webpack + es modules 2023-05-01 10:45:02 +00:00
Ilya Goncharov 5b47b1ac24 [Gradle, JS] esmodules for webpack 2023-05-01 10:45:01 +00:00