Commit Graph

1791 Commits

Author SHA1 Message Date
Sergey Bogolepov 3d0c9f9edd [Swift export][Tests] Enable K1 version of tests
rrn prefix mostly uses K1, so we need to do so
2024-02-13 10:48:05 +00:00
Sebastian Sellmair ef232ebec7 [ObjCExport] ObjCDependenciesTypesTest.test - arrayList: Remove TodoAnalysisApi
This test is now expected to pass successfully and was
introduced in one MR (muted), but fixed at the same time
in another MR
2024-02-13 10:12:18 +00:00
Artem Olkov 6cd2a5932a Fix generation of KtBridges, now it is using actual C Function Name
Merge-request: KT-MR-14337
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2024-02-13 08:03:33 +00:00
Sebastian Sellmair 7cf6a86083 [ObjCExport] translateToObjCType: Filter konan primitives and include supertypes for mapped types
^KT-65348 Fixed
2024-02-12 16:14:38 +00:00
eugene.levenetc 7628d1a4aa [ObjCExport] Add function with Char return type test
KT-65348
2024-02-12 16:14:38 +00:00
Sebastian Sellmair fd33249c47 [ObjCExport] Add tests for Char type translation
^KT-65348 Fixed
2024-02-12 16:14:38 +00:00
Sebastian Sellmair e53e94516f [ObjCExport] AA: Enable generation of base declarations
^KT-65738 Fixed
2024-02-12 16:13:50 +00:00
eugene.levenetc 0ec9f2a8b9 [ObjCExport] Constructors fixes, cloneables handling, annotations 2024-02-12 13:30:07 +00:00
Sergej Jaskiewicz f26e470e80 [klib] Don't show signature clash diagnostics for local declarations
For some reason type parameters end up in
`GlobdalDeclarationTable`, and thus we tracked them in
`IdSignatureClashDetector`, which wasn't right and confused the
diagnostic renderer that uses
`org.jetbrains.kotlin.resolve.MemberComparator` for sorting the
declarations to display in diagnostics. That comparator doesn't know
jow to work with type parameters.

Besides, type parameters, like many other types of declarations, are not
considered public wrt KLIB ABI, so there's no need to show
CONFLICTING_KLIB_SIGNATURES_ERROR for them.

^KT-65723 Fixed
2024-02-12 11:22:46 +00:00
Pavel Kunyavskiy 831ef0f909 [FakeOverrideBuilder] Fix referencing a local type from a return type
Copying tree part happens in two stages.
1. Collect all symbols to copy and create new version of them
2. Do copy tree, replacing collected symbols

For f/o builder 1-st stage traversed more nodes, than seconds.
This led to unbound symbols in tree.

^KT-65273 Fixed
2024-02-12 08:39:35 +00:00
Vladimir Sukharev ab6c3847bc [K/N][Tests] Add TODO for KT-64879
^KT-64879
2024-02-11 21:30:03 +00:00
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