Alexander Udalov
2ed027219c
Remove dependency of module 'frontend' on 'plugin-api'
...
This breaks the circular dependency between them
2017-06-06 14:29:25 +03:00
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
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
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
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
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
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
Alexander Udalov
38ea9986ab
Make KotlinType.isError extension instead of member
2017-04-26 18:10:49 +03:00
Alexander Udalov
c2f275faec
Refactor codegen test utilities
...
Use GenerationUtils.compileFiles instead of
CodegenTestUtil.generateFiles
2017-04-13 19:04:43 +02: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
Dmitry Jemerov
f9495aa0d7
Introduce and use KotlinPaths.getStdlibPath()
...
Also support renaming .jar file when updating an existing library
2017-04-04 11:21:06 +02:00
Yan Zhulanow
f1e303e18d
Minor: Update kapt tests for Kotlin 1.1
2017-03-22 22:03:21 +03:00
Yan Zhulanow
e93bc4c00d
Kapt3, minor: Enable parameter name saving in javac ClassReader
2017-03-22 22:03:19 +03:00
Yan Zhulanow
bb0a46ac17
Kapt3: Ignore inner classes with clashing names (KT-16458)
...
Ignore classes (and references to such classes in declaration signatures) if one of the containing classes has the same simple name. This is forbidden in Java, thus should not be present in kapt source stubs.
2017-03-22 22:02:30 +03:00
Yan Zhulanow
47ab47d6d1
Kapt3: Support 'processors' option in the compiler plugin (KT-8558)
...
Support specifying qualified names of annotation processors in the kapt3 compiler plugin (feature-parity with javac).
2017-03-22 22:02:27 +03:00
Mikhail Glukhikh
b121bf8802
Cleanup: fix some compiler warnings (mostly deprecations, javaClass)
2017-03-15 17:35:31 +03:00
Yan Zhulanow
131570080d
Kapt3: Generate import statements in stubs
2017-02-08 19:01:17 +03:00
Yan Zhulanow
69a063b0b2
Kapt3: Serialize annotation processor options to base64 to support spaces in option values
2017-02-08 19:01:16 +03:00
Yan Zhulanow
8479618632
Kapt3: Invoke integration tests with the Kotlin runtime in the compile classpath (this fixes integration tests, nullability annotations from org.jetbrains were not found)
2017-02-08 19:01:15 +03:00
Yan Zhulanow
823781ea6c
Kapt3: "$annotations" are not always ACC_PRIVATE now (see also KT-15993)
2017-02-08 19:01:14 +03:00
Yan Zhulanow
2553513205
Kapt3: Allow users to disable error type correction (and now it's disabled by default)
2017-02-08 19:01:13 +03:00
Yan Zhulanow
297f8d4161
Kapt3: Use the javac's finalCompiler log to determine if there were any annotation processing errors (KT-16176)
2017-02-08 19:01:13 +03:00
Yan Zhulanow
62092f31cc
Minor: Update test data because of KT-15697
2017-02-08 19:01:12 +03:00
Yan Zhulanow
de3cb4567f
Minor: Remove obsolete JAVA_FILE_PARSING_ERROR constant, fix corresponding test
2017-02-08 19:01:11 +03:00
Yan Zhulanow
08b98f7133
Kapt3: Ignore declarations with illegal Java identifiers (KT-16153)
2017-02-08 19:01:10 +03:00
Yan Zhulanow
7296d9cb7c
Kapt3: Fix working in verbose mode (NPE in JavacFiler.java:597) (KT-16146)
2017-02-08 19:01:09 +03:00
Yan Zhulanow
43a377d3e1
Kapt: Fix error messages map name
2017-02-08 19:01:08 +03:00
Yan Zhulanow
1819194a4c
Kapt3: Allow annotations with Kotlin-only targets, such as PROPERTY (KT-15697)
2017-02-08 19:01:07 +03:00
Yan Zhulanow
6ded5939eb
Kapt: Fix javac error reporting in Kotlin daemon, also fix parsing error reporting (KT-15524)
2017-02-08 19:01:06 +03:00
Yan Zhulanow
cde7cb1076
Kapt3: Write Intellij annotations (NotNull/Nullable) to stubs
2017-02-08 19:01:05 +03:00
Yan Zhulanow
feb5397f6f
AllOpen, NoArg: Refactoring, support presets in order to hold special annotations for Spring and JPA in one place
2017-02-08 17:36:19 +03:00
Yan Zhulanow
1b337e1a48
Generate enum values with bodies properly (KT-15803)
2017-01-30 20:13:08 +03:00
Yan Zhulanow
18e0baa13e
Kapt: Allow empty .kt files list in kapt in order to support kapt with Java-only source files. (KT-15675)
2017-01-30 20:13:08 +03:00
Dmitry Jemerov
2c1c3d1f31
Workaround for compilation issue: don't use a Java shim to access token name, use toString() instead (for all relevant tokens, it will return the name, and for all others, the return value won't match the Java keyword filter regexp)
2017-01-27 13:32:20 +01:00
Yan Zhulanow
3b4a8e0f33
Kapt3: Write qualified name of classes on error type conversion, handle declaration-site variance properly.
2017-01-27 01:20:01 +09:00
Yan Zhulanow
72bbf9697b
Kapt3: As javac now reads stubs from Java files, not from AST, we should provide the valid names for all identifiers (at least names should not clash with Java keywords).
...
Rename identifiers if it clashes with Java keywords. (KT-15838)
2017-01-27 01:20:01 +09:00
Yan Zhulanow
e28b4dfbc7
Kapt3: Do not check type for star projection, it causes the infinite recursion. Also limit recursion depth to 10. (KT-15841)
2017-01-27 01:20:00 +09:00
Yan Zhulanow
ec291455fa
Kapt3: Replace error/NonExistentClass with the actual type (from PSI) (KT-15421)
2017-01-15 22:11:11 +09:00
Mikhael Bogdanov
2931c316a3
Fix for KT-15575: VerifyError: Bad type on operand stack
...
#KT-15575 Fixed
2017-01-11 11:50:33 +01:00
Mikhail Zarechenskiy
6cccad9647
Update year in license and regenerate tests
2017-01-10 12:01:17 +03:00
Yan Zhulanow
78a3dae314
Kapt3: Always write Kotlin stubs to .java files, and make javac always parse them from source files, not from JCTree (in order to support incremental compilation).
2016-12-28 22:28:35 +03:00