Commit Graph

3393 Commits

Author SHA1 Message Date
Ilya Gorbunov 2db8714fc5 Fix null values being treated as missing in 'put' method of a specialized string-keyed map 2017-04-19 18:32:47 +03: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
Sergey Igushkin 2360d5f330 Changed to prepending annotation processor path instead of appending it
to classpath and existing annotation processors.
2017-04-19 16:06:55 +03:00
Ilya Gorbunov 59dc0f57fc Clarify copyRecursively behavior in case of a single file. 2017-04-18 21:26:55 +03:00
Shaun Reich 7ebd86725f Fix FileTreeWalk doc typo/grammar 2017-04-18 21:26:53 +03:00
Ilya Gorbunov ea18282f4c Minor: reformat docs to distinguish summary 2017-04-18 21:26:52 +03:00
Ilya Gorbunov 37c3d8f204 Sort out warnings related to inline and library functions in stdlib-js 2017-04-18 18:51:20 +03:00
Ilya Gorbunov 6ae19e03d5 Clean warnings and refactor stdlib tests.
Merge RangeJVMTest into RangeTest.
2017-04-18 18:51:20 +03:00
Ilya Gorbunov cb186aabf9 Another workaround for IDEA shared source root limitation 2017-04-18 18:51:20 +03:00
Ilya Gorbunov 4a5d8534c1 Fix array iterators to adhere to Iterator contract
#KT-17453 Fixed

Change expected exceptions in tests.
2017-04-18 18:51:20 +03:00
Ilya Gorbunov f22375601b Remove unneeded suppressions 2017-04-18 12:47:11 +03:00
Ilya Gorbunov 8f452ed046 Cleanup warnings in stdlib and generated code 2017-04-18 12:47:04 +03:00
Ilya Gorbunov 6af986cfdd Refactor serialization tests and move them to test/io package
Add tests for singleton deserializing.
2017-04-18 12:46:52 +03:00
Sergey Mashkov 96160606ba Maven: KT-15050 setup logger so IDEA's core could log error
Introduce system property kotlin.compiler.X.enable.idea.logger=true
The reason is that I suspect that the error is somewhere at com.intellij.ide.plugins.PluginManagerCore#loadDescriptorFromJar but unfortunately default logger doesn't log messages at "info" log level so we can't see why exactly does it fail.
Users can enable IDEA's logger to see more details.
2017-04-18 12:31:39 +03:00
Alexander Udalov 7a25af0f2f Fix NPE caused by KotlinCompileMojoBase if no "Xcoroutines" value is passed
NPE was happening in CLICompiler.chooseCoroutinesApplicabilityLevel
2017-04-17 18:40:35 +03: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
Alexander Udalov 027b83a252 Minor, pass coroutines state explicitly in maven plugin 2017-04-17 15:51:43 +03:00
Ilya Gorbunov 723642c9d4 binary-compatibility-validator: depend on required artifacts to ensure they are built.
Read dumped declarations lazily in order not to fail on class initialization.
2017-04-17 15:17:02 +03:00
Ilya Gorbunov 94895c4e4d Clean warnings in binary-compatibility-validator cases 2017-04-17 14:50:07 +03:00
Alexander Udalov ae1fb16fe8 Fix compilation of kotlin-gradle-plugin 2017-04-17 11:51:08 +03:00
Alexander Udalov 10f2e9d33a Revert usages of -X arguments to old form in some places
We use the old compiler in Gradle build and in GradleFacetImportTest, so
some changes in f4b6db4 should not have been made yet
2017-04-17 11:33:58 +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
Sergey Mashkov a22ed0f7c0 Maven: minor: fix comment 2017-04-14 13:27:08 +03:00
Sergey Mashkov 2521dacc25 Maven: KT-17093 Import from maven: please provide a special tag for coroutine option 2017-04-14 13:27:06 +03:00
Sergey Mashkov 5010047b1b KT-16283 Maven compiler plugin warns, "Source root doesn't exist" 2017-04-14 13:27:05 +03:00
Sergey Mashkov 40a5e646c6 KT-10028 Support parallel builds in maven
mark all the mojos as not thread safe so Maven should never run them in parallel
2017-04-14 13:27:05 +03:00
Sergey Mashkov 307fdd1024 KT-16762 Maven: JS compiler option main is missing 2017-04-14 13:27:04 +03:00
Sergey Mashkov 6de0d79a78 KT-16743 Update configuration options in Kotlin Maven plugin
deprecate parameters module and testModule
2017-04-14 13:27:04 +03:00
Sergey Mashkov de35863b57 KT-16743 Update configuration options in Kotlin Maven plugin
add javaParameters configuration parameter
2017-04-14 13:27:03 +03:00
Sergey Mashkov e6b729d38b KT-16743 Update configuration options in Kotlin Maven plugin
deprecate parameters module and testModule
2017-04-14 13:27:02 +03:00
Alexander Udalov 7fe9b99087 Support different target platforms for modules in AnalyzerFacade
Instead of reusing the same AnalyzerFacade that is used for resolution
of a module to resolve its dependencies, analyze each dependency
module/library with a facade depending on its target platform. Introduce
and use CommonLibraryDetectionUtil in addition to
KotlinJavaScriptLibraryDetectionUtil, to detect common libraries (with
.kotlin_metadata files).

Note that before multi-platform projects, this was not needed because
there were only two platforms (JVM and JS), and JVM module had only JVM
modules/libraries as dependencies, JS module had only JS
modules/libraries as dependencies. Now, for example, a JVM module can
have a common module/library as a dependency, and it would be incorrect
to analyze that dependency with JvmAnalyzerFacade because that facade
does not know anything about .kotlin_metadata files.

The changes in Dsl.kt and KotlinCacheServiceImpl.kt are needed because
PsiElement.getJavaDescriptorResolver, called from some IDE code, started
to fail on a common module, because the container for a common module
does not have the JavaDescriptorResolver
2017-04-14 00:44:00 +03:00
Alexey Tsvetkov c41818b6a7 Minor: use JDK_18 instead of JAVA_HOME to run Maven IC tests 2017-04-13 21:53:28 +03:00
Alexey Tsvetkov 753c99a377 Wrap getDaemonConnection in try-catch
Just in case it would throw one day
2017-04-13 21:53:28 +03:00
Alexey Tsvetkov 6b315259d3 Fix "Unexpected message" from daemon when CompilerMessageLocation is null
Recently the CompilerMessageLocation.NO_LOCATION was replaced with a null value.
This caused daemon clients to report "Unexpected message" for compiler messages without location.
2017-04-13 21:53:28 +03:00
Alexey Tsvetkov e160931ec5 Delete daemon client file when Gradle process stops
#KT-17177 fixed
2017-04-13 21:53:28 +03:00
Alexey Tsvetkov 34a8896ad4 Minor: rename test KotlinDaemonAdvaced->KotlinDaemonIT 2017-04-13 21:53:28 +03:00
Ilya Chernikov aaeb53fb8b Fix compiler client test after introducing nullable CompilerMessageLocation 2017-04-12 11:51:02 +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
Sergey Igushkin 8cdb08cbfe Fixed duplicated kapt options caused by multiple call to args setup
Separated kapt args from other plugin options.

Issues: #KT-16965 Fixed

Fix indentation
2017-04-10 20:59:23 +03:00
Sergey Igushkin ea3adb0629 Implemented resolving the compiler jar using the class loader
Added resolving the compiler jar using the class loader urls as the
first step with the fallback to the original resolution method. Also
helps if the compiler is not present in the classpath dependencies.

Issues: #KT-16580 Fixed

Changed to getting plugin version from the applied plugin instead of
the plugin JAR name.

Removed unnecessary working with version of AbstractKotlinPlugin.
2017-04-10 20:55:19 +03:00
Sergey Igushkin bda59e58d5 Filling in and reverting annotationProcessor
Added reverting processor path back.
Appending processor path instead of setting it.

Issues: #KT-17255 Fixed

(cherry picked from commit 843844b)

Added a test checking that -processorpath is set for all Gradle versions
2017-04-10 20:50:34 +03:00
Sergey Igushkin 64278a06cc Refactoring in AnnotationProcessingManager.kt. 2017-04-10 20:45:03 +03:00
Sergey Igushkin 80daae90e3 Partial fix for the processor path not being set up properly.
Issues: #KT-17255
2017-04-10 20:44:12 +03:00
Ilya Gorbunov e9c47d6498 Minor: validate required environment variables are set. 2017-04-10 19:46:06 +03:00
Ilya Gorbunov 37e046f6cd Provide shortcuts for producing quick compiler for maven and rebuilding stdlib-js from ant. 2017-04-10 19:46:06 +03:00
Ilya Gorbunov afba967fcf Use kotlin-stdlib.jar instead of kotlin-runtime.jar as runtime during build 2017-04-10 19:46:06 +03:00
Dmitry Jemerov 406714a1f4 Remove warning for running the compiler under Java 6/7
Now the compiler won't even start, so no need to check this manually.
2017-04-10 17:30:03 +02:00
Alexey Tsvetkov 0a42a1c104 Minor: fix maven IC tests with custom local repository 2017-04-08 21:14:49 +03:00
Ilya Gorbunov e7dc7ec005 Rebuild sources for kotlin-daemon-client and compiler-client-embeddable in maven build
Do not build these sources in ant.
Do not require them as artifact dependencies.
2017-04-08 19:07:54 +03:00