Commit Graph

134 Commits

Author SHA1 Message Date
Ilya Kirillov 644d1bf0d0 [FIR] ignore tests which fail because of resolve contracts violation 2022-12-12 16:21:07 +00:00
Ilya Kirillov 7bac119f20 [FIR] add lazy resolution contract checks in resolve 2022-12-12 16:21:06 +00:00
Alexander Udalov 0d8d91f803 Remove unsafe cast function usages from compiler plugins 2022-12-06 19:44:56 +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
Ilya Chernikov 5b3816cce5 Test infra: refactor IGNORE_BACKEND directive
treat it as a general one, introduce *_K1 and *_K2 variants for
more specific ignoring
2022-11-12 16:28:23 +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
Vladimir Sukharev c8864369fd Use main class as test generator name
Merge-request: KT-MR-7031
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-09-09 12:51:18 +00:00
Alexander Udalov 7dad47cd76 Add -X argument to disable generation of @SourceDebugExtension
This will be used in tests in the subsequent commit.
2022-09-09 14:32:35 +02: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
Dmitry Gridin 4ceb170917 regenerate tests 2022-08-05 14:12:41 +02:00
Steven Schäfer 58e51919bd Parcelize: Add missing FIR diagnostics 2022-07-26 09:34:10 +00:00
Steven Schäfer d4aa303acb Parcelize: Avoid KotlinTypeMapper in ParcelizeDeclarationChecker 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
Nikolay Krasko 5b8a4ccd56 Use cache-redirector for downloading in parcelize tests
There's a flaky failures when
~/.m2/repository/org/robolectric/android-all/5.0.2_r3-robolectric-r0/android-all-5.0.2_r3-robolectric-r0.jar
is partially downloaded during tests execution.
This led to Parcelize tests failure with:

Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)
 at java.util.zip.ZipFile.read(Native Method)
 at java.util.zip.ZipFile.access$1400(ZipFile.java:60)
 at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:734)
 at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:434)
 at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
 at java.io.FilterInputStream.read(FilterInputStream.java:133)
 at java.io.FilterInputStream.read(FilterInputStream.java:107)
 at org.robolectric.util.Util.copy(Util.java:21)
 at org.robolectric.util.Util.readBytes(Util.java:38)
 at org.robolectric.internal.bytecode.SandboxClassLoader.getByteCode(SandboxClassLoader.java:166)
... 36 more

Option used was found at https://github.com/robolectric/robolectric/blob/7697d1217c5eb0dee454004efe60ba219f398255/plugins/maven-dependency-resolver/src/main/java/org/robolectric/MavenRoboSettings.java#L19

^KTI-842 Fixed
2022-07-01 18:44:48 +00:00
Dmitriy Novozhilov 935f5c1180 [Parcelize] Fix registration of IR extension for K2 mode 2022-06-29 12:00:02 +00:00
Dmitriy Novozhilov 1a8496757e [Compiler] Mark all entrypoints to compiler API as experimental 2022-06-29 12:00:01 +00:00
Dmitriy Novozhilov 8b42638afa [Plugins] Introduce new API for registering compiler plugins
Original `ComponentRegistrar` exposes Project to its registration method,
  so plugins should manually register extensions to it. To prepare for
  possible unbound compiler from Project API in future new  `K2ComponentRegistrar`
  introduced which provides registration method without Project at all
2022-06-29 11:59:58 +00:00
Yahor Berdnikau 4d47cf07be Update org.robolectric:android-all to 4.4_r1-robolectric-r2
Possibly could fix flaky parcelize plugin tests on Windows OS.
2022-06-21 11:26:30 +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
Nikolay Lunyak ac1fb07102 [FIR JS] Add checkers.js 2022-06-02 13:47:28 +00:00
Ivan Kylchik f3252334b2 Move most of ir utils from backend.common to ir.tree 2022-05-18 21:20:03 +03:00
Vyacheslav Gerasimov 6bb36bc5e1 Fix flaky android robolectric tests
#KTI-842
2022-05-10 23:42:55 +04:00
Victor Petukhov 8e834fc7bb [FIR] Move subtyping helpers into TypeUtils.kt 2022-04-27 19:50:17 +00:00
Alexander Udalov 45f87bc71a Advance JVM target to 1.8 for kapt, AE, parcelize runtimes 2022-04-19 22:54:40 +02:00
Alexander Likhachev eda759ba31 [Build] Avoid buildscript root capture into task action
#KT-44611 In Progress
2022-04-19 00:39:24 +03:00
Ivan Kochurkin 8c7fad9a5e [FIR] Support of type arguments in annotations ^KT-48444 Fixed 2022-04-18 15:36:19 +00:00
Dmitriy Novozhilov afad6a564a [Test] Pass CompilerConfiguration to AbstractEnvironmentConfigurator.registerCompilerExtensions
This is needed to provide ability to configure extensions depending on
  configuration of specific test
2022-04-08 09:42:00 +00:00
Evgeniy.Zhelenskiy b6f2513dd2 [FIR] Introduce valueClassRepresentation to FIR
#KT-1179
2022-03-24 11:38:44 +00:00
Evgeniy.Zhelenskiy 28bf83ceac [IR] Unite inline class and multi-field value class representation
#KT-1179
2022-03-24 11:38:43 +00:00
Victor Petukhov b5933c70e2 [FE 1.0] Refactor error utils: split error entities and introduce error type and error scope kinds 2022-03-23 21:13:33 +00:00
Roman Golyshev ffcbc583d0 FIR: Split EnvironmentConfigurator to an interface and abstract class
It is needed to make it easier to write wrappers for configurators
2022-02-25 23:08:26 +03:00
Dmitriy Novozhilov b47cc86c57 [FIR] Fix incorrect context usages with withSuppressedDiagnostics call 2022-02-18 17:44:40 +03:00
Dmitriy Novozhilov 0bd3e8f418 [FIR] Rename ConeClassErrorType to ConeErrorType, drop ConeKotlinErrorType alias 2022-02-07 13:36:33 +03:00
Dmitriy Novozhilov bea2bc3980 [Parcelize] Move FIR related parts of parcelize to separate module
This is needed to avoid bundling of FIR classes to IDE plugin for
  parcelize, because it can cause compatibility issues, because
  IDE plugin does not contain FIR compiler
2022-01-21 10:22:39 +03:00
Evgeniy.Zhelenskiy e97ca2ada4 [Psi2Ir, Fir2Ir] Generate toString, hashCode, equals methods for MF VC 2022-01-14 13:51:57 +00:00
Vyacheslav Gerasimov 944c7990a1 Build: Use fake ideaHome for tests with intellij build number only
#KTI-82
2021-12-16 21:48:24 +03:00
Vyacheslav Gerasimov f7a9065b75 Build: Use intellij maven repo instead of downloaded IDEA
#KTI-82
2021-12-16 21:48:23 +03:00
Vyacheslav Gerasimov 318e001d1b Fix parcelize test dependencies on android plugin layoutlib
#KTI-82
2021-12-16 21:48:22 +03:00
Vyacheslav Gerasimov bc2f0936bd Build: Rename commonDep -> commonDependency 2021-12-16 21:48:19 +03:00
Dmitriy Novozhilov 23f5c22684 [Test] Update testdata of parcelize 2021-12-15 21:37:32 +03:00
Dmitry Petrov df460a842b JVM_IR KT-50076 avoid CHECKCAST on moved dispatch receiver parameter 2021-12-13 14:13:34 +00:00
Dmitry Petrov 6f148c594f Revert "JVM_IR KT-50076 avoid CHECKCAST on moved dispatch receiver parameter"
This reverts commit 627d838343.
2021-12-13 14:13:33 +00:00
Dmitry Petrov 627d838343 JVM_IR KT-50076 avoid CHECKCAST on moved dispatch receiver parameter 2021-12-11 08:04:26 +00:00