Yahor Berdnikau
aeaaf6dd8e
[Gradle] Add a check that KGP API has consistent KDoc
...
^KT-58858 In Progress
2023-12-07 16:19:24 +00:00
Yan Zhulanow
1726a94c87
[Pill] Update module structure
2023-12-07 08:53:35 +00:00
Sergej Jaskiewicz
8d1907e2f5
[FIR/IR generator] Introduce the common entry point for tree generators
...
This reduces code duplication.
2023-12-05 20:30:22 +00:00
Sergej Jaskiewicz
19ff050eae
[FIR/IR generator] Move usedTypes to AbstractElement, rename it
2023-12-05 20:30:22 +00:00
Sergej Jaskiewicz
d0f87f9aba
[FIR/IR generator] Rename field's needAcceptAndTransform to isChild
...
This better describes the semantics.
2023-12-05 11:41:02 +00:00
Sergej Jaskiewicz
f46a14522f
[FIR generator] Remove unused notNull property
2023-12-01 12:06:06 +00:00
Sergej Jaskiewicz
f3016e1dcb
[FIR generator] Avoid FIR-specific code in AbstractBuilderPrinter
2023-12-01 12:06:06 +00:00
Sergej Jaskiewicz
cae4a9930b
[FIR generator] Extract the Builder class to a common module
...
We want to use it to generate builder classes for other
trees, just like we already do with elements (see `AbstractElement` and
`AbsractImplementation`).
2023-12-01 12:06:06 +00:00
Sergej Jaskiewicz
91b5a71f1a
[FIR generator] Extract the Implementation class to a common module
...
We want to use it to generate implementation classes for other
trees, just like we already do with elements (see `AbstractElement`).
2023-12-01 12:06:06 +00:00
Ilya Goncharov
08e3cb300a
[JS] Migrate tests onto IR compiler with outputDir API instead of outputFile
...
^KT-61117 fixed
2023-11-29 11:21:56 +00:00
Yahor Berdnikau
e50f6e6bca
[Gradle] Add '@JvmStatic' annotation to companion methods in Kotlin types
...
This should improve usability in groovy scripts.
^KT-63601 Fixed
2023-11-29 10:24:23 +00:00
Sergey Bogolepov
ec82d54ef7
[Swift Export] Fix test infrastructure according to the review
2023-11-28 18:00:43 +00:00
Sergey Bogolepov
58bef34b9c
[Swift Export] Rename tests generation tool
...
Now it generates test-cases for sir-compiler-bridges as well,
so it makes sense to move away from Analysis API in its name.
2023-11-28 18:00:43 +00:00
Sergey Bogolepov
fe9ab0a1fc
[Swift Export] KT-63516
...
Add a sir-compiler-bridge module that adds Kotlin and C bridges
for SIR. As SIR is still WIP, the module accepts `BridgeRequest`
instances instead of SIR elements.
2023-11-28 18:00:43 +00:00
Artem Olkov
7c15e3f229
KT-63269: implementation for SIRGenerator with top-level functions
...
KT-63269: add test generator
Merge-request: KT-MR-12945
Merged-by: Artem Olkov <artem.olkov@jetbrains.com >
2023-11-28 18:00:43 +00:00
Sergej Jaskiewicz
7bd4de65f8
[IR generator] Deduplicate field copying logic
2023-11-28 16:24:40 +00:00
Sergej Jaskiewicz
5f04bc8a27
[IR generator] Simplify computation of walkable children
...
Don't require to specify them explicitly via `isChild` in IR generator,
instead test the field type whether it is an element.
2023-11-28 16:24:40 +00:00
Sergej Jaskiewicz
ad4e97154f
[FIR/IR generator] Factor out allFields to AbstractElement
2023-11-28 16:24:40 +00:00
Sergej Jaskiewicz
38ee477ab4
[FIR/IR generator] Make AbstractField generic over itself
...
This will make some code more type-safe.
2023-11-28 16:24:40 +00:00
Sergej Jaskiewicz
c6eb7d6c21
[FIR/IR generator] Factor out walkableChildren and transformableChildren
2023-11-28 16:24:40 +00:00
Sergej Jaskiewicz
13ae129505
[FIR/IR generator] Move isSealed property to AbstractElement
2023-11-28 16:24:40 +00:00
Sergej Jaskiewicz
0465c6d0ee
[FIR/IR generator] Make InterfaceAndAbstractClassConfigurator open
2023-11-28 16:24:40 +00:00
Alexander Udalov
2d76c7b05d
Generators: reduce verbosity when logging which files are generated
...
It made it a bit difficult to see which tests were affected when running
generateTests.
2023-11-24 19:48:09 +00:00
Sergej Jaskiewicz
4307e76f15
[FIR/IR generator] Remove visitSuperTypeByDefault from visitor printers
...
This property is FIR-specific, no need to use it in the generic printer.
2023-11-24 17:29:58 +00:00
Sergej Jaskiewicz
a5b5492b2d
[IR generator] Simplify configuration of visitor parents
...
Don't specify a visitor parent manually for each IR node,
use an algorithm instead.
2023-11-24 17:29:58 +00:00
Sergej Jaskiewicz
62d32471e1
[FIR generator] Extract BaseTransformerTypeFinder into the common module
...
We want to use it in other tree generators.
2023-11-24 17:29:58 +00:00
Dmitrii Gridin
8dacd41818
[LL FIR] introduce lazy resolve tests for type annotations
...
From one side to check how annotation propagation works and from another
side to cover scenarios with lazy resolution from type position as it is
a valid case of usage in Analysis API (KtFirAnnotationListForType)
^KT-63042
2023-11-23 15:55:06 +00:00
Ilya Gorbunov
d8ee74222f
[builtins-gen] Explicit visibility for companion objects and secondary constructors
2023-11-22 18:04:34 +00:00
Ilya Gorbunov
ab7c2f2196
[stdlib] Explicit visibility and return types: builtins
2023-11-22 18:04:34 +00:00
Sergej Jaskiewicz
8eefb210f9
[FIR/IR generator] Introduce the shared Model class
2023-11-22 15:10:16 +00:00
Sergej Jaskiewicz
9a11208e67
[FIR/IR generator] Extract visitFunctionName to AbstractElement
2023-11-22 15:10:16 +00:00
Ilmir Usmanov
87aed4bf47
KAPT: Run tests on JDK 21
...
Previously, some tests have also been disabled on JDK 11+, since
we did not filter out empty filesets, which led to failed assertion
inside JDK.
#KT-57389
2023-11-22 14:58:55 +00:00
Sergej Jaskiewicz
fab63e38aa
[FIR/IR generator] Reduce duplication when printing curly-braced blocks
2023-11-21 01:15:10 +00:00
Sergej Jaskiewicz
18ed85c26e
[IR generator] Auto-generate IrElementTransformerVoid
2023-11-21 01:15:10 +00:00
Marco Pennekamp
6c67835128
[LL] Add PSI resilience tests for LLFirDeclarationModificationService
...
- The cause of KT-63130 is that `LLFirDeclarationModificationService`
tries to analyze inconsistent PSI. These new tests replicate the
inconsistent PSI by deleting different children and then call the
declaration modification service with it, making sure that the service
doesn't throw any exceptions. Both exceptions mentioned in the issue
are reproduced by the added tests, specifically, the receiver and
selector resilience tests for dot-qualified expressions.
- A few of the tests need to be marked with `IGNORE_FIR` until the error
has been fixed in the subsequent commit.
^KT-63130
2023-11-16 19:50:51 +00:00
Roman Efremov
29980c6b85
[Tests] Run KMP tests in Analysis API LL FIR test suites
...
New tests are red in current commit!
All `.ll.kt` files are just copies of `.fir.kt` or `.kt`. This will be
fixed in the next commit to clearly show difference between LL and FIR.
The original purpose of this change was to test
`ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT` diagnostic, for which FIR checker
will be run only in IDE (to be changed in next MR), so its reports
a lost from usual KMP tests.
But this looks like a useful change for all KMP tests, not only this
diagnostic.
^KT-62559
2023-11-10 19:36:09 +00:00
Ilya Kirillov
5f5daa0e06
[Decompiler] rename :analysis:decompiled:native -> :analysis:decompiled:decompiler-native
...
to avoid possible name clashes between different
Gradle subprojects with the same name.
see https://github.com/gradle/gradle/issues/16986
2023-11-10 06:41:03 +00:00
Ilya Kirillov
bffbbe6293
[LL FIR] add LL FIR tests based on AbstractFirPsiNativeDiagnosticsTest
...
^KT-62910 fixed
2023-11-10 06:41:03 +00:00
Ilya Kirillov
68235b978b
[Analysis] add test generator for Kotlin/Native tests inside Analysis API
...
This test generator is enabled only if Kotlin/Native support is enabled in the project
^KT-62910
2023-11-10 06:41:03 +00:00
Jaebaek Seo
e80f044847
K2: Update reference shortener to handle import alias
...
The existing reference shortener does not use import alias when it
shortens a symbol. Instead, it adds a new import directive for the
symbol that is already imported. This commit updates reference shortener
to let it reuse the existing import alias rather than adding a new one:
1. When shortening a symbol, check whether the symbol is already
imported.
2. If it is already imported by an import alias, keep the symbol
reference expression and the import alias as a string together in
`ShortenCommand`.
The actual PSI update (shortening) based on the ShortenCommand is done
by IntelliJ.
^KTIJ-27205
2023-11-09 14:34:38 +00:00
Sergej Jaskiewicz
02c12ae26f
[FIR generator] Write kDocs for accept & transform methods in FirElement
2023-11-09 13:30:25 +00:00
Sergej Jaskiewicz
ed28923282
[IR generator] Don't use kotlinpoet for auto-generating IR tree classes
...
KT-61970 Fixed
KT-61703 Fixed
2023-11-09 13:30:25 +00:00
Sergej Jaskiewicz
63e9dd588c
[FIR generator] Factor out element printer to common module
...
This is a step towards commonizing the code generator between
FIR and IR: KT-61970
2023-11-09 13:30:25 +00:00
Sergej Jaskiewicz
84bd12c667
[FIR generator] Factor out field printer into the common code
...
This is a step towards commonizing the code generator between
FIR and IR: KT-61970
2023-11-09 13:30:25 +00:00
Sergej Jaskiewicz
bca35c0015
[FIR/IR generator] Add default arguments to TypeVariable constructor
2023-11-09 13:30:25 +00:00
Jinseong Jeon
4110a9971a
AA: fix KtTypeProvider#getReceiverTypeForDoubleColonExpression
...
K1 version has used a wrong expression to retrieve the slice.
K2 version mishandled property access as a receiver.
^KT-63195 fixed
2023-11-08 16:18:21 +00:00
Evgenii Mazhukin
20af98c776
[Tests] Re-enable K1 IC tests for expect-actual
...
^KT-60831 fixed
^KT-60831 next step KT-63183
Merge-request: KT-MR-12855
Merged-by: Evgenii Mazhukin <evgenii.mazhukin@jetbrains.com >
2023-11-06 19:46:43 +00:00
Sergej Jaskiewicz
a84277782a
[IR generator] Don't use kotlinpoet for auto-generating IrFactory
...
KT-61970
2023-11-06 09:47:22 +00:00
Sergej Jaskiewicz
54de11cb58
[FIR/IR generator] Generate kDocs for visitor classes
2023-11-02 23:05:18 +00:00
Sergej Jaskiewicz
570422dbd4
[FIR/IR generator] Print visitor method expression bodies on new line
...
This helps to avoid long lines in visitor classes.
2023-11-02 23:05:18 +00:00