Commit Graph

1832 Commits

Author SHA1 Message Date
Nicolay Mitropolsky ce40bfb259 191: Uast: making KotlinUObjectLiteralExpression provide a proper referenceNameElement (KT-30534) 2019-03-21 19:56:47 +03:00
Ilya Chernikov c56382a62b Move common idea and compiler parts of the scripting plugin to the new jar 2019-03-21 12:02:29 +01:00
Nicolay Mitropolsky 713f73e414 Uast: getMaybeLightElement returns class for annotation primary constructor 2019-03-21 12:46:28 +03:00
Nicolay Mitropolsky 7b590055f8 Uast: resolveCallToDeclaration cleanup 2019-03-21 12:46:27 +03:00
Nicolay Mitropolsky 90894176f9 Uast: stop resolve parts of fqn to the full-name target 2019-03-21 12:46:27 +03:00
Ilya Chernikov fc9a6dec7e Add optional suffix to the script template markers
add suffix to the markers in the repo
#KT-28593 fixed
2019-03-20 21:19:24 +01:00
Vyacheslav Gerasimov fc8be48fa8 Build: Improve intellij-sdk repo up-to-date check time & layout
Up-to-date check is very heavy for intellij repo due to artifact size.
If module directory in repo is written only by one task we can assume
that task if up-to-date if target directory exists.
2019-03-20 21:29:13 +03:00
Jake Wharton 8e23555660 Make parcelize a non-experimental feature
It was already being added to the feature list by default, but was only enabled when isExperimental was true.
2019-03-20 20:52:23 +03:00
Yan Zhulanow c7678a27e5 Kapt: Fix star indentation in stub Javadoc (KT-30163) 2019-03-20 20:52:23 +03:00
Yan Zhulanow e4d758b614 Kapt: Support default constant values for constructor parameters 2019-03-20 20:52:23 +03:00
Yan Zhulanow 10e53a2e73 Kapt: Move out the 'final' fallback for initial field values 2019-03-20 20:52:22 +03:00
Yan Zhulanow cce2b472bf Kapt: Generate constant value initializers for mutable properties (KT-30164) 2019-03-20 20:52:22 +03:00
Yan Zhulanow ce13982cfc Kapt: Use constant value references where possible in property initializers 2019-03-20 20:52:22 +03:00
Yan Zhulanow 66754e62da Kapt: Always use raw types for annotation parameter types (KT-30346) 2019-03-20 20:52:22 +03:00
Ivan Gavrilovic b2ad82b7d2 Incremental KAPT - invalidate obsolete types
Once set of dirty symbols is computed, filter these types
when they are requested from the JavaFileManager. This is accomplished
by tracking all declared types in the sources and generated sources.
It is not necessary track types in generated class files, as these will
be removed before the APs are incrementally run.

Motivation: APs (e.g. Dagger) may use Elements.getTypeElement(String)
to determine if type is already present, and if it is, they will not
generate it. Therefore, whenever generated sources is invalidated, types
it defines need to be filtered in the JavaFileManager.

Issue is https://youtrack.jetbrains.com/issue/KT-23880
2019-03-20 16:43:13 +03:00
Ivan Gavrilovic 2f3d234516 Incremental KAPT - handle inherited annotations
Handle annotations with @Inherited. This is important for
the aggregating APs, as the current implementation passes all sources
annotated with claimed aggregating annotations.

Issue is https://youtrack.jetbrains.com/issue/KT-23880
2019-03-20 16:43:10 +03:00
Ivan Gavrilovic 9f14daa682 Incremental annotation processing with KAPT
Add support for incremental annotation processors in KAPT. These
processors conform to https://docs.gradle.org/current/userguide/java_plugin.html#sec:incremental_annotation_processing
specification.

Support is provided by using javac compiler APIs and
recording the source file structure. At runtime, processors
are instrumented with custom Filer that is used to keep track of generated
files. In order to support classpath changes, stub generation task is
used to generated a list of changed FQCNs, and this is simply used by KAPT.
Both worker and non-worker mode are supported.

 #KT-23880
2019-03-20 16:43:02 +03:00
Nicolay Mitropolsky 0d2426b081 191: Uast: isJvmElement check added to the newly added conversion methods (EA-125791) 2019-03-19 12:24:44 +03:00
Mikhael Bogdanov 20da778046 Add default values to KotlinTypeMapper constructor, remove them from call sites
~
2019-03-05 20:34:25 +01:00
Mikhael Bogdanov cc0c3b1592 Specify default value for irBackend 2019-03-05 20:33:35 +01:00
Nicolay Mitropolsky f664499708 Uast: getMaybeLightElement cleanup 2019-03-05 14:30:08 +03:00
Nicolay Mitropolsky ec1badf60d Uast: testing resolve for method called on variables of parametrized types 2019-03-05 14:30:08 +03:00
Nicolay Mitropolsky 5268cd4663 Uast: type-parameter references resolves to type-parameters 2019-03-05 14:30:07 +03:00
Nicolay Mitropolsky ec26ea4e36 Uast: TypeReferences log test added 2019-03-05 14:30:07 +03:00
Nicolay Mitropolsky adb13b2f9e Uast: ResolveEverythingTest tests for generics added 2019-03-05 14:30:07 +03:00
Nicolay Mitropolsky 337f16194a Uast: resolving references to local function declarations 2019-03-05 14:30:07 +03:00
Nicolay Mitropolsky 72860fb695 Uast: making KotlinUSimpleReferenceExpression able to resolve to types 2019-03-05 14:30:07 +03:00
Nicolay Mitropolsky e1e1e53e4a Uast: setup for KotlinUastResolveEverythingTest 2019-03-05 14:30:07 +03:00
Ilya Chernikov e99715cf82 Extract extra imports provision into an extension, implement one ...
for script in the plugin, drop direct dependency on scripts from
FileScopeFactory
2019-03-02 08:10:17 +01:00
Ilya Chernikov 57ac149f5b Extract script cli evaluation to the plugin 2019-03-02 08:10:17 +01:00
Ilya Chernikov 7c3bdde102 Fix sequence of the script definitions search - explicit ones should be tried first 2019-03-02 08:10:16 +01:00
Ilya Chernikov 196e274929 Move calculating dependencies from script sources to plugin 2019-03-02 08:10:16 +01:00
Ilya Chernikov 336f43dbf2 Reorganize files and folders in the scripting plugin 2019-03-02 08:10:16 +01:00
Ilya Chernikov adb4d264ec Move script definition extraction functions to the plugin
plus finish refactoring of these functions
2019-03-02 08:10:16 +01:00
Nicolay Mitropolsky 815fcd062d Uast: caching isJvmElement if all modules are Jvm (KT-28564) 2019-03-01 20:14:57 +03:00
Nicolay Mitropolsky 9c674cb7c3 Uast: support for KtDelegatedSuperTypeEntry (KT-30033) 2019-03-01 15:00:31 +03:00
Natalia Selezneva 869fb46c0b Optimize KotlinUFunctionCallExpression.isAnnotationArgumentArrayExpression 2019-02-28 10:59:12 +03:00
Vyacheslav Gerasimov a42f607ecf Build: Fix artifacts signing for maven central
With gradle > 5.0 `publish()` helper call should be done before
`noDefaultJar()` or any other artifact hacks, otherwise singing plugin doesn't sign any jars
2019-02-27 13:21:17 +03:00
Nicolay Mitropolsky e0e5009f3f 191: Uast: StringTemplateComplexForUInjectionHost testdata fix 2019-02-25 19:24:51 +03:00
Leonid Startsev 472d91e0de Do not return whole list of generated property descriptors for type
arguments' serializers when only one name is needed.

Fixes https://github.com/Kotlin/kotlinx.serialization/issues/383
2019-02-25 19:21:29 +03:00
Nicolay Mitropolsky f9813af3ff 191: Uast: KotlinUSimpleReferenceExpression bunch fix 2019-02-25 18:13:18 +03:00
Nicolay Mitropolsky 5786ab5140 Uast: making KotlinClassViaConstructorUSimpleReferenceExpression also handle deserialized descriptors 2019-02-25 16:35:46 +03:00
Nicolay Mitropolsky 25e00c9079 Uast: making KotlinClassViaConstructorUSimpleReferenceExpression resolve to class in case of SAM (KT-28272) 2019-02-25 16:35:46 +03:00
Nicolay Mitropolsky d7584df01b Uast: making ULambdaExpression.functionalInterfaceType return non-null values for explicitly typed SAM-s with Java interfaces (KT-28272) 2019-02-25 16:35:46 +03:00
Yan Zhulanow ea462091c4 Support new convention for local variables name mangling: '$receiver' -> '$this$<label>' (KT-26913) 2019-02-25 14:43:53 +03:00
Nicolay Mitropolsky 6b792c36f0 KotlinUastApiTest: using kfail alias 2019-02-25 12:26:22 +03:00
Nicolay Mitropolsky 712c897472 Uast: fix for UVariables missing typeReferences 2019-02-25 12:26:21 +03:00
Nicolay Mitropolsky 98740138f3 Uast: yet another check for invalid context before resolve (EA-137191, EA-137193) 2019-02-25 12:26:21 +03:00
Nicolay Mitropolsky bd0c6736ce Uast: implementing specific javaPsi for UVariables 2019-02-25 12:26:21 +03:00
Nicolay Mitropolsky 7dc818d42b 191: KotlinUastApiTest.kt missed bunch aligning fix 2019-02-25 12:26:21 +03:00