Commit Graph

678 Commits

Author SHA1 Message Date
Yan Zhulanow 4f132f6d40 Kapt: Fix output file reporting in IC
Fix REPORT_OUTPUT_FILES option passing to GenerationState created in kapt.

This fixes these tests:
Kapt3Incremental.testChangeAnnotatedPropertyType()
Kapt3Incremental.testRemoveAnnotations()
Kapt3Incremental.testRemoveSourceFile()
2017-05-30 22:09:20 +03:00
Alexey Andreev 8a8fdf1968 Command-line tool for JS DCE 2017-05-26 18:20:17 +03:00
Yan Zhulanow 7220183912 Kapt: Write @kotlin.Metadata annotation to Java stubs #KT-17937 2017-05-25 21:28:47 +03:00
Yan Zhulanow 141f12e71b Minor: Commit forgotten kapt test data 2017-05-25 21:28:40 +03:00
Ilya Chernikov 9d2ae54d2c Introduce other JVM options inheritance for daemon 2017-05-24 10:52:38 +02:00
Yan Zhulanow 87f3b574aa Kapt: Filter the content root items for the compile classpath properly 2017-05-23 16:45:40 +03:00
Yan Zhulanow 5ec16167bc Kapt: Preserve parameter names for abstract methods 2017-05-23 16:45:29 +03:00
Yan Zhulanow 1a342faf38 Kapt3: Ignore packages with Java keywords inside (KT-17184) 2017-05-23 16:45:19 +03:00
Yan Zhulanow 1c5765628e Kapt3: Fix flaky integration tests on Windows agents 2017-05-23 16:45:14 +03:00
Mikhail Glukhikh d185adfedd Fix UAST test 2017-05-16 16:43:29 +03:00
Yan Zhulanow 5d31e00d27 Allopen, Gradle: Fix JPS build on Windows (KT-17830)
Appears that plugin classpath can contain not only `File.separatorChar`, but also '/' on Windows. Without the proper handling of this case, Gradle importer may import the plugin JAR made for Gradle with shaded 'com.intellij' and cause an exception during the JPS build.
2017-05-15 14:42:01 +03:00
Mikhail Glukhikh 768e0fa738 Add forgotten KotlinAbstractUElement.hashCode() 2017-05-12 22:27:58 +03:00
Dmitry Jemerov 8337cd455f Fix reporting exception problems on Kotlin UAST fields (KT-17714) 2017-05-06 08:18:08 +02:00
Mikhail Zarechenskiy 7541a3754d Move SAM constructors to synthetic scope 2017-05-05 21:30:35 +03:00
Yan Zhulanow 7bbf9861d0 Kapt3: Simplify handling of annotation processing exceptions
The previous handling method was unreliable ("Don't know how to render diagnostic of type KAPT3_PROCESSING_ERROR", exceptions being lost).
2017-05-04 19:59:30 +03:00
Yan Zhulanow 3bf534b392 Kapt3: Support apt modes
Allow to run kapt in "annotation processing only" and "stub generation only" modes in order to support incremental compilation in Gradle.
Unfortunately, annotation processing can't be done incrementally cause it uses all module files, but the stub generation can be done incrementally.
2017-05-04 19:00:41 +03:00
Yan Zhulanow 99a05f5d61 Kapt3: Convert reference to KMutableMap.Entry correctly (KT-17567) 2017-05-04 18:46:43 +03:00
Yan Zhulanow 254e8156ac NoArg: Initialize properties in noarg constructor (KT-16692) 2017-05-04 18:46:42 +03:00
Ilya Chernikov 5745752841 Ignore empty lines at the end of the testdata, more tests
should finally fix source-section plugin tests on windows
2017-05-03 18:11:47 +02:00
Pavel V. Talanov 55a0e138fc Refactor: extract AnnotationDescriptor.annotationClass utility 2017-05-02 15:40:20 +03:00
Pavel V. Talanov 0571c62943 KtLightElements: make light annotations lazier
Allow to get annotation list and to invoke `findAnnotation` without building delegate
Introduce KtLightNullabilityAnnotation which holds nullability information and is built
    before delegate is built
2017-05-02 15:40:17 +03:00
Alexander Udalov d8d3bafbe9 Introduce "-Xreport-output-files" to report source-output mapping for JPS
This makes "-verbose" not required for JPS to run correctly and
therefore allows to print more useful debugging stuff in the compiler
and read them in CLI, for example. The output will also be more readable
because there'll be no "output" messages
2017-04-28 20:49:28 +03:00
Alexander Udalov 7f5d87ea17 Rename PathUtil.getJdkClassesRoots to avoid confusion
Two of these methods return roots given a path to the JRE, and the third
one returns roots given a path to the _JDK_.
2017-04-27 20:35:14 +03:00
Yan Zhulanow 14fde339ef Minor: Fix Android JPS test 2017-04-27 18:52:12 +03:00
Yan Zhulanow 8354d25800 Android Extensions: Fix availability in Android/JPS projects (KT-17610) 2017-04-27 18:52:11 +03:00
Yan Zhulanow 63243b99fa Kapt3: Check if the 'tools.jar' is present in the plugin classpath (KT-17456)
Kapt3 won't work without the 'tools.jar' file provided, but we shouldn't throw an exception in this case.
This commit adds the warning message (and disables Kapt if it can't be used).
2017-04-27 18:52:10 +03:00
Yan Zhulanow 20e362e363 Kapt3: Do not generate "options not recognized" for "kapt.kotlin.generated" option (KT-17418)
"kapt.kotlin.generated" AP option is always present (and it's the way to say the arbitrary processors about the target directory for generated Kotlin source files).
In this commit, the "fake" empty annotation processor is added to consume the option if no other processor does it.
2017-04-27 18:52:09 +03:00
Vyacheslav Gerasimov 5f09e18394 Fix Android api issues reporting for generic collection method calls
#KT-16712 Fixed
2017-04-27 16:02:37 +03:00
Vyacheslav Gerasimov 386ec53dd5 Update AndroidTestCase to AS 2.3 + Android tests refactoring 2017-04-26 18:38:29 +03:00
Alexander Udalov 38ea9986ab Make KotlinType.isError extension instead of member 2017-04-26 18:10:49 +03:00
Ilya Chernikov af4caeaf24 Ignore empty lines at the end of the testdata, remove debug dump
should fix source-section plugin tests on windows
2017-04-24 16:50:19 +02:00
Dmitry Jemerov 49a211b3cd Ensure that UElement.nameIdentifier.containingFile is a real file
This is needed to report inspection problems on UAST elements.
2017-04-20 11:02:56 +02:00
Ilya Chernikov 731dcf5d6f minor: fix after faulty rebase 2017-04-19 15:22:15 +02:00
Ilya Chernikov c91a3f8bf0 Add sam-with-receiver and source-sections compiler plugins to maven
rename source-sections compiler plugin jar in the dist (add kotlin- prefix),
according to the agreed naming scheme for the artefacts. (The renaming of the
other plugins should follow.)
in addition configure proguard to retain VirtualFile members, since they
are used in the source-sections plugin
2017-04-19 15:22:15 +02:00
Dmitry Jemerov 03cef30717 Correctly honor expected type when converting string templates to UAST
#KT-17315 Fixed
 #KT-17316 Fixed
2017-04-19 11:46:13 +02:00
Vyacheslav Gerasimov 5b58a6f9e8 Add intentions Add/Remove/Redo parcelable implementation
#KT-17465 Fixed
#KT-12049 Fixed
2017-04-18 19:04:14 +03:00
Dmitry Jemerov dd4a5944f1 Delegate getContaingFile() for UAST declarations to Kotlin origin
This is required to be able to report inspection problems on such
elements.
2017-04-18 15:13:34 +02:00
Zalim Bashorov 9783a31779 Remove kotlin-reflect.jar dependency from util module and move reflectionUtil.kt closer to "clients"
Main goal is get rid of kotlin-reflect.jar from modules what required for minimal compiler.jar which can compile Kotlin only to JS to make it smaller.
2017-04-17 18:18:38 +03:00
Zalim Bashorov 51e84f7ce4 Move some script related part of frontend to separate module to avoid using kotlin-reflect.jar in frontend module
Main goal is get rid of kotlin-reflect.jar from modules what required for minimal compiler.jar which can compile Kotlin only to JS to make it smaller.
2017-04-17 18:18:35 +03:00
Alexander Udalov f4b6db4dc0 Change format of -X arguments to require value after '='
Report a warning when an argument is passed in the old form (with the
whitespace)

 #KT-17264 Fixed
2017-04-14 20:07:54 +03:00
Mikhael Bogdanov 3df32ad425 Add flag for dex verification 2017-04-13 19:04:45 +02:00
Mikhael Bogdanov df65b3f6b3 Refactor test framework to process directives in one place
Perform directive processing in base test class
2017-04-13 19:04:44 +02:00
Alexander Udalov c2f275faec Refactor codegen test utilities
Use GenerationUtils.compileFiles instead of
CodegenTestUtil.generateFiles
2017-04-13 19:04:43 +02:00
Vyacheslav Gerasimov d8fdd04e7f Remove custom lint detectors registration from kotlin lint
#KT-14970 Fixed
2017-04-12 19:23:43 +03:00
Alexander Udalov 861d9a1620 Use null instead of CompilerMessageLocation.NO_LOCATION in MessageCollector 2017-04-11 12:08:31 +03:00
Yan Zhulanow 3ee65ac499 Kapt: Support specifying javac options (KT-17245) 2017-04-10 22:48:17 +03:00
Vyacheslav Gerasimov 107879a78a Implement getTypeElement for UastKotlinPsiVariable
#KT-16849 Fixed
2017-04-10 12:40:33 +03:00
Vyacheslav Gerasimov 1d134ffc72 Register Android api quickfixes for inlined api inspection
#KT-14857 Fixed
2017-04-10 12:39:40 +03:00
Pavel V. Talanov 4f701285b1 Light class builder: do not generate methods delegating to DefaultImpls in kotlin classes
Class APIs from java point of view stays the same so we can avoid generating those methods
Otherwise we have to calculate all supertypes when getMethods() is called,
    which imposes severe performance penalties
We have to pretend these methods are not 'abstract' (also we consider them 'default' for safety)
    so java highlighting does not report "class should be abstract" for all inheritors
We have to manually report "class should be abstract" on some of the java inheritors,
    specifically those that are implementing interfaces directly
	    as opposed to extending kotlin classes implementing those interfaces
2017-04-09 15:09:01 +03:00
Ilya Chernikov 30048f8f49 Fix CRLF handling in source-sections plugin 2017-04-06 10:02:49 +02:00