Commit Graph

1830 Commits

Author SHA1 Message Date
Vladimir Sukharev a0ffea48a2 [K/N][Tests] Use runProcess in doFileCheck
^KT-61259
2024-02-11 21:30:03 +00:00
Vladimir Sukharev 7cb372e66f [K/N][Tests] Migrate test signext_zeroext_objc_export.kt
^KT-61259
2024-02-11 21:30:03 +00:00
Vladimir Sukharev 0ba509dcd6 [K/N][Tests] Adjust test signext_zeroext_interop.kt for different cache modes
^KT-61259
2024-02-11 12:44:31 +00:00
Vladimir Sukharev 370f138ad4 [K/N][Tests] Migrate test signext_zeroext_interop.kt
^KT-61259
2024-02-11 12:44:31 +00:00
Sergey Bogolepov 300369000f [KT-65126] Fix visibility of enums according to failing tests 2024-02-10 14:31:42 +00:00
Sergey Bogolepov b5cb1fddff [KT-65126] Initial version of Swift export integration tests
Here we reuse infrastructure from existing ObjC Framework tests.
It is not the prettiest approach, and ideally we would like to use XCTest,
but for now we need to quickly kick-start end-to-end tests.
2024-02-10 13:49:01 +02:00
Sergey Bogolepov 2d01c4ca4c [Native][Tests] Extract more common code
* modulemap files are required for Swift export integration tests
* we are going to reuse legacy test infrastructure for now
2024-02-10 13:49:01 +02:00
Sergey Bogolepov 95429b52f9 [Native][Tests] Generalise SwiftCompilation
We will produce dynamic libraries in case of Swift export tests,
and we don't need some flags there as well.
2024-02-10 13:49:01 +02:00
Artem Olkov b6c805bbb6 Remove KotlinSirOrigin hierarchy in favour of direct AA usage #KT-65335 Fixed
Merge-request: KT-MR-14229
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2024-02-09 18:34:52 +00:00
Sergej Jaskiewicz 03ca64c954 [klib] Make CONFLICTING_KLIB_SIGNATURES_DATA diagnostic more precise
Show what kind of declarations exactly are clashing: functions,
properties, or fields.

This is so that diagnostics about clashing properties and fields are
distinguishable from one another, since properties and fields
are rendered the same way in those diagnostics:
2024-02-09 16:45:34 +00:00
Sergej Jaskiewicz d80a67652f [klib] Fix NIE when showing signature clash diagnostics on properties
The issue was that when rendering declarations in
the `CONFLICTING_KLIB_SIGNATURES_DATA` diagnostics, we sort them using
`MemberComparator`. That comparator falls back to comparing
declarations' renders if all previous checks were unsuccessful
(and in case of almost identical properties they are). The renderer that
the comparator uses also renders the properties' backing field
annotations, for which it calls `PropertyDescriptor#getBackingField`.
That method wasn't implemented in IR-based descriptors.

This is fixed by returning an instance of the new
`IrBasedBackingFieldDescriptor` class from that method.

^KT-65551 Fixed
2024-02-09 16:45:34 +00:00
Pavel Punegov fb3bd1c3ef [K/N][test] Synchronized simulator device check
Test infrastructure runs tests in parallel for the same target executor.
Device descriptor should be synchronously checked and set.
Also fix the Xcode version comparison.


Merge-request: KT-MR-14256
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2024-02-09 11:07:25 +00:00
Sergey Bogolepov 22a6ffab6f [Swift export][KT-65672] Update SwiftTypeCheckBaseTest 2024-02-09 10:15:50 +00:00
Sergey Bogolepov 6ecc612363 [Swift export][KT-65672] Fix test data to include imports 2024-02-09 10:15:50 +00:00
Sergey Bogolepov 996f47502c [Swift export][KT-65672] Print import declarations 2024-02-09 10:15:50 +00:00
Sergey Bogolepov 168e4414a1 [Swift export][KT-65672] Import bridges module in the generated one 2024-02-09 10:15:50 +00:00
Sergey Bogolepov 10e4d34868 [Swift export][KT-65672] Add SIR node for import declaration 2024-02-09 10:15:50 +00:00
Sergey Bogolepov f5b273a6d9 [Swift export][KT-65672] Update SwiftExportRunner
1. Add a trivial logger interface as a way to communicate with environment
2. Add a settings key for bridge module name.
2024-02-09 10:15:50 +00:00
Sebastian Sellmair 4b6624c920 [ObjCExport] Support naming of nested classes
^KT-65204 Fixed
2024-02-09 08:48:16 +00:00
Evgeniy.Zhelenskiy 7eab4b672d [K1, K2, CLI] Mark whole position range of compiler diagnostics in CLI
#KT-64989
2024-02-08 12:59:31 +00:00
Sebastian Sellmair 5b11308d1b [ObjCExport] Translate superClass and superClass generics for class and objects
^KT-65384 Verification Pending
2024-02-08 12:43:48 +00:00
Sebastian Sellmair c22149c642 [ObjCExport] Properly detect Array constructors
^KT-65225 Fixed
2024-02-08 12:41:37 +00:00
Pavel Kunyavskiy 0a07f16896 [Commonizer] Better handling of ObjcMethod and related annotations
They are important for overridability rules, so can't be just ignored.
Some arguments are still different on different platforms, so
commonized version is a bit strange.

But the only important part is selector, which should be same on
all platforms.

^KT-57588
2024-02-08 09:46:35 +00:00
Artem Olkov ffed0ecf1f add check for SwiftExport golden-data by running swift compiler #KT-65559 fixed
Merge-request: KT-MR-14210
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2024-02-08 09:40:52 +00:00
Brian Norman c8e77aad91 [FIR] Fix CFG/DFA for delegate properties within PCLA
^KT-65262 Fixed
2024-02-07 22:34:12 +00:00
Alexander Shabalin dd9f702516 [K/N][tests] Make InfrastructureDumpedTestListingTest run on other targets 2024-02-07 22:06:25 +00:00
Alexander Shabalin f0c9033205 [K/N][tests] Extract Settings.executor 2024-02-07 22:06:25 +00:00
Alexander Shabalin 5bd78e1bf2 [K/N][tests] Merge LocalResultHandler and ResultHandler 2024-02-07 22:06:25 +00:00
Alexander Shabalin 8d696dae03 [K/N][tests] Remove now unused LocalTestNameExtractor 2024-02-07 22:06:25 +00:00
Alexander Shabalin 234eb29bab [K/N][tests] Use runProcess in InfrastructureDumpedTestListingTest 2024-02-07 22:06:25 +00:00
eugene.levenetc 797284dada [ObjCExport] Implement initial processing queue (stable order, dependencies, forward declarations)
This commit will introduce the first processing queue
which will take care of properly ordering the 'to translate' symbols
as well as taking care of 'dependency' symbols (aka symbols
mentioned in signatures or as supertypes).

- There are several changes like properly translating
types as ObjCProtocolType instead of ObjCClassType (if origin was an interface)
- Type translation of generics defined on interfaces will also emit id type.
- Add initial nested classes collection to the queue
- Add extension function test, add tickets references

^KT-65237 Verification Pending
^KT-65329 Verification Pending
2024-02-07 20:29:08 +00:00
Sebastian Sellmair 32da1b70f5 [ObjCExport] Implement initial sorting and ordering for ObjC translation
^KT-65237
2024-02-07 20:29:08 +00:00
Vladimir Sukharev 112473f310 [Tests] Add test for KT-65197
^KT-65197
2024-02-07 09:03:49 +00:00
Gleb Lukianets f262247b2b [Swift Export] KT-65008: support simple top-level properties
Merge-request: KT-MR-14131
Merged-by: Gleb Lukianets <Gleb.Lukianets@jetbrains.com>
2024-02-05 16:29:37 +00:00
Vladimir Sukharev 72d92cd9b2 [K/N][Tests] Don't make per-file-cache from given dependencies
^KT-61259
2024-02-05 16:06:34 +00:00
Vladimir Sukharev e20b91ab30 [K/N][Tests] Fix FreeArgs
^KT-61259
2024-02-05 16:06:34 +00:00
Vladimir Sukharev e4d36d3840 [K/N][Tests] Fix wrong root cache path
^KT-61259
2024-02-05 16:06:34 +00:00
Vladimir Sukharev 95b1fba37f [K/N][Tests] Clean up framework testing code
^KT-61259
2024-02-05 16:06:34 +00:00
Vladimir Sukharev c72443e4be [K/N][Tests] Move "-Xcache-directory" flag generation to BasicCompilation
^KT-61259
2024-02-05 16:06:34 +00:00
Vladimir Sukharev 8ce8441409 [K/N][Tests] Split away cache-dependent part of "multiple" test
^KT-61259
2024-02-05 16:06:34 +00:00
Vladimir Sukharev fc6fc8d122 [K/N][Tests] Check lazy headers in K1's ObjCExportTest
^KT-61259
2024-02-05 16:06:34 +00:00
Vladimir Sukharev 025771460c [K/N][Tests] Migrate framework and objcexport tests
^KT-61259
2024-02-05 16:06:34 +00:00
Vladimir Sukharev f00a145dd7 [K/N] Don't cut cinterop exceptions from TC logs. 2024-02-05 15:47:01 +00:00
Pavel Kunyavskiy caa6918031 [FIR2IR] Fix handling private setters in anonymous classes
^KT-65290 Fixed
2024-02-02 16:07:35 +00:00
Denis.Zharkov 66d8f471d9 K2: Fix internal error in FIR2IR caused by PCLA + String interpolation
There's an implicit contract in PCLA that the statement-level call
should be postponed iff it has something to be postponed inside.

And that contract didn't work well for string interpolation containing
some postponed calls.

Thus, we haven't run a completion results writing for them properly,
thus leaving type parameters (K from synthetic call) for expression
types instead of an inferred substituted type.

In this commit, the contract was reversed to explicitly enumerate
the cases when it's safe to resolve the candidate outside PCLA session.

See the comments at `mightBeAnalyzedAndCompletedIndependently`.

^KT-65341 Fixed
2024-02-02 15:40:47 +00:00
Denis.Zharkov 3ba8256b8d Add IR text tests fixating the state of KT-65341 2024-02-02 15:40:46 +00:00
Anastasia.Nekrasova 434470a4f5 [K/N][K2]: K2 behavioral difference with inconsistent inheritance of ObjCName
The problem arises when retrieveDirectOverriddenOf returns a
substitution override member. For such members, it is impossible to get
the first base member. For a correct result, it is required to find
originalForSubstitutionOverride for all substitutionOverrides.

#KT-64276 Fixed
2024-02-02 13:54:45 +00:00
Alexander Shabalin 5525a6829a [ObjCExport][tests] Ignore AA test failures both locally and on CI
To run AA tests normally, use kif.loca gradle property.


Merge-request: KT-MR-14129
Merged-by: Alexander Shabalin <alexander.shabalin@ashabalin.me>
2024-02-02 13:43:30 +00:00
Alexander Udalov d450e3074b IR: do not build fake overrides for static members of interfaces
Split members into static/non-static, and only build fake overrides for
inherited static members of classes.

 #KT-65276 Fixed
 #KT-65277 Fixed
2024-02-01 23:25:50 +00:00
Alexander Shabalin 0a4262d3ff [K/N][tests] Nonfatal timeout on draining streams on Windows ^KT-65113 2024-02-01 10:59:04 +00:00