Commit Graph

1830 Commits

Author SHA1 Message Date
Johan Bay 446db595ce [K/N] keep internal members in header klibs
This is also the behavior of jvm-abi-gen and desired to support
friend modules.
^KT-65442
2024-02-20 08:03:07 +00:00
Vladimir Sukharev 2b2c685827 [K/N][Tests] Migrate dylib-interop-exe tests
^KT-61259
2024-02-19 18:44:08 +00:00
Vladimir Sukharev ba217ad688 [K/N][Tests] Fix passing of -Xbinary options under MinGW
^KT-61259
2024-02-19 17:42:34 +00:00
Sebastian Sellmair 98eca9058b [ObjCExport][Minor] Add breadcrumb for KT-65891 2024-02-19 14:24:37 +00:00
Sebastian Sellmair d0e67ff336 [ObjCExport] Restructure ObjC export symbol queue to replicate order of K1
The previous implementation used a two-stage process:
1) Processing of declared symbols
2) Analysis and processing of referenced dependency symbols

However, to replicate the exact same order as in K1
those two steps need to be done together.

^KT-64953 Fixed
2024-02-19 14:24:37 +00:00
Sebastian Sellmair a2d76d739c [ObjCExport] Support translation of enum classes
^KT-64953 Fixed
2024-02-19 14:24:37 +00:00
Alexander Shabalin 60bf15d654 [K/N][tests] all users of nativeTest() require executors 2024-02-19 13:53:05 +00:00
Andrey Yastrebov 60071cbb54 KT-65740 Create swift-export-embeddable module 2024-02-19 10:55:55 +00:00
Dmitriy Dolovov 1c3633c9f2 [Native][tests] Use new KLIB tool entry point for running tests
^KT-62340
2024-02-19 09:36:10 +00:00
Anastasia.Nekrasova fd4f6c90c7 [K/N][K2] K2 behavioral difference with inconsistent inheritance of ObjCName
Support for complex cases with multiple substitution overrides.

#KT-64276 Fixed
2024-02-19 09:29:43 +00:00
Anastasia.Nekrasova d69240a2d5 [FIR] Fixed behavior of FirAnnotation.findArgumentByName for resolved annotations
The 'findArgumentByName' function was returning an invalid result for
annotation arguments with omitted argument name.

#KT-64276
2024-02-19 09:29:43 +00:00
Anastasia.Nekrasova bb8c7dd04c [K/N][K2] K2 behavioral difference with inconsistent inheritance of ObjCName
When a declaration with an ObjC annotation is stored in a different
module, the annotation arguments are not resolved by default. This leads
to a bug in the checker. Before attempting to find the objCName, it is
necessary to resolve the annotation first.

#KT-64276
2024-02-19 09:29:43 +00:00
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
eugene.levenetc 8f2fc3d1e2 [ObjCExport] Fix property setter
KT-64953: Required part for enum translation
2024-02-16 16:32:22 +00:00
eugene.levenetc 97f585dd25 [ObjCExport] Add companion object translation
KT-64953: Required part for enum translation
2024-02-16 13:58:03 +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
Leonid Startsev 09e89db82f Change kotlinx- to kotlin- in kotlin-metadata-jvm and related projects
Change package, artifact group, artifact name, and Gradle module name to
kotlin-metadata and kotlin-metadata-jvm, respectively.

In Kotlin 2.0, kotlin-metadata-jvm library is promoted to stable, and is
a part of Kotlin distribution now.

Note that kotlinx-metadata-klib is left with org.jetbrains.kotlinx group, artifact name and package
because -klib part is considered not stable and for internal use. Since it is still published via Sonatype,
it should have kotlinx group. Therefore, it will have both classes from kotlin.metadata and kotlinx.metadata packages. This is not a problem, because we already had kotlinx.metadata split package between -jvm and -klib before.

#KT-63219 Fixed
2024-02-15 15:32:33 +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
Pavel Kunyavskiy d100a07981 [K/N] Move ObjCOverridabilityCondition to proper module
It was not active in diagnostic tests otherwise.
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
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