10537 Commits

Author SHA1 Message Date
Sebastian Sellmair db1ee743ae [Gradle] Adjust functionalTests for stdlib-jdk7, stdlib-jdk8 constraint to 1.8.0
^KT-60901 Verification Pending
2023-08-11 14:52:03 +00:00
Sebastian Sellmair be867d0f25 [Gradle] Fix testMultiModulesHmppKt48370 missing cinterop opt-in
^KT-60901 Verification Pending
2023-08-11 14:52:03 +00:00
Sebastian Sellmair 65bc494a1a [Gradle] MppSharedNativeCompileIT: Disable K2 test because of 'KT-60943'
^KT-60901 Verification Pending
2023-08-11 14:52:03 +00:00
Sebastian Sellmair 73483b7a77 [Gradle] Update functionalTests to reflect kotlin-stdlib-common pointing to kotlin-stdlib
^KT-60901 Verification Pending
2023-08-11 14:52:03 +00:00
Sebastian Sellmair 59b29dc2b9 [Gradle] Update NativeIrLinkerIssuesIT to reflect changes in stdlib
^KT-60901 Verification Pending
2023-08-11 14:52:03 +00:00
Sebastian Sellmair 65e467dd5b [Gradle] Update NativeExternalDependenciesIT to reflect changes in stdlib
^KT-60901 Verification Pending
2023-08-11 14:52:03 +00:00
Sebastian Sellmair ada446b68f [Gradle] Update HierarchicalMppIT to reflect changes in stdlib
^KT-60901 Verification Pending
2023-08-11 14:52:03 +00:00
Sebastian Sellmair 00362390eb [Gradle] Ensure default stdlib is added to dependsOn source sets
^KT-60901 Verification Pending
2023-08-11 14:52:03 +00:00
Sebastian Sellmair 10f3704b35 [Gradle] Update MppCompositeBuildIT to reflect changes in stdlib
^KT-60901 Verification Pending
2023-08-11 14:52:02 +00:00
Sebastian Sellmair 12c3b981c4 [Gradle] Do not run 'IdeTransformedMetadataDependencyResolver' on 'single kotlin target' Source Sets
This will prevent transformed kotlin-stdlib source sets from
being resolved for leaf (e.g. jvmMain) as well as bamboo (jvmBambooMain)
source sets. For such source sets only the jvm jar shall be attached

^KT-60901 Verification Pending
2023-08-11 14:52:02 +00:00
Sebastian Sellmair 23ddabd5d7 [Gradle] Update WasmDependencyResolutionSmokeTest to reflect changes in stdlib
^KT-60901 Verification Pending
2023-08-11 14:52:02 +00:00
Sebastian Sellmair e9a1025c37 [Gradle][Minor] Update IdeJvmAndAndroidDependencyResolutionTest to newer version of mvikotlin
This is just a maintenance commit

^KT-60901 Verification Pending
2023-08-11 14:52:02 +00:00
Sebastian Sellmair bafb1aac80 [Gradle] Update IdeStdlibResolutionTest to reflect changes in stdlib
^KT-60901 Verification Pending
2023-08-11 14:52:02 +00:00
Sebastian Sellmair fa2b21e71b [Gradle] Update IdeOriginalMetadataDependencyResolverTest: Test with kotlin-test-common instead of stdlib
(because stdlib is now published with new metadata formats)

See: KT-56278
^KT-60901 Verification Pending
2023-08-11 14:52:02 +00:00
Sebastian Sellmair 243707c956 Revert "[stdlib-mpp] Disable/ignore failing tests in Kotlin Dev"
This reverts commit 171d156688.

KT-60901
2023-08-11 14:52:02 +00:00
Kirill Rakhman 724d527fd8 [FIR] Fixes for call conflict resolution
Let ConeCompositeConflictResolver pass the results of the previous
resolver to the next one.
Otherwise, we get false positive conflicts when a set of candidates
can't be fully reduced by one resolver but could be resolved by the
subsequent application of multiple ones.
This change makes ConeCompositeConflictResolver order-dependent and
thus, ConeOverloadConflictResolver must be invoked last, because it
must work on a pre-filtered list.

Also, let ConeEquivalentCallConflictResolver use
FirStandardOverrideChecker instead of compareCallsByUsedArguments
because it's stricter.

This all fixes a false positive overload resolution ambiguity in common
metadata compilation that is caused by stdlib using the new KMP
format.
Now stdlib metadata is in the classpath, and so declarations from the
stdlib are returned from both MetadataSymbolProvider and
KlibBasedSymbolProvider.
This isn't a problem per se because duplicate candidates are filtered
out by ConeEquivalentCallConflictResolver (K1 works analogously), but
in the case of top-level functions with generic receivers like
Collection<T>.toTypedArray, the check failed because of the direct
comparison of receiver types.

#KT-60943 Fixed
2023-08-11 10:54:24 +00:00
Dmitry Savvinov e8289181e6 [mpp] Minor: diagnostic messages clean-up
- Mention link to docs about templates in warning messages
^KT-60491 Fixed

- Make sure that each warning mentions some way to solve the problem
  aside from disabling default template

- Fix small syntactical bug in code sample

- fix incorrect indentation in trimMargin after joinToString

- Use kotl.in in Kotlin12XMppDeprecation
2023-08-11 08:26:14 +00:00
Dmitry Savvinov edbaed0da9 [Gradle] Minor: restore link to page about JVM toolchains in warning text
The link has been accidentally lost during migration of diagnostics to
the new infrastructure
2023-08-11 08:26:14 +00:00
Ilya Gorbunov aaa068596c [Gradle] Disable stdlib-jdk7/8 alignment from 1.9.20
Reason: kotlin-stdlib now publishes Gradle metadata with the required dependency constraints for these artifacts

KT-55297
2023-08-10 10:35:54 +00:00
Dmitrii Krasnov 682cb991b8 Test for PartialLinkageMode resolving fix
#KT-60839 Fixed
2023-08-09 15:13:24 +00:00
Ilya Goncharov 949e4be658 [Gradle, JS] Add test with cross modules with compose dependency 2023-08-09 11:45:58 +00:00
Leonid Startsev f450122d63 Refactor MetadataExtensions.kt to remove extension visitors
This helps to completely get rid of Visitors API during reading and writing
of the JVM metadata.

Note: Klib writers still use .accept and left for future refactorings.

See also #KT-59442
2023-08-09 10:16:27 +00:00
Leonid Startsev b8e4b44b04 Promote DeprecationLevel on Visitors API to ERROR
Rewrite Readers.kt and Writers.kt to avoid using
Visitors API

Align KotlinCommonMetadata/KotlinModuleMetadata API with
KotlinClassMetadata one (it is necessary for restructured reading/writing)

#KT-59442 In Progress
2023-08-09 10:16:27 +00:00
Igor Yakovlev 87ab88957d [Wasm] Fix wasm-target compiler key in gradle plugin 2023-08-08 18:35:31 +00:00
Ilya Goncharov a3aa1f6121 [Gradle, Wasm] Add wasm wasi stdlib by default 2023-08-08 18:35:31 +00:00
Igor Yakovlev 5d7781c40a [Wasm] Update node.js version to 20.2.0 2023-08-08 18:10:20 +02:00
Igor Yakovlev d1c7caf15c [Wasm] Add wasi stdlib target gradle buildscript
KT-56608
2023-08-08 18:10:19 +02:00
Artem Kobzar a29fa428b3 [K/JS] Add warning for ES-modules on the klibgen stage on the uniqueness of the exported names from the module 2023-08-08 15:45:02 +00:00
Kirill Rakhman 8ae751926c [FIR] Let OptIn LV checker only run on last module in HMPP compilation
This fixes an issue where the opt-in annotation is defined in one of the
source sets of the compilation but opt-ins are defined for the whole
compilation which leads to false-positive "Opt-in requirement marker is
unresolved" in (e.g. common) source sets that don't have a dependency on
the module that contains the annotation.

#KT-60755 Fixed
2023-08-08 07:57:56 +00:00
Nataliya.Valtman 2719dd188f Added build metrics for Kotlin/Native tasks
#KT-58315 Fixed

Co-authored-by: Nataliya Valtman <Nataliya.Valtman@jetbrains.com>


Merge-request: KT-MR-11343
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2023-08-08 07:43:18 +00:00
Ivan Kylchik 7cbf3b28ca [K2] Properly serialize annotation that has vararg with single argument
#KT-60163 Fixed
2023-08-08 07:01:48 +00:00
Sebastian Sellmair 8ff2782045 [Gradle] Promote val Project.kotlinToolingVersion
^KT-61034 Verification Pending
2023-08-08 06:50:01 +00:00
Yahor Berdnikau 1b82477ffa [Gradle] Add multiplatform compiler options DSL integration test
^KT-57292 Fixed
2023-08-07 14:09:31 +00:00
Yahor Berdnikau 07593da3f0 [Gradle] Update how JVM toolchain is wired in MPP projects
^KT-57292 In Progress
2023-08-07 14:09:31 +00:00
Yahor Berdnikau bc871c6cfa [Gradle] Add multiplatform extension compiler options DSL
Now the multiplatform extension exposes compiler option DSL for common
compiler arguments. This compiler option synced as a convention for
targets compiler option.

In the case of Kotlin source sets which are not used as defaultSourceSet
 in compilations - extension compiler options are synced as convention
 into those.

^KT-57292 In Progress
2023-08-07 14:09:31 +00:00
Sebastian Sellmair 41e5a31e1b [Gradle] ObservableSet: Only add listeners when a new object is indeed added
^KT-60937 Verification Pending
2023-08-07 13:40:33 +00:00
Sebastian Sellmair d2bd749861 [Gradle] Add integration test for associated 'functionalTest' style sources
Experiments with the DefaultKotlinCompilationAssociator where made
during KT-60937. One experiment broke running functionalTests in
kotlin.git in bootstrap mode. This case was not yet covered by
CI.

^KT-60937 Verification Pending
2023-08-07 13:40:32 +00:00
Sebastian Sellmair 6c6200a9c5 [Gradle][Minor] Deprecate 'KotlinCompilation.associateWith' property...
... in favor of associateCompilations and allAssociateCompilations

^KT-60937 Verification Pending
2023-08-07 13:40:32 +00:00
Sebastian Sellmair 8ce820d944 [Gradle][Minor] KotlinJsIrSourceSetProcessor: Access runtimeDependencyFiles safely
As it might happen, that the configure code could be triggered
too early, capturing the state of 'runtimeDependencyFiles' to early as well.

^KT-60937 Verification Pending
2023-08-07 13:40:32 +00:00
Sebastian Sellmair ba270fc7df [Gradle][Minor] KotlinCompilationAssociator: Use listProperty util function
^KT-60937 Verification Pending
2023-08-07 13:40:32 +00:00
Sebastian Sellmair d978640c42 [Gradle] Remove KotlinOutputDependency
The IdeBinaryDependencyResolver will filter respective
files by using a simpler check: testing if the files
do reside within the build dir of the current project.

^KT-60937 Verification Pending
2023-08-07 13:40:32 +00:00
Sebastian Sellmair d510c93241 [Commonizer] Support generic/simple annotation commonization (to support kotlinx.cinterop.* annotations)
^KT-59302 Verification Pending
2023-08-04 11:29:23 +00:00
Timofey Solonin 65649673a7 [MPP] Only add test framework dependency once per configuration
^KT-56828
2023-08-04 09:50:35 +00:00
Timofey Solonin 256d9da24c [MPP] Emit a warning when kotlin-test testing framework couldn't be inferred
^KT-56828
2023-08-04 09:50:35 +00:00
Sebastian Sellmair 2ab2f408f3 [Gradle] PomDependenciesRewriter: Fix missing 'component' in configuration cache
^KT-60159 Verification Pending
2023-08-04 07:22:20 +00:00
Sebastian Sellmair b9a520b593 [Gradle] createMavenPublications: Defensively defer adding gradleComponents to 'AfterFinaliseCompilations'
... as the code previously states that this code might race
with actually adding variants from configurations

^KT-60159 Verification Pending
2023-08-04 07:22:20 +00:00
Sebastian Sellmair 84eacd5cde [Gradle] KotlinProjectStructureMetadata: Use name from KotlinUsageContext by: 'kotlinVariantNameFromPublishedVariantName'
^KT-60159 Verification Pending
2023-08-04 07:22:20 +00:00
Sebastian Sellmair fd50b80aa1 [Gradle][Minor] Handle 'isSourcesPublishable' more lazily
... as the value is allowed to change until 'finaliseDsl'

^KT-60159 Verification Pending
2023-08-04 07:22:20 +00:00
Sebastian Sellmair 9f2c2b7265 [Gradle] Implement tests for External target publications
^KT-60159 Verification Pending
2023-08-04 07:22:20 +00:00
Sebastian Sellmair 06d5d2522c [Gradle] Multiplatform publishing: Support external targets
...by only requiring InternalKotlinTarget instead of AbstractKotlinTarget

KT-60159
2023-08-04 07:22:20 +00:00