Commit Graph

1013 Commits

Author SHA1 Message Date
Mark Mann 00ef313df2 [K/N] Add binary option to produce error on mangled objc names (#5264)
objcExportErrorOnNameCollisions=true binary option makes the compiler
emit an error whenever it mangles a name emitted by ObjCExport.

^KT-65863 Fixed
2024-02-16 18:17:30 +00:00
Dmitriy Novozhilov acf2296590 [Test] Regenerate tests after two previous commits 2024-02-16 12:48:24 +00:00
Pavel Punegov 42cba927e6 [K/N][test] Infra: implement race-free way to separate test cases
With shared test running test cases that may fail or timeout should
be excluded from shared run and executed separately.
This is done by getting all test cases for the current executable and
putting them to the map that is checked for all TestRuns
2024-02-15 18:07:25 +00:00
Pavel Punegov 07422d4feb [K/N][test] Implement shared test execution of TestCases
Added the ability to execute multiple tests once and share the results.
With Test runner turned on tests are being compiled into the single
executable. Then they executed each one separately using --ktest_*
options. This commit makes test run executable once and the result goes
to the result handler.
2024-02-15 18:07:25 +00:00
Dmitriy Dolovov ab814e1600 [KLIB tool] Update Kotlin/Native C-interop tests
^KT-62340
2024-02-15 15:38:27 +00:00
Dmitriy Dolovov 07767f88e2 [KLIB tool] Update KLIB metadata dump tests
^KT-62340
2024-02-15 15:38:27 +00:00
Dmitriy Novozhilov 84f0f6e099 [FIR] Resolve statuses of supertypes for all non-source classes
Previously we forced computation only for java and precompiled classes,
  assuming, that binary class can not extend source class, but it's not
  true in two cases:
1. Classpath substitution: class with same name declared in library and
   the source (more rare case)
2. Metadata compilation: depends-on dependcies are passed in binary
   format, so `expect class` may be a binary one and corresponding
   `actual class` may be a source. So if some class in `common` module
   extend this expect class, actual class will be substituted instead of it

^KT-65669 Fixed
2024-02-15 12:18:48 +00:00
Dmitriy Dolovov 9219a8f485 [FIR] Expand type of vararg parameter before constructing array type
This helps to have a primitive array instead of an array of primitives
as the type of vararg value parameter. Also, this prevents
ABI-incompatibility with the libraries (KLIBs) compiled with K1.

^KT-65588
2024-02-15 11:55:32 +00:00
Vladimir Sukharev 20f6b0cb0c [K/N][Tests] Migrate test ir_providers_mismatch
^KT-61259
2024-02-15 10:13:56 +00:00
Kirill Rakhman 802366064d [FIR] Expand annotation types in annotation serialization
#KT-65659 Fixed
2024-02-15 08:27:44 +00:00
Vladimir Sukharev 243d6aed50 [K/N][Tests] Add test for KT-65659
^KT-65659
2024-02-15 08:27:44 +00:00
Vladimir Sukharev bf0150108d [K/N][Tests] Move filecheck and cinterop tests to /native/
^KT-61259
2024-02-14 23:36:34 +00:00
Alexander Shabalin 72e30a3d26 [K/N][tests] :native:native.tests:test requires platform libs 2024-02-14 20:25:43 +00:00
Vladimir Sukharev fbe8db4b45 [K/N][Tests] Migrate test override_konan_properties0 and add testDriverVersion
^KT-61259
2024-02-14 12:16:23 +00:00
Vladimir Sukharev 9ef051dbc5 [K/N][Tests] Migrate test override_konan_properties0
^KT-61259
2024-02-14 12:16:22 +00:00
Vladimir Sukharev d8a90f55a8 [K/N][Tests] Migrate driver test llvm_variant_dev
^KT-61259
2024-02-14 12:16:22 +00:00
Vladimir Sukharev 3ad8fed5a3 [K/N][Tests] Migrate test embedStaticLibraries.kt
^KT-61259
2024-02-14 11:56:59 +00:00
Pavel Kunyavskiy 6e8a7d4662 [ObjCInterop] Implement @ObjCSignatureOverride
This annotation leads to conflicting overloads error supression,
in case where several function with the same argument types,
but different argument names are inherited from ObjC class.

We need to implement it in both K1 and K2 to make the IDE experience
better.
But the annotation itself wouldn't be available in K1.

    ^KT-61323
2024-02-14 11:44:01 +00:00
Artem Olkov 16b985b36e Support for Unsigned Types in swift export #KT-65668 fixed
Merge-request: KT-MR-14300
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2024-02-14 11:10:51 +00:00
Kirill Rakhman 931480b12d [FIR2IR] Fix nullability of converted raw types
#KT-65298 Fixed
2024-02-14 09:55:24 +00:00
Vladimir Sukharev 3b4ca56f74 [K/N][Tests] Migrate test platform_zlib.kt
^KT-61259
2024-02-14 09:55:06 +00:00
Vladimir Sukharev 06a89a0061 [K/N][Tests] Migrate test withSpaces.kt
^KT-61259
2024-02-13 22:14:30 +00:00
Vladimir Sukharev 2bb9b936ac [K/N][Tests] Small cleanup 2024-02-13 22:14:30 +00:00
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
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 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
Sergey Bogolepov 22a6ffab6f [Swift export][KT-65672] Update SwiftTypeCheckBaseTest 2024-02-09 10:15:50 +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
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
Vladimir Sukharev 112473f310 [Tests] Add test for KT-65197
^KT-65197
2024-02-07 09:03:49 +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