Commit Graph

38378 Commits

Author SHA1 Message Date
Sergey Mashkov 007408c792 Maven: rename completion providers 2017-04-14 13:27:09 +03:00
Sergey Mashkov c890200f08 Maven: show non-stable language/api versions only in internal mode 2017-04-14 13:27:08 +03:00
Sergey Mashkov a22ed0f7c0 Maven: minor: fix comment 2017-04-14 13:27:08 +03:00
Sergey Mashkov 711398f14f Maven: eliminate constants in maven.xml 2017-04-14 13:27:07 +03:00
Sergey Mashkov a427248969 Maven: add more plugin parameters IDE support 2017-04-14 13:27:07 +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
Alexey Andreev e182290f54 Fix sorting of source files before compilation.
This should fix unstable generated JS between recompilations.
2017-04-14 11:46:52 +03:00
Mikhael Bogdanov a35ad64454 Disable reflection tests on android 2017-04-14 10:33:13 +02: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
Alexander Udalov 722687acd6 Refactor multiplatform test cases in MultiModuleHighlightingTest
Groupt multiplatform test cases in a nested class, get rid of duplicated
code, rename "header" -> "common" where it relates to the common module
2017-04-14 00:43:59 +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
Mikhael Bogdanov a6c9cf7d3f Minor. Cleanup code 2017-04-13 19:04:47 +02: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
Mikhael Bogdanov 7613ec54f5 Add run configuration to run common java backend tests under jdk 9
With jvmTarget 1.6 and 1.8
2017-04-13 17:54:39 +02:00
Mikhael Bogdanov a8382c25b2 Add run configuration to run common java backend tests on jdk 8 with jvm target 1.8 2017-04-13 17:54:38 +02:00
Mikhael Bogdanov 806db3852d Support for custom default jvmTarget in jvm backend tests 2017-04-13 17:54:37 +02:00
Mikhael Bogdanov 2bb5b3881a Run dex checker only on java 6 files 2017-04-13 17:54:36 +02:00
Mikhael Bogdanov 73d771717c Don't assign classFileFactory outside generateClassesInFile
Otherwise dex cheker wouldn't be called
2017-04-13 17:54:35 +02:00
Alexey Andreev 5c1882bfcc Unmute test that passes 2017-04-13 17:33:15 +03:00
Dmitry Petrov e0ebaac70c Perform additional checks on catch parameter declaration
KT-8320 It should not be possible to catch a type parameter type
KT-7645 Prohibit default value for `catch`-block parameter
2017-04-13 16:23:17 +03:00
Dmitry Petrov 5ccfbcbe22 KT-4960 Redeclaration is not reported for type parameters of interfaces
When resolving a class body for a class without a primary constructor
(e.g., an interface), no checks were performed for redeclarations
in the corresponding class header.
Creating & initializing a lexical scope of an appropriate kind will do it.
Note that since class has no primary constructor, only type parameters
could be redeclared (and that's KT-4960).
2017-04-13 15:57:24 +03:00
Alexander Udalov eb0c0a8869 Fix incorrect logic in KotlinJavaScriptLibraryDetectionUtil
Previously the lambda almost always returned false, because the library
root is never a JS file with metadata, which led to
processFilesRecursively always returning false, which led to every
library being detected as a Kotlin/JS library here
2017-04-13 14:39:07 +03:00
Nikolay Krasko 01782fb4b9 Fix build: restore lost imports 2017-04-13 14:30:17 +03:00
Alexander Udalov bbdff8c7ce Move DeclarationDescriptor.substitute to separate interface Substitutable
To get rid of pointless/confusing implementations in ModuleDescriptor,
PackageViewDescriptor, TypeParameterDescriptor and others.

Note that there are still implementations that do not make sense, for
example in those subclasses of VariableDescriptor which are not also
subclasses of CallableMemberDescriptor (e.g. ValueParameterDescriptor).
Those can be removed by making CallableMemberDescriptor (instead of
CallableDescriptor) inherit from Substitutable. However, that would
require more changes in the compiler because CallableDescriptor is used
rather often in places where in fact only CallableMemberDescriptor
instances can appear.

Explicit return types and casts are required in some places now because
there's no single non-trivial supertype for
ClassifierDescriptorWithTypeParameters and CallableDescriptor.
Previously it was DeclarationDescriptorWithVisibility, now it's both
that and Substitutable<...>
2017-04-13 14:16:07 +03:00
Nikolay Krasko 9f037c3c62 Minor: remove warnings caused by ExtensionPointName.create nullability 2017-04-13 13:48:03 +03:00
Nikolay Krasko baa75fc8d5 Refactoring: move OptionsParser to separate file 2017-04-13 13:48:02 +03:00
Nikolay Krasko fa22a5c3a4 Minor: clean warnings in AbstractSearcherTest.java 2017-04-13 13:48:02 +03:00
Nikolay Krasko 65c1a2d732 Minor: extract common method to base class 2017-04-13 13:48:02 +03:00
Nikolay Krasko 9748c7d068 Refactoring: move operators searchers to separate package 2017-04-13 13:48:02 +03:00
Kirill Rakhman d44bf27ec3 Completion of keywords (like constructor) doesn't insert parentheses/braces if they're already there
#KT-15603 Fixed
 #KT-13524 Fixed
2017-04-13 13:41:41 +03:00
Zalim Bashorov 56d3f90a02 Don't log content of module.xml when Logger is not initialized
When Logger is not initialized it returns default logger which prints to stdout and stderr,
so it can lead to different results when run CLI tests locally and on TC.
2017-04-13 13:16:32 +03:00
Alexey Andreev 43c084fde3 Simplify coroutine generation in JS backend
Stop making aliasing suspend function descriptor with reference to
instance of state machine. This may cause problems in some cases,
for example, when compiling recursive suspend function. See KT-17281.
Instead, make alias for synthetic continuation parameter. This
additionally required some refactoring, e.g. *always* generating
continuation parameter during codegen.
2017-04-13 12:56:34 +03:00
Ilya Chernikov f4a4a41525 Restore parts of the template resolving code in the compiler...
that was moved to the script-runtime, that it a row caused the incompatibility
with old GSK implementations. Now the legacy template resolving related code
is restored, marked obsolete and wrapped for compatibility with the new code.
2017-04-12 19:48: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
Dmitry Jemerov 2a8933e5a0 Run all Gradle import tests with Gradle 3.5 2017-04-12 15:37:44 +02:00
Alexander Udalov 27c3155ce3 Refactor AnalyzerFacade.setupResolverForProject for better readability 2017-04-12 14:22:34 +03:00
Alexander Udalov f594a4c018 Drop ModuleDescriptor.sourceKind, move this code to IDE modules
This information is only used in IDE and it can easily be computed there
2017-04-12 14:22:34 +03:00
Ilya Chernikov aaeb53fb8b Fix compiler client test after introducing nullable CompilerMessageLocation 2017-04-12 11:51:02 +02:00