Commit Graph

24 Commits

Author SHA1 Message Date
Brian Norman b595328192 [Parcelize] Ignore all sealed classes in Parcelize FIR generator
Sealed classes are inherently abstract and should not have Parcelable
functions added via the FIR declaration generator.

#KT-59112 Fixed
2023-06-08 12:58:32 +00:00
Nikolay Lunyak 20786bb35a [FIR] Refactor the default messages presence checking
Forbid calling `checkMissingMessages` accidentally
outside tests.

Checking Parcelize default messages inside a test.
2023-04-14 13:07:03 +00:00
Kirill Rakhman c9d68f6d3e [FIR, Parcelize] Fix checkers after primary ctor annotation changes
KT-56177
2023-02-28 10:19:17 +00:00
Dmitriy Novozhilov 41192b022d [FIR] Pass context to all relevant methods of FirDeclarationGenerationExtension
^KT-53470 Fixed
2023-02-10 12:30:14 +00:00
Dmitriy Novozhilov 89c42e20c9 [FIR] Consistently use _function_ instead of _functional_ in names of classes and functions 2023-02-02 08:24:52 +00:00
Dmitriy Novozhilov c86495dcae [FIR] Introduce ConeFunctionalTypeKind as a replacement of FunctionClassKind
This is needed to provide an ability to extend different kinds of
  functional types

Also, cleanup and rename utilities related to functional types to avoid
  possible confusions
2023-02-02 08:24:49 +00:00
Dmitriy Novozhilov 125b773205 [FIR] Introduce utility for creating ConeClassLikeLookupTagImpl from ClassId
`classId.toLookupTag()` looks much cleaner than `ConeClassLikeLookupTagImpl(classId)`
2023-02-02 08:24:48 +00:00
Nikolay Lunyak 23301e3369 [FIR] Remove annotations.any from FirParcelizeAnnotationChecker 2023-01-17 06:26:39 +00:00
Nikolay Lunyak cf73d59e29 [FIR] Remove FirAnnotation.classId from FirParcelize
The same reasoning as with the serialization. If we
decide to support it, we wouldn't need to think
about unexpanded types.
2023-01-17 06:26:35 +00:00
Dmitriy Novozhilov 5fedb2f72d [Parcelize] Use new DSL for generating declarations 2023-01-12 17:45:41 +00:00
Mikhail Glukhikh 0d50f71fb8 K2: expand type aliases in annotation position #KT-55615 Fixed 2023-01-04 10:06:39 +00:00
Dmitriy Novozhilov 246dc985a6 [FIR] Rework predicates system
Now predicates are split into LookupPredicate and DeclarationPredicate
  hierarchies. First one allows to perform global search for declarations
  and second one allows to check if some declaration matches the predicate.
Predicates with meta annotations are excluded from LookupPredicates,
  because it's impossible to create index of annotations with meta-annotations,
  because they can be located inside binary dependencies (so to achieve
  this we need to scan the whole classpath).
Also only one predicate with meta-annotations is left in DeclarationPredicate
  hierarchy (AnnotatedWithMeta)

^KT-53874 Fixed
^KT-53590 Fixed
2022-12-01 07:29:37 +00:00
Ilya Kirillov 7781ad67d4 [FIR] introduce FirValueParameter.containingFunctionSymbol
^KT-55034 fixed
2022-11-22 18:25:30 +01:00
pyos b23de16b06 FIR Parcelize: register the error message factory 2022-10-27 10:19:21 +03:00
pyos 72e671c8f1 FIR Parcelize: allow anonymous local objects if they're enum entries 2022-09-28 15:14:25 +03:00
Nikita Bobko 8f79e833a8 Drop all redundant kotlin-reflect, kotlin-reflect-api dependencies
Review: https://jetbrains.team/p/kt/reviews/6753

All redundant I managed to find, of course.

Why: I'm going to process all reflect dependencies in the next commits.
Cleanup reflect dependency before processing.

They are redundant because:
1. if `compileOnly` then compilation didn't break after dropping the
   dependency
2. if `test*` then tests didn't break after dropping the dependency.
3. `analysis/analysis-api-fir/analysis-api-fir-generator/build.gradle.kts`
   `compiler/fir/checkers/checkers-component-generator/build.gradle.kts`
   Drop `implementation(project(":kotlin-reflect-api"))` because the
   module already depends on
   `implementation(project(":kotlin-reflect"))`
4. `compiler/daemon/daemon-client/build.gradle.kts`. Drop `runtimeOnly`
   because after dropping `compileOnly` compilation didn't break (so
   `runtimeOnly` looks suspicious). Less safe than 1-3
2022-08-22 15:42:57 +02:00
Steven Schäfer 58e51919bd Parcelize: Add missing FIR diagnostics 2022-07-26 09:34:10 +00:00
Mikhail Glukhikh eba0e94429 K2: get rid of manual diagnostic suppression in checkers 2022-07-22 11:35:28 +00:00
Mikhael Bogdanov 41d6f0dca4 Remove ir.tree.impl from build 2022-06-20 11:42:52 +00:00
Dmitriy Novozhilov 36a154507e [Parcelize] Remove dependency from backend module to k2 module
This is needed to avoid dependencies on FIR classes inside Parcelize IDE
  plugin
2022-06-08 11:33:37 +00:00
Dmitriy Novozhilov 83d0a3e7a3 [FIR] Extract FirPluginKey into :core:compiler.common and rename it to GeneratedDeclarationKey
This is needed to avoid dependency on :compiler:fir:fir2ir module in
  backend parts of compiler plugins. It will allow to publish those
  parts into jars for IDE, where they are needed for working of debugger
  and bytecode toolwindow
2022-06-07 14:12:25 +00:00
Dmitriy Novozhilov e58e86932c [FIR] Pass declared member scope to methods of declaration generation extension 2022-06-07 14:12:24 +00:00
Dmitriy Novozhilov 23c69f8d17 [FIR] Add to new types of annotation predicates
- `ParentAnnotatedWith` matches declarations, which parent is annotated
- `HasAnnotatedWith` matches declarations, which have at least one
     direct child with annotation

Also, `DeclarationPredicate.Any` is removed, because there is no
  intention to support lookup for all declarations in module

^KT-52486 Fixed
2022-06-07 14:12:22 +00:00
Dmitriy Novozhilov 259862d294 [Parcelize] Reorganize module structure of Parcelize plugin
Also mark parcelize as compatible with K2
2022-06-07 14:12:15 +00:00