Commit Graph
13553 Commits
Author SHA1 Message Date
Stanislav Erokhin d99f8ac9b4 [mpp] Test that every deprecated pre-HMPP property triggers an Error
Previously all these properties were put together, so only one
of them could have triggered the Error

#KT-59304 Verification Pending
2023-08-03 13:27:37 +00:00
Stanislav Erokhin fcd440fd9e KT-59304 Elevate warning to Error for pre-HMPP flags
Flag `kotlin.mpp.deprecatedProperties.nowarn` was removed.
Diagnostic could be temporarily suppressed by the:
kotlin.internal.suppressGradlePluginErrors=PreHMPPFlagsError
2023-08-03 13:27:37 +00:00
Stanislav Erokhin cfcb0690d7 [mpp] Remove usage of deprecated pre-HMPP properties from tests
#KT-59304 In Progress
2023-08-03 13:27:36 +00:00
Stanislav Erokhin a3eb472e5f [mpp] Update the IdeImportPropertiesConsistencyTest
#KT-48554 Fixed
2023-08-03 13:27:36 +00:00
Stanislav Erokhin a58dd84cdc [mpp] Remove the kotlin.native.enableDependencyPropagation property
This property isn't used in IDE import since 222 (KTIJ-21525)
De-facto it was set to false by the code in
hierarchicalStructureMigrationHandling.kt if HMPP is enabled.
And in the future commit we will forbid to disable the HMPP

#KT-48554 In progress
2023-08-03 13:27:36 +00:00
Yahor Berdnikau 020ad64b3c [Gradle] Update documentation for Kotlin tasks
^KT-58858 In Progress
2023-08-03 12:39:51 +00:00
Yahor Berdnikau 365c04a7f7 [Gradle] Update documentation for CompileUsingKotlinDaemon
^KT-58858 In Progress
2023-08-03 12:39:51 +00:00
Yahor Berdnikau 6d36ba04f8 [Gradle] Document IncrementalSyncTask
^KT-58858 In Progress
2023-08-03 12:39:51 +00:00
Yahor Berdnikau f988de60c3 [Gradle] Document KotlinToolTask
^KT-58858 In Progress
2023-08-03 12:39:51 +00:00
Yahor Berdnikau 2e8d2800f5 [Gradle] Document KotlinCompilationTask
Remove KotlinCompilationTask from KotlinCompile class as it anyway comes
via KotlinJvmCompile interface.

^KT-58858 In Progress
2023-08-03 12:39:51 +00:00
Dmitry Savvinov 027fdb86a5 [Gradle] Print diagnostics stacktrace only under --stacktrace or higher
Most of the changes in commit are test-related, as our tests launched
with '-full-stacktrace' by defayult + asserting full stacktrace is
flaky and unreliable

^KT-59774 Fixed
2023-08-03 10:02:25 +00:00
Dmitry Savvinov e334523fd8 [Gradle] Minor: rename verboseDiagnostics -> useParsableDiagnosticsFormat
^KT-59615 Fixed
2023-08-03 10:02:25 +00:00
Alexander.Likhachev 83c53b7ce3 [BT] Implement classpath snapshotting in the Build Tools API
#KT-57565 In Progress
2023-08-03 08:55:32 +00:00
Alexander.Likhachev 442d1cf711 [BT] Move ClassSnapshotGranularity to the Build Tools API package 2023-08-03 08:55:32 +00:00
Alexander Udalov d4b5599373 Add JVM target bytecode version 21
Unfortunately, there are still problems with running JVM backend tests
with JVM target 21 because:

1) The D8 version that we use does not support bytecode version 21, and
   updating to a newer version requires to change JVM target of compiler
   tests to 11. This will be addressed separately when we enable JVM 21
   in tests-different-jdk.
2) Some tests are failing because of KT-60659 and KT-60770:
   - builtinStubMethods/bridgesForStubs/emptyStringListAdd.kt
   - jdk/stream.kt
   - regressions/kt528.kt

 #KT-60662 Fixed
2023-08-03 08:43:22 +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
Sebastian Sellmair b5e80fe060 [Gradle] KotlinMultiplatformSourceSetConventions: Do not configure source sets in 'lazy' context
As source sets are not lazy. This avoids unnecessary exceptions
in user buildscripts.

^KT-60842 Verification Pending
2023-08-02 07:44:19 +00:00
Ilya Goncharov 3450e60a1f [Gradle, Wasm] Fix test data for wasm js test 2023-08-01 19:48:36 +00:00
Alexander.Likhachev 61f404e493 [BT] Implement incremental compilation within the daemon
#KT-57398 In Progress
2023-08-01 16:24:37 +00:00
Alexander.Likhachev b3677fa0ca [IC] Allow to not specify the modules info 2023-08-01 16:24:37 +00:00
Kirill Rakhman 38a54549ff [FIR] Fix serialization of empty varargs in annotations in KLIBs
#KT-59249 Fixed
2023-08-01 15:31:18 +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
Dmitry Savvinov a65953a7fb [Gradle] Minor, rename task
EnsureNoKotlinGradlePluginErrors ->
CheckKotlinGradlePluginConfigurationErrors
2023-08-01 13:03:29 +00:00
Dmitry Savvinov 7cc72f096a [Gradle] Don't use PropertiesProvider.propertiesWithPrefix in checker
It causes weird failures in functional tests, see KT-60712.

Instead, enumerate all known KGP properties and report only them. Note
that internal properties, unknown to the current version of KGP, won't
be reported. Such cases can appear because of a typo or after migrating
to version of KGP that dropped support for that property. It's not
considered to be a problem at the moment
2023-08-01 13:03:29 +00:00
Dmitry Savvinov 34f4e3cbf6 [mpp, tests] Modernize and simplify new-mpp-lib-with-tests
- Don't use presets (they are deprecated and provoke ERROR, causing
  build to fail)
- Drop two JVM targets (cause issues because ambiguous consumable
  configuration will be created; proper setup needs disambiguation
  attribute, but that's too much for this test)
- Drop jvmWithJava-target (this test case is used in several places
  as "just some MPP project", so specific advanced features like
  jvmWithJava shouldn't be covered here)

Refer to KT-60745 for proper jvmWithJava support
2023-08-01 13:03:29 +00:00
Dmitry Savvinov a9a6441d2d [Gradle] Improve tests on diagnostics rendering, suppression, failures 2023-08-01 13:03:29 +00:00
Dmitry Savvinov a132d37292 [Gradle] Introduce checker of 'kotlin.internal' properties
Those properties are meant for internal use and/or "hacking". Using them
by design provokes big non-suppressible warning
2023-08-01 13:03:29 +00:00
Dmitry Savvinov 6c88b92b88 [Gradle] Fail compileKotlin-tasks if ERROR-diagnostics were reported
KT-60237
2023-08-01 13:03:29 +00:00
Dmitry Savvinov c544d68a64 [Gradle] Do not store suppressed diagnostics 2023-08-01 13:03:28 +00:00
Dmitry Savvinov 71c1abde5c [mpp] Minor: use ToolingDiagnostic for reporting cyclic dependsOn-edges 2023-08-01 13:03:28 +00:00
Dmitry Savvinov 7abb0d9f0c [Gradle] Minor: prettify extraction of Tooling diagnostics from output 2023-08-01 13:03:28 +00:00
Artem Kobzar cd840997b1 [K/Wasm] Rework Wasm enumEntriesIntrinsic declaration to fix stdlib compilation 2023-08-01 11:53:14 +00:00
Vyacheslav Gerasimov be1babeae4 Build: Add protoc to implicitDependencies
#KTI-1277
2023-08-01 09:18:34 +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 c136d0fb5b Revert "[Wasm] Use Node.js with "canary" v8 (11.7.310.0) in tests"
This reverts commit 0bdee00ca2.

#KT-60835
2023-08-01 08:46:59 +00:00
Dmitry Savvinov 2ab73f286a [mpp] Add test: pre-hmpp dependencies not reported in test source sets
Test source sets do not participate in the metadata compilations by
default, so the check misses them. This commit just encodes this
behavior into tests, without actually addressing it

KT-60724
2023-07-31 15:36:21 +00:00
Dmitry Savvinov 38cd8ee7e7 [mpp] Don't report kotlin-test as pre-HMPP dependency
- Exclude kotlin-stdlib and kotlin-test from reporting

- kotlin-stdlib wasn't reported, because it doesn't even have Gradle
modular metadata (so no o.j.k.platform.type attribute, and check doesn't
work). This commit explicitly excludes kotlin-stdlib, so that when it
starts publishing Gradle Modular Metadata, nothing would break

- kotlin-test was reported only when it is declared in commonMain,
because we're checking only metadata compilations, and commonTest
isn't compiled to metadata

- Depending on kotlin-test is an odd configuration, but it arises
sometimes (e.g. when people extract some test utilities in a separate
Gradle project)

^KT-58872
2023-07-31 15:36:21 +00:00
Dmitry Savvinov 14b340c61e [mpp, tests] Assert that all dependencies are resolved, fix misconfigurations
- Assert that all dependencies are resolved. Gradle won't fail the build
by default, which might lead to test running in a weird misconfigured
state and producing unreliable results (can be green even though there
are bugs)

- Fix several typos and misconfigurations that were revealed after
adding assertion described above
2023-07-31 15:36:21 +00:00
Timofey Solonin 1832a6d936 [KT-58234][MPP] Demote KotlinCompilation.source deprecation to a warning
^KT-58234
2023-07-31 15:34:29 +00:00
Timofey Solonin 181d6b64a2 [MPP] Add ExperimentalForeignApi to CocoaPods tests
^KT-58362
2023-07-31 15:33:34 +00:00
Yahor Berdnikau 8df905a326 [Gradle] LanguageSettings now is wrapper for related compiler options
'KotlinSourceSet.LanguageSettings' is now acts as a wrapper for the
related Kotlin compilation task 'compilerOptions' object, similar to how
'kotlinOptions' is working now.

Source sets consistency check now will ignore shared source sets with no
linked compilation to avoid users need to configure them as well.

^KT-57292 In Progress
2023-07-31 15:31:56 +00:00
mvicsokolova bed16f92b1 [atomicfu-K/N]: Support Native backend in atomicfu compiler plugin
Atomicfu compiler plugin supported transformations for K/N:
* atomic properties are replaced with volatile properties and all the operations are delegated to native atomic intrinsics
* atomic arrays are replaced with kotlin.concurrent.Atomic*Arrays
* all other features available on JVM are covered as well (custom atomic extensions, delegated properties, debug tracing)

See (KT-58358, https://github.com/Kotlin/kotlinx-atomicfu/issues/261)

Merge-request: KT-MR-11253
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-07-31 14:48:28 +00:00
Stanislav Erokhin 5f07db3c22 Annotate transitiveExport with @ExperimentalKotlinGradlePluginApi
#KT-59196 Verification Pending
2023-07-31 13:54:17 +00:00
Alexander Udalov 9c03dcd230 Do not write version requirements for suspend functions
Previous attempt was at 6807ed6642, but it was reverted in 7771e5914d
(see that commit for the explanation). Now it should be fine to remove
these version requirements.

No issue reported because it's mostly not a user-visible change. The
main effect is that it reduces differences in metadata between K1 and
K2, namely it fixes the ValueClass.kt kotlinp test.
2023-07-31 13:05:29 +00:00
Alexander Udalov afd35accd8 Do not write version requirements for InlineClasses
Language feature InlineClasses is enabled since 1.3. The current lowest
supported language version is 1.4, so any compiler that can read
binaries produced by the current compiler also supports inline classes,
which means that the version requirement is not needed anymore.

No issue reported because it's mostly not a user-visible change. The
main effect is that it reduces differences in metadata between K1 and
K2, because K2 never supported writing this version requirement properly
due to the TODO in `hasInlineClassTypesInSignature`.
2023-07-31 13:05:29 +00:00
Alexander.Likhachev 18aa7f4d4b [BT] Implement non-incremental compilation within the daemon
#KT-57398 In Progress
2023-07-31 10:38:35 +00:00
Stanislav Erokhin b3236c5824 [mpp] Set the minimum supported gradle to 6.8.3 (same as in KGP)
KGP supports only Gradle since 6.8.3, and we run tests on
buildserver only since this version, so we shouldn't try to work if
gradle < 6.8.3.
And in general in MPP plugin we shouldn't support version that is not
supported in KGP

#KT-59278
2023-07-31 08:25:37 +00:00
Dmitrii Krasnov e7c589a573 Added FUS statistics for applied plugins: kotlin-js, cocoapod plugin
#KT-59324 In Progress


Merge-request: KT-MR-11360
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2023-07-31 07:33:17 +00:00
Alexander Udalov 965946d3ef K2: report JVM backend errors in the same way in PSI as LT
Do not try to find PSI element, but always use the IR element offsets
instead. This greatly simplifies test data because we don't need to have
custom PSI- and LT- based diagnostic ranges in every test, and K1/K2
behavior also is mostly the same.

The exact offset ranges are not as important for backend diagnostics, so
it's better to have K2+PSI and K2+LT behaving the same.
2023-07-29 23:06:23 +00:00
Igor Yakovlev f2ea2021d7 [Wasm] Add wasi target attribute 2023-07-28 20:19:55 +02:00