Commit Graph

103716 Commits

Author SHA1 Message Date
Dmitriy Dolovov 5991364028 [IR][JS] Drop JsIrFileSerializer.skipExpects parameter
^KT-61136
2023-08-14 15:20:28 +00:00
Dmitriy Dolovov b37bb0be16 [IR][Native] Drop KonanIrFileSerializer.expectDescriptorToSymbol parameter
^KT-61136
2023-08-14 15:13:44 +00:00
Dmitriy Dolovov f3c58bcfb3 [IR][Native] Drop KonanIrFileSerializer.skipExpects parameter
^KT-61136
2023-08-14 15:13:44 +00:00
Vladimir Sukharev 5b825282a4 [IR] Render type abbreviations by default, and not render in irText tests
^KT-60248


Merge-request: KT-MR-11510
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-08-14 15:08:45 +00:00
Nikolay Lunyak ef338865c7 [FIR] Ignore inaccessible members in FirImplementationMismatchChecker
^KT-61076 Fixed
2023-08-14 14:55:26 +00:00
Aleksei.Glushko 00d6ced263 [K/N] Add the license file for BoundedQueue.hpp
Merge-request: KT-MR-11619
Merged-by: Alexey Glushko <aleksei.glushko@jetbrains.com>
2023-08-14 14:47:07 +00:00
Leonid Startsev 8b821e1feb Deprecate KmProperty.hasGetter(hasSetter) in favor of KmProperty.getter(setter)
as a follow-up of flag deprecation.

#KT-59440
2023-08-14 12:36:34 +00:00
Nikolay Lunyak 389632ed53 [FIR] Don't forget about annotations when resolving qualifiers 2023-08-14 12:01:53 +00:00
Sebastian Sellmair 1c2eab39d2 [Gradle][Minor]: Update comment on 'shouldUseOldKtorAndCoroutinesExternalDependencies'
KT-60901
2023-08-14 11:28:21 +00:00
Roman Golyshev b52d3c114f KTIJ-26627 [AA] Correctly handle object receivers of property accesses
Also remove redundant code from `canBePossibleToDropReceiver`

^KTIJ-26627 Fixed
2023-08-13 22:20:19 +02:00
Marco Pennekamp 2db8f31966 [AA] Document analyzeInDependedAnalysisSession and related classes 2023-08-13 16:19:54 +00:00
Marco Pennekamp ed13d6b3a4 [AA] Edit documentation of analyze and related classes 2023-08-13 16:19:54 +00:00
Dmitriy Dolovov 7dbfe4bfb1 [IR][tests] Fix MPP IR dump tests to not fail on missing expect declarations
Expect declarations do not survive serialization to KLIB. So they need to be explicitly filtered in order for tests that compare dumped IR before and after serialization to pass successfully.

^KT-61136
2023-08-12 07:03:29 +00:00
Dmitriy Dolovov 6e648ac374 [IR] Drop IR expect/actual table
^KT-61136
2023-08-12 07:03:29 +00:00
Brian Norman e8b4550173 [FIR] Add checker for finite bounds validation
Added a new FIR based checker for both FINITE_BOUNDS_VIOLATION and
FINITE_BOUNDS_VIOLATION_IN_JAVA errors. Implementation copied from the
existing descriptor based checker with some minor changes.

#KT-59378 Fixed
2023-08-11 21:13:58 +00:00
Anton Bannykh 6a886e4c32 [JS] rename IC tests to easier distinguish between the K1/K2 variants 2023-08-11 15:46:51 +00:00
Anton Bannykh 962bfaca9c [JS] Support multimodule IC tests with K2
Includes supporting klib file generation.
2023-08-11 15:46:51 +00:00
Timofey Solonin d25d0e4f94 [MPP] Validate which configurations resolve for explicit stdlib-js dependency
^KT-60901
^KT-61126
2023-08-11 14:52:03 +00:00
Timofey Solonin 78e09816e5 [MPP] Use assemble instead of resolving all configurations
We expect that some configurations might fail to resolve in the case of
stdlib-js dependency if they are resolved explicitly. These configurations
should not actually resolve for the KGP user.

^KT-60901
^KT-61126
2023-08-11 14:52:03 +00:00
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 f06a1c89ef [stdlib-mpp] Publish patched/custom kpsm to list 'commonMain' included into 'nativeApiElements'
Native/Shared Source Sets still requires stdlib:commonMain.klib as
dependency for IDE analysis.

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
Ivan Kylchik 2b5f839fac [IR] Minor: backend refactoring 2023-08-11 12:19:45 +00:00
Ivan Kylchik 55092da03b [PSI2IR] Check that a given function has the right descriptor
The issue was discovered during work on IR serialization and
this is just a safety check.

#KT-56230
2023-08-11 12:19:45 +00:00
Ivan Kylchik 5f2de9dbff [IR] Create primitive iterators in IrBuiltIns
This change is required to fix stdlib compilation with enabled
linking via signature. All primitive iterators are considered to be
builtins and are created during compile time as deserialized
declarations (at least in K1). But if we meet the definition of some
primitive iterator in code, for example, during stdlib compilation,
we will end up with two different descriptors (deserialized and lazy)
that describe the same entity. Because of that we have conflicts in
symbol table:
* For descriptors, we will end up with multiple IR declarations
that describe the same class, but with different descriptors. With
some magic compilation still works.
* For signatures, we will end up with only one IR declaration in the
table, but it will have wrong deserialized (instead of lazy)
descriptor.

In the end, this change allows us to initialize iterators in advance
with correct descriptor.

#KT-56230
2023-08-11 12:19:45 +00:00
Ivan Kylchik 782d5e86f6 [IR] Replace reference* with toIrSymbol in IrBuiltinsOverDescriptors
This change is a minor refactoring that introduces `toIrSymbol`
method for function and property descriptors, like it is done for
class descriptor.
2023-08-11 12:19:45 +00:00
Svyatoslav Scherbina 4da8b0850e Native: make CompareDistributionSignatures task fail on klib tool errors
CompareDistributionSignatures task is used to compare Native platform
libraries contents against a previous version.

Under the hood, it runs the klib tool to get a library contents. But it
didn't check the exit code, so if klib tool failed, the task could
mistakenly indicate that there are no differences in platform libs.

Fix this by checking the klib tool exit code and failing if it is not
zero.
2023-08-11 12:13:21 +00:00
Kirill Rakhman cee355196a [Tests] Fix accidental overload resolution ambiguity in test 2023-08-11 10:54:25 +00:00
Kirill Rakhman bb6d4acfb2 [Analysis API] Fix wrong override with context receiver 2023-08-11 10:54:24 +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
Kirill Rakhman 86ef313233 [FIR] Check context receivers in FirStandardOverrideChecker
#KT-61145 Fixed
2023-08-11 10:54:24 +00:00
Artem Kobzar 4dc0d68288 [K/JS] Fix autoboxing for inlined function ^KT-60785 Fixed 2023-08-11 09:19:51 +00:00
Ilya Gorbunov 7ae443ad7f [stdlib-mpp] Use kotlin-stdlib-common artifact for dist from kotlin-stdlib project 2023-08-11 08:49:23 +00:00
Ilya Gorbunov 3e4cbd6dd2 Publish Gradle metadata for kotlin-stdlib-common, KT-60911
This makes it depend on kotlin-stdlib in all targets
and have no artifacts from Gradle's point of view
2023-08-11 08:49:23 +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
Aleksei.Cherepanov da267ba2c8 Fix JPS import after removing dependency checksums...
...that are no longer resolved due to alignment (ca7e4941)
2023-08-11 07:05:33 +00:00