Commit Graph

1939 Commits

Author SHA1 Message Date
Artem Daugel-Dauge 9e7e44e58f [Native] Add comments for the Xcode 15.3 workaround
^KT-65542
2024-03-11 13:25:40 +00:00
Alexander Shabalin aee87468a6 [K/N][tests] Move stress tests into a separate project 2024-03-07 15:01:30 +00:00
eugene.levenetc 0a7839a29a [ObjCExport] Fix primary constructor parameter annotation translation
KT-66401
2024-03-07 14:21:03 +00:00
Dmitriy Novozhilov 4b5eac7816 [Test] Add regression tests for issues which are fixed in K2
Related issues:
KT-10879, KT-18055, KT-20617, KT-23873
KT-25668, KT-31191, KT-33108, KT-41013
KT-51827, KT-53886, KT-56624, KT-58447
KT-58458, KT-58751, KT-58814, KT-60597
KT-62806, KT-63258, KT-63444, KT-65101
KT-65408, KT-65844, KT-66186

^KT-65926 Fixed
2024-03-07 12:49:47 +00:00
Dmitriy Novozhilov b875ae774e [FIR] Unwrap captured types in target type of SAM conversion
^KT-66256 Fixed
2024-03-07 12:41:05 +00:00
Vladimir Sukharev a9af52c288 [Tests] Add test for KT-44199
^KT-44199 Fixed
2024-03-07 11:36:49 +00:00
eugene.levenetc 16d53a0e34 [ObjCExport] Fix kdoc primary constructor
KT-66387
2024-03-07 10:32:36 +00:00
Sebastian Sellmair 10cf97f05b [ObjCExport] Support exported library modules
This new module gives the ability to resolve symbols
from provided klib KtLibraryModules withing a Analysis Session.

^KT-65327 Fixed
2024-03-07 09:23:37 +00:00
Sebastian Sellmair b5b7e5f262 [aa-klib-reader] Implement 'analysis-api-klib-reader' for swift- and objc export
This new module gives the ability to resolve symbols
from provided klib KtLibraryModules withing a Analysis Session.

^KT-65327 Fixed
2024-03-07 09:23:37 +00:00
Vladimir Sukharev b4bc576d37 [Tests] Add test for kt33411
^KT-33411 Fixed


Merge-request: KT-MR-14782
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2024-03-07 08:46:05 +00:00
Yan Zhulanow 507ab1e619 [Pill] Enable Pill for Swift export modules 2024-03-07 06:25:00 +00:00
Svyatoslav Scherbina b4c2164837 [K/N][tests] Fix kt42208WithPassingLambdaToAnotherFunction.kt for K2
It seems that K2 doesn't support `UnitConversionsOnArbitraryExpressions`
experimental language feature (KT-56011), while the test accidentally
relied on it.

Improve the test code so that it doesn't need this language feature
anymore, and enable the test for K2.

^KT-65553 Fixed
2024-03-06 17:07:27 +00:00
Denis.Zharkov b7129f78a3 K2: Fix IAE at Candidate.updateSourcesOfReceivers inside PCLA lambda
Previously, it was failing at line
(resolvedReceiver?.toReference(session) as? FirNamedReferenceWithCandidate)?.candidate?.updateSourcesOfReceivers()

But this line was mostly incorrect because in case of `a.b()` call,
which is resolved to `a.b.invoke()`, `resolvedReceiver` is pointing to
`a` instead of obviously expected `a.b`.

The fix with using `candidate.callInfo.explicitReceiver` doesn't help
either because the candidate of that receiver is always completed at
that stage (so no Candidate there).

The only case when the candidate was still there is PCLA because
 in that case we explicitly don't fully complete even receiver
expressions.
(see docs/fir/pcla.md)

The idea of the fix is moving the call of `updateSourcesOfReceivers`
for invoke property receiver to the place just before the candidate
is being converted to the resolved reference
(i.e., the candidate is being lost)

^KT-66148 Fixed
2024-03-06 17:01:57 +00:00
Sergej Jaskiewicz 67afd12f94 [test] Remove redundant signature clash diagnotic test from Native tests
Since d8d8f24f62 the tests for this
diagnostic are run with the Compiler Core test infrastructure
(see `compiler/testData/diagnostics/klibSerializationTests`)
There is no need to test it separately in `FirCompilerOutputTest`.

^KT-64393 Fixed
2024-03-06 16:05:40 +00:00
Artem Olkov a26ffe360c KT-65907: add handling for nested classes #KT-65907 fixed 2024-03-06 14:40:17 +00:00
Pavel Punegov 8ef2d49ab0 [K/N][test] Refactor test results handling
Move handling to appropriate TestRunCheck instances to make
them separate from each other. Also this makes it possible to
use separately from the ResultHandler on specific scenarios like
in FrameworkTest.
2024-03-06 13:32:32 +00:00
Pavel Punegov 5ddfd4fd91 [K/N][test] Check test filtering with different run parameters
Adds additional checks when different test filtering is used, like
ignored tests filter.
This makes SharedExecutionBuilder be able to handle tests separately
but run together in the executable.
2024-03-06 13:32:32 +00:00
Pavel Punegov 8907885a75 [K/N][test] Refactor test run checking
Make test filtering matching be a check instead of the verification
code in ResultHandler. This allows turning it on/off for specific
test cases and have different checking strategies.
2024-03-06 13:32:32 +00:00
Mikhail Glukhikh 5ea6f20192 K1/K2: add reproducers for KT-66229, KT-66243 and KT-66272
As all these issues aren't reproducible in K2, we may count them as fixed.
Related to KT-53478
#KT-66229 Fixed
#KT-66243 Fixed
#KT-66272 Fixed
2024-03-06 09:01:38 +00:00
Kirill Rakhman 4c93e9cff6 [FIR] Fix captured type arguments of local class as callable reference LHS
#KT-66267
2024-03-06 08:22:42 +00:00
eugene.levenetc 1f49e01f1a [ObjCExport] Add suspend function and @Throws tests
KT-66115, KT-66239
2024-03-05 22:52:17 +00:00
eugene.levenetc ac1f664a65 [ObjCExport] Add extras to ObjCExportStub for proper @Throws translation
KT-66239
2024-03-05 22:52:17 +00:00
eugene.levenetc 42d8db1c52 [ObjCExport] Fix suspend function and @Throws translations
KT-66115, KT-66239
2024-03-05 22:52:17 +00:00
Alexander Shabalin e8202c3355 [K/N] Simplify dependencies around kotlin-native/ 2024-03-05 21:47:43 +00:00
Alexander Shabalin 24ede14e37 [K/N] Convert :kotlin-native:backend.native buildscript to kts
Use folder structure from the rest of the project and build it by
the bootstrap compiler.
2024-03-05 21:47:43 +00:00
Alexander Shabalin 0542b62430 [K/N] Extract :native:cli-native from kotlin-native/backend.native/cli.bc 2024-03-05 21:47:43 +00:00
Kirill Rakhman 69a7bf7f68 [FIR] Add equality constraint from expected type for some synthetic function calls
This fixes some cases where we infer some type variable inside one
of the branches to Nothing instead of the expected type because Nothing
appeared in some other branch.

Specifically, we add an equality instead of a subtype constraint during
completion of calls to synthetic functions for if/when, try and !!.
We don't do it when the call contains a (possibly nested) elvis or is
inside the RHS of an assignment.
Otherwise, we would prevent some smart-casts.

#KT-65882 Fixed
2024-03-05 17:38:59 +00:00
eugene.levenetc 5c64832c0f [ObjCExport] Fix extensions interface name
KT-66315
2024-03-05 13:38:36 +00:00
Wojciech Litewka eec14f0054 [tree generator] Remove Suppress("unused") from implementation classes
Those only implement base classes, their members are not supposed
to be referenced directly (those sometimes they are).
So unused code in there can be suspicious.

On the other hand, some generated builders are truly unused, so leave
the suppression for them.
2024-03-05 13:06:03 +00:00
anzhela.sukhanova 82255d5ee8 [Test] KT-61360: add tests for the IrFakeOverrideBuilder
Add tests for fake overrides with focus on java interoperability

Co-authored-by: Aleksandra Arsenteva <aleksandra.arsenteva@jetbrains.com>
2024-03-04 16:21:02 +00:00
Pavel Kunyavskiy 8d725753f8 [Fir2IR] Don't build overrides for expect classes.
We don't need them except for checking.
And checking doesn't work in any reasonable way anyway.

^KT-65249 Fixed
2024-03-04 14:12:48 +00:00
Sergey Bogolepov 35579692d9 [Swift export] Move swift-export-standalone tests
Move them under `nativeCompilerTest` for the sake of unification, and
running under proper CI configuration.
2024-03-04 08:57:32 +00:00
Vladimir Sukharev 90aeac945d [K/N][Tests] Support IGNORE_NATIVE and DISABLE_NATIVE in StandardTestCaseGroupProvider
^KT-61259
2024-03-02 08:38:10 +00:00
Pavel Punegov 24c91bbf56 [K/N] XCTest runner test arguments processing
Get test arguments from the process arguments and environment.
There is the following order to get args:
1. Get from the process arguments.
2. If no arguments are specified, try to use process environment.
3. Get the KotlinNativeTestArgs key from the Info.plist.

Part of the ^KT-58928
2024-03-01 18:39:16 +00:00
Vladimir Sukharev b6a6b12f0f [K/N][Tests] Rename compileToExecutable to reflect its one-staged behavior
^KT-66014
2024-03-01 13:53:38 +00:00
Pavel Kunyavskiy 807d352ed4 [Tests] Add test for already fixed KT-60847
^KT-60847 Fixed
2024-03-01 12:51:21 +00:00
Pavel Punegov 3cc117336a [K/N][test] Eager test group creation based on test roots
This commit adds an option to make test grouping eagerly create larger
groups of tests. Each MetaGroup is created based on the test root the
test file is located in. Test compilation tries to compile all
compatible tests in the group into the final binary/executable.

This grouping strategy allows infrastructure to reduce the number of
produced artifacts, and along with running tests from the same binary,
reduce execution time.

This is a part of ^KT-58928 to implement running tests on iOS devices.
2024-03-01 12:15:22 +00:00
Vladimir Sukharev 4d723bfa85 [K/N][Tests] Migrate test kt63243
^KT-61259
2024-03-01 11:38:49 +00:00
Pavel Punegov bc55eccf28 [K/N] Make XCTest runner project configuration cache friendly
Use ValueSource with ExecOperations to obtain developer framework
location where the XCTest.framework is located.
This is necessary for Gradle configuration cache.
2024-03-01 11:33:02 +00:00
Sebastian Sellmair b7de3709e4 [ObjCExport] Document getObjCClassOrProtocolName
^KT-65670 Fixed
2024-03-01 09:45:12 +00:00
Sebastian Sellmair 436e16efd8 [ObjCExport] AA: Support additional module name prefixes
^KT-65670 Fixed
2024-03-01 09:45:12 +00:00
Sebastian Sellmair 7ee2903e15 [ObjCExport] ObjCExportDependenciesHeaderGeneratorTest: Add tests for exported / non exported dependencies
KT-65670
2024-03-01 09:45:12 +00:00
Sebastian Sellmair 64503d9217 [ObjCExport] AA: AnalysisApiHeaderGenerator: Implement support for klib dependencies
KT-65670
2024-03-01 09:45:12 +00:00
Sebastian Sellmair e377a98815 [ObjCExport] Fe10: Implement test with exported and non exported klib dependencies
KT-65670
2024-03-01 09:45:12 +00:00
Sebastian Sellmair b26f9cb274 [ObjCExport] Remove 'Enum.clone' method special case (AA)
This clone method showed up in K1 because of the test setup
being not close enough to production.

KT-65670
2024-03-01 09:45:12 +00:00
Sebastian Sellmair 19698bf6fa [ObjCExport] Minor: Add '--continue' to Readme.md test invocations
KT-65670
2024-03-01 09:45:12 +00:00
Sebastian Sellmair 152aa24c53 [ObjCExport] K1 header generator test setup: Use native compiler/native builtIns and production namer configuration
To keep the tests closer to 'real life'/'production.'

KT-65670
2024-03-01 09:45:12 +00:00
Artem Olkov e16714fcf9 add export from kotlin into swift of class content #KT-65896 fixed
Merge-request: KT-MR-14624
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2024-02-29 18:37:38 +00:00
eugene.levenetc 078f0ff6e1 [ObjCType] Add basic implementation of base method, fix tests
KT-65687
2024-02-29 18:10:04 +00:00
Dmitriy Dolovov 4e5a36de18 [KLIB] Mark DFG serialization code as unused and planned for removal
^KT-66218
2024-02-29 16:44:45 +00:00