Commit Graph

93 Commits

Author SHA1 Message Date
Sebastian Sellmair a13756cfe9 [aa-klib-reader] Move aa-klib-reader to pkg 'o.j.k.native.analysis.api'
To clearly distinguish this modules API from the Analysis API

^KT-66695 Fixed
2024-03-19 12:35:52 +00:00
Timofey Solonin 9295f44eda Quote module name in the generated modulemap
This fixes an issue where Kotlin projects named "umbrella" or
"framework" produce unimportable framework modules.

^KT-66565
2024-03-14 19:19:57 +00:00
eugene.levenetc f7f779df53 [ObjCExport] Add inner classes translation
KT-66339
2024-03-13 08:10:21 +00:00
eugene.levenetc aaea1d6af2 [ObjCExport] Fix interface implementing interface
KT-66380
2024-03-12 12:48:15 +00:00
Dmitriy Novozhilov d352cc9d96 [Frontend] Make DiagnosticSuppressor a project-level extension
Originally it was an application-level component, which caused non-trivial
  logic and cognitive load to carefully handle those extensions to avoid
  memory leaks.

6740a596 introduced a way to easily register `DiagnosticSuppressor` to
  project, and this commit continues this work, making it a proper
  project-level extension

A lot of changes caused by the fact, that this extension is needed to be
  obtained from `BindingContext` (see `BindingContextSuppressCache` and
  its usages), so almost all changes are introducing `Project` to
  `BindingContext`

^KT-66449 Fixed
2024-03-12 06:43:58 +00:00
eugene.levenetc 0a7839a29a [ObjCExport] Fix primary constructor parameter annotation translation
KT-66401
2024-03-07 14:21:03 +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
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
eugene.levenetc 5c64832c0f [ObjCExport] Fix extensions interface name
KT-66315
2024-03-05 13:38:36 +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
eugene.levenetc 078f0ff6e1 [ObjCType] Add basic implementation of base method, fix tests
KT-65687
2024-02-29 18:10:04 +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
eugene.levenetc e65caee26b [ObjCType] Add vararg translation
KT-66056
2024-02-29 10:24:40 +00:00
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
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
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
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
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