Commit Graph

109497 Commits

Author SHA1 Message Date
Ilya Gorbunov 35bca103eb [stdlib-mpp] Single dependency on stdlib in commonMain
In this project it's required to declare stdlib dependency explicitly,
but now it can be a single line in commonMain
2024-03-04 11:40:06 +00:00
Ilya Gorbunov 16e61f978c [stdlib-mpp] remove some kotlin-stdlib-common artifact deps 2024-03-04 11:40:06 +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
Nikita Klimenko 42cc181fa0 [FIR Plugin prototype] Implement DataFrame-like extension
Proof of concept that FirFunctionCallRefinementExtension (new) and
existing extension points can be used together to update the return type
of the specific calls and generate members based on call arguments.

Important implementation details:
- FirDeclarationGenerationExtension must be used to generate members of
generated local classes.
- FirExtensionSessionComponent together with firCachesFactory to pass
information between `intercept` and `transform`

Actual plugin is developed as a part of Kotlin dataframe repository

KT-65859
2024-03-04 06:33:24 +00:00
Nikita Klimenko c49edfef04 [FIR] Extension point for function calls
This extension point allows changing the return type of call
 from a declared type to its subtype.
With an idea that such a plugin needs the ability to
control available (extension) properties for this type.
A set of properties should be decided based on the resolved function,
provided arguments, types, and resolved lambdas.
It is not a goal to enable plugins to affect resolution in any way.
Types are not intended to have any structured capabilities

In other words.
The goal was to come up with a way to enable a limited form
of an "extensible records" mechanism through plugins.
- It should give enough value for a practical use.
(more info in the ticket).
- It should have minimal effect on the compilation process
This appears to be an extension point that solves this problem.

^KT-65859 Fixed
2024-03-04 06:33:24 +00:00
Dmitrii Gridin 4d04546652 [FIR] FirPlatformDeclarationFilter: add missed lazy resolve call
`isFunctionAvailable` can be called from `PlatformDependentFilteringScope`
on unresolved declarations during `STATUS` phase

^KT-66268 Fixed
2024-03-03 22:00:06 +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
Dmitrii Gridin f844b87f75 [LL FIR] FirElementBuilder: do nothing for KtAnnotation
We shouldn't try to find FIR for such elements as they just don't
exist in FIR

^KT-65780
2024-03-01 19:19:00 +00:00
Dmitrii Gridin 62ec189924 [LL FIR] add getOrBuildFir for KtAnnotation
^KT-65780
2024-03-01 19:19:00 +00:00
Dmitrii Gridin 16878ca20d [LL FIR] FirElementBuilder: support KtAnnotation in file annotations
^KT-65780
2024-03-01 19:19:00 +00:00
Dmitrii Gridin ba92fc97f9 [LL FIR] add test on annotation with [] syntax
^KT-65780
2024-03-01 19:19:00 +00:00
Dmitrii Gridin 17c128adf2 [FIR] get rid of FirFileAnnotationsContainer
This element has been introduced to simplify resolution logic in LL FIR,
but now this element is redundant and only complicates the code as after
KT-56683 `FirFile` has real phases

^KT-65876 Fixed
2024-03-01 19:19:00 +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
Dmitrii Gridin 42a982b400 [LL FIR] move Lincheck tests out of Low Level API FIR Tests
They take too much time and block other tests
2024-03-01 17:29:07 +00:00
Mikhail Glukhikh 75ecba5a4a Tests/PCLA: extend the test for KT-55168
#KT-55168 As Designed
2024-03-01 17:02:49 +00:00
Alexander Udalov fc9aacfde3 Minor, add test for issue fixed by IrFakeOverrideBuilder
Fixed by f98a22e8e4 (KT-61514).

 #KT-66000 Fixed
2024-03-01 14:19:27 +00:00
Kirill Rakhman bb6091cc90 [Tests] Add regression test for #KT-66158 2024-03-01 14:08:39 +00:00
Kirill Rakhman 5bca945d05 [FIR] Fix nullability of types produced by ConeRawScopeSubstitutor
#KT-66067 Fixed
2024-03-01 14:08:39 +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
Artem Kobzar 35acade031 [K/JS] Fix problem with saving of parameter's default values after overriding ^KT-63907 Fixed 2024-03-01 13:20:33 +00:00
Pavel Kunyavskiy 807d352ed4 [Tests] Add test for already fixed KT-60847
^KT-60847 Fixed
2024-03-01 12:51:21 +00:00
Dmitriy Novozhilov 80f4994122 [Build] Exclude :native:objcexport-header-generator from JPS build 2024-03-01 12:18:11 +00:00
Dmitriy Novozhilov 80020a469e [Build] Exclude :kotlin-power-assert from JPS build 2024-03-01 12:18:11 +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
Dmitrii Krasnov 808d4353e5 [Gradle] Fixed race condition during k/n bundle downloading
Extended lock bounds.
Moved removing an old bundle back to configuration phase.

^KT-65985 Fixed
2024-03-01 10:34:26 +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 Kobzar ee2aa6d67f [K/JS] Fix interfaces inside TypeScript definitions if they have only an external interface parent ^KT-64708 Fixed
Merge-request: KT-MR-14665
Merged-by: Artem Kobzar <Artem.Kobzar@jetbrains.com>
2024-03-01 09:37:00 +00:00
Timofey Solonin 610b9eae91 Generate test project with proper path on Windows
^KT-65540
2024-03-01 09:13:34 +00:00
Brian Norman 75c6d06077 [FIR] Collect local properties for CFG analysis with a FIR visitor
When collecting local properties for property initialization analysis,
the nodes of the CFG were navigated. However, there are problems when
trying to determine what local properties are defined within do-while
loops. This is because the node order of a CFG does not always follow
the FIR structure order.

By converting the collector to a FIR visitor, we can maintain the
structural order needed for finding properties defined within do-while
loops. This does require some additional logic though to make sure we
do not navigate into elements which are not part of the original graph
navigation.

^KT-65911 Fixed
2024-03-01 07:12:56 +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
Artem Kobzar 1c2570ed7e [K/JS] Fix Companion object overriding problem inside TypeScript Definitions ^JBAI-680 Fixed 2024-02-29 17:48:24 +00:00
Marco Pennekamp f1ed07d3bb [LL] Register default components for binary library sessions
- This was missed during the refactoring made by 46d5d512, which removed
  `registerDefaultComponents` calls from platform-specific session
  factories (including binary library session creation).
- Unfortunately, this doesn't fix KT-65563, which has also appeared
  recently and I thought might be related.

^KT-66173 fixed
2024-02-29 17:27:12 +00:00
Andrey Yastrebov 45d544c139 KT-66236 Dowgrade iOS deployment target for SwiftExportXCIT 2024-02-29 17:06:11 +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
Dmitriy Dolovov d8d8f24f62 [Test] Add Native backend tests to check conflicting signatures
^KT-64393
2024-02-29 16:44:45 +00:00
Dmitriy Dolovov b0dc5b8a93 [Test] Support running Fir/Native diagnostic tests with backend
^KT-64393
2024-02-29 16:44:45 +00:00
Dmitriy Dolovov b3efc05728 [Test] Rename JsBackendDiagnosticsHandler -> KlibBackendDiagnosticsHandler
^KT-64393
2024-02-29 16:44:45 +00:00
Dmitriy Dolovov a4f2a4438b [Test] Move JsBackendDiagnosticsHandler to common test infra
^KT-64393
2024-02-29 16:44:45 +00:00
Dmitriy Dolovov d40f88337a [Test] Report all KLIB resolve warnings as errors 2024-02-29 16:44:45 +00:00
Dmitriy Dolovov 05628660ba [Test] Implement classic & Fir Native KLIB facades for test infra
With these test facades it would be possible to serialize Native
test modules to KLIBs.

^KT-65117
2024-02-29 16:44:45 +00:00