Commit Graph

48 Commits

Author SHA1 Message Date
eugene.levenetc 83ddf904aa [ObjCExport] Fix data class predefined methods translation
KT-65800
2024-02-25 21:31:30 +00:00
Sebastian Sellmair 6b6808d87c [ObjCExport] ObjCType: Implement HasExtras instead of HasMutableExtras
... to enforce the immutability concept of this entities.

KT-65891 Fixed
2024-02-23 07:31:32 +00:00
Sebastian Sellmair 622a88ff26 [ObjCExport] Translate ObjCObject types, respecting the @ExternalObjCClass annotation
KT-65891 Fixed
2024-02-23 07:31:32 +00:00
Sebastian Sellmair a5baf42422 [ObjCExport] KtObjCExportHeaderGenerator: Separate 'requiresClassForwardDeclaration' from ObjCType.classId
There are two different objectives associated with this newly
introduced extras:

- originClassId: Used to track where a type came from; Will
ensure that the translation queue will be populated to also
translate potential dependency classes

- requiresForwardDeclaration: Used to track if a certain
type requires rendering as forward declaration

KT-65891
2024-02-23 07:31:32 +00:00
eugene.levenetc 30b63e4843 [ObjCExport] Add translation of functions and properties extensions
KT-65630
2024-02-22 09:20:12 +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
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
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
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
Sebastian Sellmair 4b6624c920 [ObjCExport] Support naming of nested classes
^KT-65204 Fixed
2024-02-09 08:48:16 +00:00
Sebastian Sellmair 5b11308d1b [ObjCExport] Translate superClass and superClass generics for class and objects
^KT-65384 Verification Pending
2024-02-08 12:43:48 +00:00
Sebastian Sellmair c22149c642 [ObjCExport] Properly detect Array constructors
^KT-65225 Fixed
2024-02-08 12:41:37 +00:00
eugene.levenetc 797284dada [ObjCExport] Implement initial processing queue (stable order, dependencies, forward declarations)
This commit will introduce the first processing queue
which will take care of properly ordering the 'to translate' symbols
as well as taking care of 'dependency' symbols (aka symbols
mentioned in signatures or as supertypes).

- There are several changes like properly translating
types as ObjCProtocolType instead of ObjCClassType (if origin was an interface)
- Type translation of generics defined on interfaces will also emit id type.
- Add initial nested classes collection to the queue
- Add extension function test, add tickets references

^KT-65237 Verification Pending
^KT-65329 Verification Pending
2024-02-07 20:29:08 +00:00
Sebastian Sellmair 32da1b70f5 [ObjCExport] Implement initial sorting and ordering for ObjC translation
^KT-65237
2024-02-07 20:29:08 +00:00
Alexander Shabalin 5525a6829a [ObjCExport][tests] Ignore AA test failures both locally and on CI
To run AA tests normally, use kif.loca gradle property.


Merge-request: KT-MR-14129
Merged-by: Alexander Shabalin <alexander.shabalin@ashabalin.me>
2024-02-02 13:43:30 +00:00
Sebastian Sellmair 0db8931026 [ObjCExport] Implement 'TodoAnalysisApi' annotation and run AA based tests as part of ':native:objcexport-header-generator:check'
^KT-65281 Fixed
^KT-65108 Fixed
2024-01-26 16:19:20 +00:00
Sebastian Sellmair c958aef679 [ObjCExport] Initial implementation of function type translation
^KT-65167
2024-01-26 10:11:48 +00:00
Sebastian Sellmair 3766a5f2ad [ObjCExport][Minor] Move 'isBinaryRepresentationNullable' utility to bottom of translateToObjCType.kt
^KT-65167
2024-01-26 10:11:48 +00:00
Sebastian Sellmair 9f0aa7d30c [ObjCExport] Use K1 convention and do not mark KtErrorType as nullable
^KT-65167
2024-01-26 10:11:48 +00:00
Sebastian Sellmair 2bf7bbb6c1 [ObjCExport] Support mapping of ObjCObject types to id
^KT-65167
2024-01-26 10:11:48 +00:00
Sebastian Sellmair 3cd20bd7b0 [ObjCExport] Support generic type parameters for ObjC translation
^KT-65167
2024-01-26 10:11:48 +00:00
Sebastian Sellmair 3111678f8b [ObjCExport] Support nullable type arguments in translating known Collection types
^KT-65167
2024-01-26 10:11:48 +00:00
Sebastian Sellmair 858af02a24 [ObjCExport] Initial support for inline classes in type mapping
^KT-65167
2024-01-26 10:11:48 +00:00
Sebastian Sellmair 262bfb18cc [ObjCExport] Initial support for ObjCClassType type arguments
^KT-65167
2024-01-26 08:19:05 +01:00
Sebastian Sellmair a6a27466fc [ObjCExport] Fix emission of 'ValueTypeBridge' for 'non primitive' types
^KT-65167
2024-01-26 08:19:05 +01:00
Sebastian Sellmair 2708c74d9c [ObjCExport] Fix KT-64952 HasErrorTypesTest 2024-01-23 10:03:15 +00:00
eugene.levenetc 480b8ec516 [ObjCExport] Add object translation and error handling
- Also add forward declaration tests
- Add hidden types support
- Issues: KT-64857, KT-64952, KT-65080
2024-01-22 14:59:56 +00:00
eugene.levenetc fc56f2af1c [ObjCExport] Fix top level property
KT-64923


Merge-request: KT-MR-13873
Merged-by: Eugene Levenetc <Eugene.Levenetc@jetbrains.com>
2024-01-15 01:49:37 +00:00
Sebastian Sellmair a713d66b7b [ObjCExport] Analysis Api: Ensure KDocs being exported by providing ObjCExportStubOrigin
^KT-64888 Fixed


Co-authored-by: Sebastian Sellmair <Sebastian.sellmair@jetbrains.com>


Merge-request: KT-MR-13854
Merged-by: Eugene Levenetc <Eugene.Levenetc@jetbrains.com>
2024-01-14 01:13:58 +00:00
Sebastian Sellmair 9c3de4332f [ObjCExport] Run new ObjCExport tests as native tests on CI
^KT-64839 Fixed
2024-01-12 15:37:41 +00:00
Sebastian Sellmair 80d9933543 [ObjCExport] Analysis Api: Implement initial support for exporting 'MustBeDocumented' annotations
^KT-64869 Fixed
2024-01-12 09:41:46 +00:00
eugene.levenetc a778c6d9aa [ObjCExport] Add initial top level function export
KT-64874
2024-01-11 18:25:38 +00:00
eugene.levenetc 92affa1b24 [ObjCExport] Add initial objective-c function translation
KT-64226
2024-01-10 09:17:00 +00:00
Sebastian Sellmair 90632ad746 [ObjCExport] Implement isObjCObjectType util
KT-64226
2024-01-08 15:25:19 +00:00
Sebastian Sellmair e0383282b5 [ObjCExport] Implement isObjCBaseCallable util
KT-64226
2024-01-08 15:25:19 +00:00
Sebastian Sellmair b5bcfaa2e3 [ObjCExport] translateToObjCProtocol: Support building members
KT-64226
2024-01-08 15:25:19 +00:00
Sebastian Sellmair b78f185299 [ObjCExport] Remove unnecessary instances in favor of static methods
All state will later be stored inside the KtObjCExportSession

KT-64226
2024-01-08 15:25:19 +00:00
Sebastian Sellmair 2f759243ba [ObjCExport] Implement isVisibleInObjC util
KT-64226
2024-01-08 15:25:19 +00:00
Sebastian Sellmair 66533141b8 [ObjCExport] Implement getSuperClassSymbolNotAny util
KT-64226
2024-01-08 15:25:19 +00:00
Sebastian Sellmair 9909940b24 [ObjCExport] Implement rudimentary interface to ObjCProtocol translation
KT-64226
2024-01-08 15:25:19 +00:00
Sebastian Sellmair aa3fa9e8c5 [ObjCExport] Implement 'findKdocString' utility for Analysis Api
KT-64226
2024-01-08 15:25:19 +00:00
Sebastian Sellmair 72f135396c [ObjCExport] Extract generation of ObjC base declarations into shared code
KT-64226
2024-01-08 15:25:19 +00:00
Sebastian Sellmair 7ef62d1779 [ObjCExport] KtResolvedObjCNameAnnotation: Return null if ObjCName annotation is absent 2024-01-08 15:25:19 +00:00
Sebastian Sellmair e409c60780 [ObjCExport] Split ObjCExport into K1 and Analysis Api implementation
FL-23390
^KT-64168 Fixed
2024-01-08 15:25:19 +00:00