Alexey Sedunov
b229eeeb47
Move: Prevent running refactoring helpers on partial move
...
It may lead to some imports being wringly removed
due to their references being unresolved yet
Also fix NPE on package rename via directory move
2017-04-17 23:00:10 +03:00
Alexey Sedunov
aa0f0ef02d
Presentation: Do not use resolve to compute element description
...
Invoking analysis on EDT may degrade editor performance
2017-04-17 23:00:08 +03:00
Alexey Sedunov
8df502de84
Move To Upper Level: Fix target package computation
...
#KT-13466 Fixed
2017-04-17 23:00:07 +03:00
Alexey Sedunov
fc33d89e28
Move Member out of Companion: Improve conflict checking
...
Also do not show conflict dialog under write action
2017-04-17 23:00:06 +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
Zalim Bashorov
f32fcd4ec1
Minor: remove temporary prefix from KotlinScriptExternalImportsProvider.kt
...
Rename was required to preserve git history of original file (see previous commit).
2017-04-17 18:18:36 +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
Zalim Bashorov
05c3e7e81d
Don't export kotlin-reflect form util module and add it explicitly where it's required.
...
Also, remove kotlin-reflect form container 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:31 +03:00
Zalim Bashorov
465582c15b
Minor: remove unused UserDataHolderImpl
2017-04-17 18:18:30 +03:00
Mikhail Zarechenskiy
32f609ceee
Check lambda parameter for name shadowing
...
#KT-5160 Fixed
2017-04-17 17:12:44 +03:00
Mikhael Bogdanov
708bfdbd5f
Generate line numbers for function call parameters
...
Before this fix line numbers for function call arguments were not generated,
so if argument was on another line than function call it was
impossible to stop on argument line during debugging.
Now line number for each argument is generated if necessary
(another line than function call line).
#KT-17144 Fixed
2017-04-17 16:09:59 +02:00
Mikhail Zarechenskiy
b60efab62e
Fix using qualified this with labeled function literals
...
#KT-9251 Fixed
2017-04-17 16:21:07 +03:00
Mikhail Zarechenskiy
b17b3f4c63
Resolve local function parameters with function inner scope
...
This allows to use type parameters and value paramters in default value expressions
#KT-7984 Fixed
#KT-7985 Fixed
2017-04-17 16:21:06 +03:00
Mikhail Zarechenskiy
e86d52b681
Fix return type of private members that return anonymous object
...
#KT-16813 Fixed
Anonymous objects returned from private-in-file members should behave as for private class members
2017-04-17 16:21:05 +03:00
Mikhail Zarechenskiy
44170f3357
Fix typo in DSL marker message
...
#KT-17318 Fixed
2017-04-17 16:21:04 +03:00
Mikhail Zarechenskiy
1fbd8f3f53
Support automatic labeling for infix calls
...
#KT-8877 Fixed
2017-04-17 16:21:03 +03:00
Mikhail Zarechenskiy
6a352bccb6
Resolve control label locally when label name clashes with fun name
...
#KT-5354 Fixed
#KT-15085 Fixed
2017-04-17 16:21:02 +03:00
Mikhail Zarechenskiy
1c3f546319
J2K: convert & prettify LabelResolver
2017-04-17 16:21:01 +03:00
Mikhail Zarechenskiy
9ebbb73487
J2K: rename LabelResolver
2017-04-17 16:21:00 +03:00
Alexander Udalov
027b83a252
Minor, pass coroutines state explicitly in maven plugin
2017-04-17 15:51:43 +03:00
Alexander Udalov
dc5e51f4ac
Do not parse/serialize additional compiler arguments in JPS
...
This is mostly a revert of e5a128ab , where the issue of the compiler
failing on repeated command line arguments was worked around. Now the
compiler behaves more properly: it uses the last passed argument and its
value, and prints a warning that several values have been passed. With
this behavior, the workaround is no longer necessary
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
Mikhael Bogdanov
46cdf0215e
Add codegen tests with substituted bytecode version (1.8->1.9)
2017-04-17 13:22:04 +02:00
Alexey Andreev
b11e33901b
Fix parsing of JavaScript number literals out of integer range
...
Fix KT-17219
2017-04-17 14:17:08 +03:00
Alexander Udalov
b7de272884
CLI: support delimiter for array arguments
...
The " " delimiter is used in kotlin-native (see
K2NativeCompilerArguments)
2017-04-17 11:51:33 +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
072f87ddab
Introduce -Xintellij-plugin-root, deprecate CompilerJarLocator
2017-04-14 20:13:11 +03:00
Alexander Udalov
ce6676baa8
Do not print usage if wrong argument is passed, do not exit with INTERNAL_ERROR
...
This is a normal situation, not an internal error of the compiler, so
return COMPILATION_ERROR instead
2017-04-14 20:07:54 +03:00
Alexander Udalov
ff846e787f
Report warning for non-boolean CLI argument passed multiple times
...
Only if its values are different, see the test
2017-04-14 20:07:54 +03:00
Alexander Udalov
be54e4b93b
Get rid of coroutinesWarn/coroutinesEnable/coroutinesError
...
Use a single coroutinesState instead. Change the coroutines state in
some tests from "warn" to "enable"/"error" to test that deserialization
of older config files works ("warn" is the default value, so it wasn't
testing anything here)
2017-04-14 20:07:54 +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
Alexander Udalov
78c0111c6e
Drop cli-parser, use simple reflection-based parser instead
...
The main reason of this change is that major changes are required in how
command line arguments are parsed in kotlinc, and it's much easier to
make them in our own codebase (given that the code is short and simple
enough) than in a third-party library
2017-04-14 20:07:53 +03:00
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