Commit Graph

301 Commits

Author SHA1 Message Date
Yan Zhulanow ea462091c4 Support new convention for local variables name mangling: '$receiver' -> '$this$<label>' (KT-26913) 2019-02-25 14:43:53 +03:00
Yan Zhulanow 1fbf51ea13 Kapt: Ignore imports for enum entries on import conversion (KT-28220) 2019-02-15 21:23:27 +03:00
Yan Zhulanow 87cad2af02 Kapt: Fix "no interface expected here" in class implementing interface with secondary constructor (KT-27506) 2019-02-15 21:23:27 +03:00
Yan Zhulanow 1c824655d4 Kapt: Fix supertype conversion for DefaultImpls (KT-28306) 2019-02-15 21:23:26 +03:00
victor.petukhov b354518a41 Add lazy debug diagnostic DEBUG_INFO_EXPRESSION_TYPE 2019-02-14 12:31:42 +03:00
victor.petukhov f92232f015 Decompose and rewrite CheckerTestUtil to Kotlin 2019-02-14 12:31:42 +03:00
Yan Zhulanow 9729932fe4 191: Update Android plugin changes to AS33 (KT-29847) 2019-02-13 16:35:46 +03:00
Mikhael Bogdanov a122cba862 Switch Kotlin project to jvm-target 1.8
#KT-29405
2019-01-31 07:43:05 +01:00
Vyacheslav Gerasimov f58acbeef5 Build: implement useBootstrapStdlib flag
Excludes stdlib projects from build and uses bootstrap stdlib artifacts

 #KT-29205
2019-01-21 21:09:40 +03:00
Vyacheslav Gerasimov 13d87e8eae Remove as31 bunch files 2019-01-14 21:29:02 +03:00
Mikhael Bogdanov e963c52c80 Update copyright in generated non-compiler tests 2019-01-02 13:34:03 +01:00
Marcin Moskala 686cfa6fd2 Fix common misspellings 2018-12-21 16:13:42 +03:00
Mikhael Bogdanov c19c979b7d Use last asm api for visitor construction 2018-12-20 12:55:09 +01:00
Yan Zhulanow 425467ca99 Kapt: Switch to more appropriate way of converting URIs to Files 2018-12-12 21:40:46 +09:00
Yan Zhulanow a090541108 Kapt: Update test data (stub converter tests) 2018-12-12 21:40:44 +09:00
Alexey Tsvetkov d6459e6c49 Add option to disable AP discovery in compile classpath
#KT-24530 Fixed

To disable discovery and enable avoidance for kapt tasks,
use "kapt.includeCompileClasspath = false"
2018-12-11 16:08:16 +03:00
Sergey Rostov df2e4524d7 Move resources from /src to separate /resources directory.
Previously this files was stored in /src directory and was included in
resources mainly by SourceSet.projectDefault from sourceSets.kt:

val processResources = tasks.getByName(processResourcesTaskName) as ProcessResources
processResources.from("resources") { include("**") }
processResources.from("src") { include("META-INF/**", "**/*.properties") }

Also there are some custom rules like this:

resources.srcDir("../idea-analysis/src").apply { include("**/*.properties") }
resources.srcDirs("idea-repl/src").apply { include("META-INF/**") }

All this rules are synthesized in script
https://github.com/snrostov/kotlin-migrate-resources/blob/master/src/main/kotlin/main.kt

This commit created using that script. See README.md for more details on
 script.
2018-11-30 15:01:01 +03:00
Yan Zhulanow 47657df8da Kapt: Convert valid references to qualified names (KT-26304) 2018-11-27 22:21:27 +09:00
Yan Zhulanow 6a8a8b794d Kapt: Support correctErrorTypes in suspend functions (KT-27711) 2018-11-27 22:21:27 +09:00
Yan Zhulanow 4c5e982f3e Kapt: Fix an ArrayIndexOutOfBoundsException for suspend functions with generated return types 2018-11-27 22:21:26 +09:00
Yan Zhulanow 69633e6686 Kapt: Fix stubs for delegated properties with anonymous types (KT-27910) 2018-11-27 22:21:26 +09:00
Yan Zhulanow 5fd070a9b9 Kapt: Add option for showing annotation processor timings (KT-28024) 2018-11-27 22:21:26 +09:00
Yan Zhulanow 9feb834d97 Kapt: Support paranoid mode in memory leak searcher 2018-11-27 22:21:26 +09:00
Yan Zhulanow 7e4069f114 Kapt, Refactoring: Introduce 'KaptOptions'
1. Use 'KaptOptions' for all kapt options, including paths and flags.
2. Use a single 'KAPT_OPTIONS' compiler configuration key for setting all options (using a mutable KaptOptions.Builder).
3. Pass 'KaptOptions' instead of separate flags.
4. Remove 'KaptPaths'.
5. Remove deprecated 'aptOnly' CLI option.
2018-11-27 22:21:25 +09:00
Yan Zhulanow 3918ec71be Kapt: Suppress warnings for deprecated kapt option usage 2018-11-27 22:21:25 +09:00
Yan Zhulanow abd1646d42 Kapt: Detect memory leaks in annotation processors (KT-28025) 2018-11-27 22:21:24 +09:00
Yan Zhulanow 911ad32580 Kapt: Check if the psiElement is bound to some Document instance before asking for its text range
textRange has an assertion that fails if the Document is not set.
2018-11-27 22:21:24 +09:00
Yan Zhulanow cd968ba8fe Kapt: Clear Javac shared ZIP cache after annotation processing or stub generation (KT-25756) 2018-11-27 22:21:24 +09:00
Yan Zhulanow 0ffa901859 Switch plugin and annotation processor loading to the own implementation of ServiceLoader
'ServiceLoader' in JDK8 leaks file handles (https://bugs.openjdk.java.net/browse/JDK-8156014).
New implementation uses the ZipFile API, it also doesn't operate on the whole classpath which is not often needed.
2018-11-27 22:21:24 +09:00
Yan Zhulanow 4e84a6b601 Kapt: Do partial analysis only for stub generation
Kapt has a 'compile' mode which repeats analysis after the annotation processing.
It should not run in the partial analysis mode.
2018-11-27 22:21:23 +09:00
Yan Zhulanow 69ec958aab Kapt: Add tests for the command-line 'kapt' tool 2018-11-27 22:21:23 +09:00
Yan Zhulanow 6e5eb0fdd4 Kapt: Implement 'kapt' command-line tool (KT-24998, KT-24997) 2018-11-27 22:21:23 +09:00
Yan Zhulanow 49941339a3 Introduce AbstractCliOption, rewrite all possible kapt options as enum values 2018-11-27 22:21:22 +09:00
Yan Zhulanow 546eff6e45 Kapt: Use light analysis by default 2018-11-27 22:21:21 +09:00
Yan Zhulanow fa0f447a23 Minor: Refactor AptMode a bit 2018-11-27 22:21:21 +09:00
Yan Zhulanow fe0f9005b0 Kapt: Allow to use class output directory as a generated class output 2018-11-27 22:21:21 +09:00
Mikhael Bogdanov d2a205c72d Update synthetic parameter processing logic according to ASM 7 changes
#KT-27774 Fixed
2018-11-07 15:42:57 +01:00
Vyacheslav Gerasimov 4076923a26 as34: Apply changes from AS 3.3 2018-10-26 18:25:20 +03:00
Alexander Udalov c1ab08c8ce Refactor KClassValue to store ClassLiteralValue internally
Only invariant array projections and non-null element types will be
supported soon (see KT-26568), so it makes no sense to store the
complete type in KClassValue. What we need is only the ClassId of the
class, and the number of times it's wrapped into kotlin/Array, which is
exactly what ClassLiteralValue represents.

This change helps in decoupling annotation values from
descriptors/types. The only constant value that depends on descriptors
is now AnnotationValue.

 #KT-26582 Fixed
2018-10-25 16:27:23 +02:00
Yan Zhulanow 7626cf6611 Minor: Update test data for kapt stub converter 2018-10-24 23:44:31 +03:00
Yan Zhulanow f19c0c3fb9 Minor: Fix inspection warnings in 'kotlin-annotation-processing' 2018-10-24 20:12:41 +03:00
Yan Zhulanow 17c02a77c7 Minor: Fix inspection warnings in 'kotlin-annotation-processing-base' 2018-10-24 20:12:40 +03:00
Yan Zhulanow 1f6dbc74da Kapt: Restore constant identifiers for field annotations (KT-27334)
The old behavior broke after the refactoring of annotations with use-site targets.
2018-10-24 20:12:37 +03:00
Yan Zhulanow 0ae5d1c08f Kapt: Log annotation processor initialization time 2018-10-24 20:12:36 +03:00
Yan Zhulanow 6d017f07ad Kapt: Support androidx.annotation.RecentlyNullable annotations (KT-26725) 2018-10-24 20:12:35 +03:00
Yan Zhulanow ac1dd59472 Kapt: Fix anonymous type transformer, do not use ClassDescriptor.defaultType as a replacement (KT-27119) 2018-10-24 20:12:34 +03:00
Yan Zhulanow 39863edd0e Kapt: Use correct type mapping mode while mapping super types (KT-27126) 2018-10-24 20:12:32 +03:00
Yan Zhulanow f6bf35c1f5 Kapt: Fix error type correction for super class constructor calls 2018-10-24 20:12:31 +03:00
Yan Zhulanow ba53ba37b0 Replace bunch copies for some of build.gradle.kts files with a DSL 2018-10-24 20:12:30 +03:00
Yan Zhulanow 81cfc3e39f Kapt: Support symlinked Java source files (KT-26817) 2018-10-24 20:12:29 +03:00