Alexander Udalov
424afba246
Add hint to use "-language-version", when applicable, in JVM runtime checker
2017-01-30 20:27:17 +03:00
Alexander Udalov
7167139c2e
Refactor JvmRuntimeVersionsConsistencyChecker for readability
2017-01-30 20:27:16 +03:00
Alexander Udalov
9e877b4a9e
Do not report error on libraries that bundle Kotlin runtime in classpath
...
Instead, report a strong warning, suggesting to remove such libraries from the
classpath
#KT-15995 Fixed
2017-01-30 20:27:16 +03:00
Alexander Udalov
e9a737b85a
Promote severity of configuration warnings to STRONG_WARNING
...
The reason is that these configuration problems may be the reason of
compilation errors, but they were hidden from the output because warnings are
not reported when there's at least one error
2017-01-30 16:01:29 +03:00
Alexander Udalov
7ac96163ac
Introduce CompilerMessageSeverity.STRONG_WARNING
...
This is a severity for mandatory warnings, i.e. those which should be reported
in any case, even if there are compilation errors
2017-01-30 16:01:27 +03:00
Dmitry Jemerov
3a3cf048a6
Register ControlFlowFactory in KotlinCoreProjectEnvironment
...
#KT-16047 Fixed
2017-01-30 13:22:47 +01:00
Alexander Udalov
e5680565b3
JS: drop "-kjsm" flag, merge logic with "-meta-info"
...
#KT-16049 Fixed
2017-01-30 11:31:03 +03:00
Zalim Bashorov
29ac01f2e2
KJS: allow to use packages with names starting with "kotlin" only if the -Xallow-kotlin-package command line option is specified
...
#KT-14668 Fixed
2017-01-29 17:21:01 +03:00
Ilya Chernikov
b8b044c6b0
Reuse script args substitution for replacing bindings in JSR 223 sample engines, fixes KT-15450
2017-01-27 22:20:44 +01:00
Ilya Chernikov
0b689a4ecb
PR-1021 review: minor fixes
...
# Conflicts:
# compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/repl/GenericReplCompilingEvaluator.kt
# compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/repl/GenericReplEvaluator.kt
# compiler/cli/src/org/jetbrains/kotlin/cli/jvm/repl/GenericReplCompiler.kt
2017-01-27 22:20:44 +01:00
apatrida
5ad06e1e92
PR-1021: Merge Keplin project scripting code into Kotlin core.
...
Overhauls the scripting layers (GenericRepl and related, and JSR223 and related)
Adds repeating modes (none, only latest eval'd line, or random order)
Also adds better thread-safe IO capturing, default imports, SimpleRepl wrapper, more unit tests
NOTE: the script-util part of the pull request was rejected due to various problems and incompatibilities.
It may be incorporated into the code later.
(originally cherry picked from commit 6f7d517)
2017-01-27 22:20:44 +01:00
Ilya Chernikov
8caf607378
PR-1021 preparations: prepare files to preserve important history
...
- Split GenericRepl.kt into separate files
- Rename Repl.kt
2017-01-27 22:20:44 +01:00
Alexey Sedunov
591910a216
Kotlin Facet: Import compiler arguments from Gradle project
...
#KT-15819 Fixed
#KT-15929 Fixed
2017-01-26 18:06:14 +03:00
Ilya Chernikov
ec7e8873f4
Update daemon client with wrappers for basic compiler API
...
Other changes to extract results for compiler, tests.
2017-01-25 15:29:15 +01:00
Alexander Udalov
76fc3b40d5
Do not consider Kotlin compiler as library in runtime versions checker
...
Otherwise because there's no Kotlin-Version in its manifest, it's regarded as a
1.0 runtime library which conflicts with 1.1 libraries
2017-01-23 11:30:53 +03:00
Alexander Udalov
139d37cfd0
Support "Main" component in JVM runtime version consistency checker
...
The point here is to disable the "checkNotNewerThanCompiler" check because it
breaks a real life use case of compiling with an old compiler against the new
runtime library (that may come implicitly as a transitive dependency of another
library). However, to keep the possibility of restoring this check in the
future without backporting the needed changes into the old branches, we now
only perform this check for the "Core" runtime components, and all other checks
-- for "Core" and "Main" runtime components. In the follow-up commit, we change
the runtime component of our libraries to "Main". If we decide we need the
"checkNotNewerThanCompiler" behavior in the future, we can change the runtime
component to "Core", effectively restoring this check in the old compilers
2017-01-21 12:57:14 +03:00
Alexander Udalov
7b4e826650
Enable JVM runtime version consistency checker in 1.1
2017-01-21 12:57:14 +03:00
Mikhael Bogdanov
62514e126d
Enable jvm 1.8 platform in cli
2017-01-13 13:52:54 +01:00
Alexey Tsvetkov
bdae0b5efb
Fix the build
2017-01-13 15:08:12 +03:00
Alexey Tsvetkov
2ec9773e15
Minor: fix CompilerMessageSeverity order
2017-01-13 15:08:12 +03:00
Alexey Tsvetkov
16352ff2e5
Refactor messages sending
2017-01-13 15:08:12 +03:00
Alexey Tsvetkov
99c72b6dff
Refactor JPS daemon client
2017-01-13 15:08:12 +03:00
Alexey Tsvetkov
d80c1ad10d
Add integer value to compiler message severity
2017-01-13 15:08:12 +03:00
Alexey Tsvetkov
1fcd7d07e2
Make compiler arguments serializable
2017-01-13 15:08:12 +03:00
Alexander Udalov
2ba18beb89
Report JVM runtime version inconsistency as errors instead of warnings
...
(cherry picked from commit f8fc7e94ac07d80f332149529b34297b7f0db82e)
2017-01-13 11:53:52 +03:00
Alexander Udalov
edb4fd1dfd
Do not emit pre-release flag if -Xskip-metadata-version-check is used
...
The -Xskip-metadata-version-check command line argument is supposed to be used
to avoid getting errors only; the side effect that it also caused compiler to
write the pre-release flag to binaries was a mistake and is fixed now
2017-01-11 19:28:52 +03:00
Alexander Udalov
7b5c90ebaf
Correctly load multifile package parts from binaries
...
JvmPackagePartProvider should not just blindly load all multifile parts from
all libraries on the classpath, but only those from multifile classes which
shadow (come earlier on the classpath) other classes with the same name.
Otherwise if you have different versions of the same library (which uses
multifile classes) on the classpath, the compiler will see parts from both
versions. If some declaration have moved from one part to another, it's
possible to observe an overload resolution ambiguity error
#KT-15287 Fixed
2017-01-11 13:15:58 +03:00
Alexander Udalov
db3fa8eaca
Refactor JvmPackagePartProvider
...
Make code more imperative than functional, preserve the information about the
original root where the module mapping was discovered
2017-01-11 13:15:56 +03:00
Alexander Udalov
164c72e877
Prefer package with class files to class with the same name
...
See comments in JvmDependenciesIndexImpl and in the test
#KT-15464 Fixed
2017-01-10 12:23:25 +03:00
Ilya Gorbunov
405a79549a
Migrate 1.1 reflection API usages
2016-12-29 06:51:00 +03:00
Yan Zhulanow
fdb568f86d
Kapt3: Generate incremental compilation metadata (light classes with Kotlin metadata)
2016-12-28 22:28:33 +03:00
Alexander Udalov
510295475b
Batch script: allow to pass JAVA_OPTS from outside
...
Similarly to the Bash version
#KT-14917 Fixed
2016-12-23 22:31:11 +03:00
Alexey Sedunov
12f2c04a0b
Misc: Fix argument copying
2016-12-22 02:47:34 +03:00
Alexey Tsvetkov
fb869277d9
Set property "idea.plugins.compatible.build" every time production environment is created
...
Gradle can wipe system properties between the build.
If this property is not set, "idea.properties is not found exception"
can be thrown when creating KotlinCoreEnvironment.
2016-12-19 22:55:22 +03:00
Alexey Tsvetkov
4fdca24db4
Remove source annotations removing (not needed with KAPT3)
2016-12-19 22:46:12 +03:00
Dmitry Jemerov
bc22b67995
Index and locate .kotlin_metadata files in IDE
2016-12-19 17:40:13 +01:00
Alexander Udalov
f57bbeed58
Disable runtime versions consistency checker temporarily
...
It should be enabled back as soon as Kotlin-Version attribute is written to
manifests of runtime jars in the Maven build
2016-12-17 20:57:05 +03:00
Mikhail Zarechenskiy
d1a3c4c48b
Fix description of -Xcoroutines key
2016-12-15 23:58:11 +03:00
Mikhail Zarechenskiy
091756b221
Adapt facet, map coroutine settings on three keys
2016-12-15 23:58:09 +03:00
Alexey Sedunov
9460426d26
Kotlin Facet: Add coroutine support setting
2016-12-15 23:58:08 +03:00
Mikhail Zarechenskiy
664485f4bb
Introduce keys to control applicability of coroutines
...
By default now we produce warnings on coroutines
2016-12-15 23:58:07 +03:00
Ilya Chernikov
d78fc50e90
Fix after review
2016-12-15 07:26:08 +01:00
Ilya Chernikov
f036422ee9
Refactor eval code to avoid compiler (codegen) hangings on various loops inside RW locks
2016-12-15 07:26:08 +01:00
Ilya Chernikov
fc416476a8
Move invokable parts to JSR223 only, remove unneeded code
2016-12-15 07:26:08 +01:00
Ilya Chernikov
b1cd98f2d5
Refactor and fix script annotation processing
2016-12-15 07:26:07 +01:00
Ilya Chernikov
1cc85df78e
Refactor REPL infrastructure for passing evaluation/invoke wrapper to every eval/invoke function
2016-12-15 07:26:07 +01:00
Ilya Chernikov
cb7f22ffec
Refactor JSR223 to support Compilable interface, drop daemon eval engine and sample, simplify
2016-12-15 07:26:07 +01:00
Ilya Chernikov
eb3d8a1a4a
Fix classpah update moment on script dependencies calculations
2016-12-15 07:26:06 +01:00
Ilya Chernikov
c82e91eafe
Implement Invocable on base evaluator and locally-evaluating JSR223 sample engines
...
fixes #KT-14707
2016-12-15 07:26:06 +01:00
Ilya Chernikov
fbd4c6eb61
Implement invokable/invoker interface on the generic repl evaluator, refactor reflection utils on the way
2016-12-15 07:26:06 +01:00