Commit Graph

109469 Commits

Author SHA1 Message Date
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
Sergey Bogolepov 9a2d748817 Bump Kotlin/Native version in KGP to 2.0.0-dev-17343 2024-02-29 16:16:49 +00:00
Wojciech Litewka 105ffb15a5 [FIR generator] Remove FirField
To simplify tree generator for further development and align it
with IR and SIR generators.
2024-02-29 15:48:58 +00:00
Brian Norman de775c62c8 [PowerAssert] Update CODEOWNERS for Power-Assert compiler plugin 2024-02-29 15:10:09 +00:00
Brian Norman 721d02f4f3 [PowerAssert] Find the earliest starting offset for receiver expression
Calls of infix functions have a start offset which doesn't include the
receiver. Property accessors have a start offset at the start of the
property name and do not include their receiver expression. This
combination can cause problems when the entire expression needs to be
displayed, including the entirety of a complex receiver. Make sure to
navigate expressions to find their earliest starting offset and use that
instead.

^KT-65810 Fixed
2024-02-29 15:10:09 +00:00
Brian Norman d53d5dddc5 [PowerAssert] Add tests to recreate KT-65810 2024-02-29 15:10:09 +00:00
Brian Norman 78bb0be7aa [FIR2IR] Propagate NOT_IN statement origin when converting to IR
^KT-65636 Fixed
2024-02-29 15:10:09 +00:00
Brian Norman 6d634ac87f [PowerAssert] Mark project tests as using JUnit 5 2024-02-29 15:10:09 +00:00
Brian Norman f0268721c1 [PowerAssert] Use OS path separator to parse JUnit5 classpath property 2024-02-29 15:10:09 +00:00
Brian Norman 184d773cd0 [PowerAssert] Add power-assert test data to helper plugin configuration 2024-02-29 15:10:09 +00:00
Brian Norman 027474cfb8 [PowerAssert] Correctly align infix calls with string const receivers
^KT-65640 Fixed
2024-02-29 15:10:09 +00:00
Artem Kobzar 2e4d02e9f4 [PSI2IR, K/Wasm] Sync start and end offsets on PSI and FIR for primary constructors 2024-02-29 14:42:33 +00:00
eugene.levenetc 87e162e052 [ObjCExport] Add nullable dependency parameter failing test
KT-66068
2024-02-29 13:49:44 +00:00
eugene.levenetc 468efc77dd [ObjCExport] Add failing member function signature order test
KT-66066
2024-02-29 13:49:44 +00:00
Artem Olkov e6705e9db2 add distinction between functions and methods in SIR #KT-65046 fixed
Merge-request: KT-MR-14667
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2024-02-29 12:52:10 +00:00
Pavel Mikhailovskii 12552e4e04 [KAPT] KT-44706 Support @JvmRecord-annotated classes
Don't parse Java stubs in tests if no validation is needed

Merge-request: KT-MR-14308
Merged-by: Pavel Mikhailovskii <Pavel.Mikhailovskii@jetbrains.com>
2024-02-29 12:44:56 +00:00
Ilya Chernikov 6288bdbd3f K2 scripting, IDE: add missing extension registration
The commit "K2 scripting: treat default import similarly to K1"
introduced the new extension that provides default imports for scripts,
instead of the previous approach of explicit `FirImport` elements
creation. But registering it for the IDE case was forgotten. This
commit adds missing registration.

#KTIJ-28960 fixed
2024-02-29 12:35:18 +00:00
Artem Olkov ac403a466e add support for classes with packages #KT-65909 fixed
Merge-request: KT-MR-14623
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2024-02-29 12:04:23 +00:00
Wojciech Litewka 4d2aadb925 [IR] Remove old @IDEAPluginsCompatibilityAPI constructor 2024-02-29 11:22:57 +00:00
Alexander Udalov 939a74add3 CLI: improve error message for -Xjdk-release=1.6/1.7
#KT-66174 Fixed
2024-02-29 11:05:20 +00:00
Alexander Udalov 5f261d3ad0 CLI: fix "unknown JVM target version" error message
Do not list 1.6 as supported because it was removed in KT-45165.

 #KT-66175 Fixed
2024-02-29 11:05:20 +00:00
eugene.levenetc e65caee26b [ObjCType] Add vararg translation
KT-66056
2024-02-29 10:24:40 +00:00
Alexander Udalov dfd9aabf8e JVM: update test data after enabling IR fake override builder
#KT-61514 Fixed
2024-02-29 10:14:31 +00:00
Alexander Udalov f98a22e8e4 Fir2Ir: enable IR-based fake override builder
Invert the logic of IR/FIR2IR-based generators: change the CLI argument
to -Xuse-fir-fake-override-builder, test directive to
USE_FIR_BASED_FAKE_OVERRIDE_GENERATOR, etc.

The changes in test data caused by using IR fake override builder by
default are in the subsequent commit.

 #KT-61514
2024-02-29 10:14:31 +00:00
Mikhail Glukhikh 09db7dbd22 K2: add tests to confirm current behavior of KT-65679 examples 2024-02-29 10:02:06 +00:00
Artem Kobzar 4f4c98ec73 [K/JS] Allow parameter properties inside external declarations ^KT-65965 Fixed 2024-02-29 09:46:59 +00:00
Kirill Rakhman 5e83350576 [Infrastructure] Assert dumps don't exist without directive
#KT-58697 Fixed
2024-02-29 08:36:16 +00:00
Andrey Yastrebov 42f6eb4eb4 KT-66156 add KotlinRuntime to Swift Export Synthetic 2024-02-29 08:11:29 +00:00
Jaebaek Seo a17ad6bc55 Fix K2 CodeGen annotation parameter resolution failure
When we have parameters of annotation like
```
// FILE: Anno.kt
package p3

@Target(AnnotationTarget.FUNCTION)
annotation class Anno(vararg val x: String)

// FILE: main.kt
import p3.Anno

@Anno("A", "B")
fun foo(): Int = 10
```
the K2 CodeGen causes an exception reporting the unresolved type
reference. A lazy resolution call fixes the issue.

In addition, FIR for the value parameter to IR conversion fails because
`Fir2IrLazyProperty` for the value parameter tries to resolve the
initializer before creating the `IrParameterSymbol`. When it checks the
`localStorage`, it reports an error for the missing `IrParameterSymbol`.
This commit adds `IrParameterSymbol` before resolving the initializer.

^KT-65099 Fixed
2024-02-29 06:44:05 +00:00