Commit Graph
13537 Commits
Author SHA1 Message Date
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
Sebastian Sellmair db5655d6ce [Gradle] Implement InternalKotlinTargetPreset
^KT-59321 In Progress
2023-07-28 17:53:45 +00:00
Timofey Solonin 969deb639c [MPP] Deprecate preset APIs
^KT-59321
2023-07-28 17:53:45 +00:00
Timofey Solonin a580d4e5aa [MPP] Validate fromPreset API changes 2023-07-28 17:53:45 +00:00
Timofey Solonin 0ad8407b57 [MPP] Add TargetPreset APIs deprecation tests
^KT-59321
2023-07-28 17:53:45 +00:00
Zalim Bashorov 0bdee00ca2 [Wasm] Use Node.js with "canary" v8 (11.7.310.0) in tests
There are no other non-canary Node.js versions using fresh enough v8.
2023-07-28 16:16:34 +00:00
Zalim Bashorov cead5c8aae [Wasm] Update Binaryen to 114
This version supports new br_on_cast* instructions.

Also, stop passing to binaryen no longer supported option.
2023-07-28 16:16:34 +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
Sebastian Sellmair 8aee8ad3c4 [Gradle] KpmLocalModuleIdentifier: Migrate to 'BuildIdentifier.getBuildPath'
^KT-58157 Verification Pending
2023-07-28 15:55:52 +00:00
Sebastian Sellmair d7d6d7ebca [Gradle] Implement MppCompositeBuildIT to check shape of project coordinates across different versions of Gradle
^KT-58157 Verification Pending
2023-07-28 15:55:52 +00:00
Sebastian Sellmair 749f13ca09 [Gradle] Implement CurrentBuildIdentifier to replace 'BuildIdentifier.isCurrentBuild()' usages
^KT-58157 Verification Pending
2023-07-28 15:55:52 +00:00
Sebastian Sellmair e9e0a4741c [Gradle] Implement 'BuildIdentifier.isCurrentBuildCompat'
^KT-58157 In Progress
2023-07-28 15:55:51 +00:00
Sebastian Sellmair 33a61c62ba [Gradle] IdeaKotlinProjectArtifactDependencyMatcher: Migrate to 'BuildIdentifier.getBuildPath'
^KT-58157 In Progress
2023-07-28 15:55:51 +00:00
Sebastian Sellmair fc359acb37 [Gradle] MetadataDependencyTransformationTask: Migrate to 'BuildIdentifier.getBuildPath'
^KT-58157 In Progress
2023-07-28 15:55:51 +00:00
Sebastian Sellmair 71e779375f [Gradle] IdeKotlinSourceDependencyMatcher: Migrate to 'BuildIdentifier.getBuildPath'
^KT-58157 In Progress
2023-07-28 15:55:51 +00:00
Sebastian Sellmair 9913ea2e20 [Gradle] KotlinProjectStructureMetadata: Migrate to 'BuildIdentifier.getBuildPath'
^KT-58157 In Progress
2023-07-28 15:55:51 +00:00
Sebastian Sellmair e07ae23df9 [Gradle] Multiplatform import: Migrate to 'BuildIdentifier.getBuildPath'
^KT-58157 In Progress
2023-07-28 15:55:51 +00:00