Commit Graph

152 Commits

Author SHA1 Message Date
Alexey Tsvetkov 66a77c7ec2 Fix Gradle IC cache version checking 2017-08-29 04:28:09 +03:00
Alexey Tsvetkov b54414d628 Implement Gradle JS IC support
#KT-19956 fixed

To try the experimental JS IC add
'kotlin.incremental.js = true' to a 'local.properties'
or 'gradle.properties' file in Gradle project's root.
2017-08-29 04:23:02 +03:00
Mikhail Glukhikh 3623f581b8 Eliminate a set of warnings, mostly nullability ones 2017-08-18 15:10:27 +03:00
Sergey Igushkin 192d569e54 Support Java package prefix in Gradle plugin
Issue #KT-17150 Fixed
2017-08-14 16:13:13 +03:00
Alexey Tsvetkov bb2fab5b5d Extract LookupTracker service from IncrementalCompilationComponents
We don't need a `TargetId` to `IncrementalCache` mapping in JS
2017-08-10 21:19:42 +03:00
Alexey Tsvetkov f0becd0040 Fix IC with daemon
JPS IC with daemon was not working since
the commit 514635e965

Before that change `IncrementalCompilation.isEnabled`
returned `true` when the corresponding system property was not set.
After the change `isEnabled` returns `true` only if
the system property is set and equals to `"true"`.

The property was never set up for the daemon if `CompilerMode.JPS_COMPILER`
was used (the property was set up in a JPS process or in the daemon in case
it was used with Gradle).

     #KT-19414 fixed
2017-08-02 23:02:11 +03:00
Alexey Sedunov 50599c933f J2K: CommonToolArguments and inheritors 2017-08-01 19:36:49 +03:00
Alexey Tsvetkov 62fdd91947 Remove old IC: remove unnecessary caches 2017-07-31 19:34:58 +03:00
Alexander Udalov 46a01ec131 J2K PathUtil: convert and prettify 2017-07-28 14:11:35 +03:00
Ilya Chernikov a82f66cf45 Add tests for client/session flags removal, minor fix in shutdown logic 2017-07-26 17:16:38 +02:00
Ilya Chernikov dc88e1e16c Fix daemon clients cleanup, fixes hanging daemon processes 2017-07-26 17:16:37 +02:00
Alexander Udalov 2f99f6ad34 Refactor AnalysisFlags and their support in IDE
* Support flags with any value (not just Boolean)
* Support all flags by parsing arguments in KotlinFacetSettings, instead
  of manually listing known flags

 #KT-19210 Fixed
2017-07-26 11:45:24 +03:00
Alexander Udalov 845de7aa4d Minor, change parameter type of parseCommandLineArguments 2017-07-26 11:45:24 +03:00
Ilya Chernikov 17a189a24b Improve logging and exception handling in the daemon 2017-07-20 10:54:05 +02:00
Pavel V. Talanov 788eaf8a18 Refactor getting dependencies for script files API
Deprecate KotlinScriptDefinition#getDependenciesFor
Expose dependencyResolver as a property
KotlinScriptExternalImportsProvider is the component clients should be asking for dependencies
2017-07-19 12:28:02 +03:00
Ilya Chernikov fc12f37105 Rolling back commits related to Unit -> Void? confersion in RMI interface
since it breaks the compatibility and doesn't actually help - the problem
with NoClassDef Unit is apparently elsewhere.
2017-07-11 15:06:38 +02:00
Ilya Chernikov 21eed9ee78 Get rid of kotlin.Unit usage in RMI interfaces
attempt to fight mysterous "Cannot instantiate kotlin.Unit" exception.
2017-07-08 18:16:29 +02:00
Ilya Chernikov 06d27a9efa Fix failing tests on TC on Windows by falling back to standard launcher
...in one more case
Plus some minor test tweaks, diagnostics improvement and important comments
2017-07-08 18:16:28 +02:00
Ilya Chernikov 8542e878f7 Refactor daemon periodic check and shutdown logic
Cleaner logic and logging, improved stability during shutdown, reduced
overhead of the periodic checks, and regular calls, should also eliminate
dying daemons scenario on parallel execution (another attempt to do it).
2017-07-08 18:16:26 +02:00
Ilya Chernikov 2c35675fd6 Refactor daemon parallel start test to improve diagnostics
also add daemon info to the RPC
and remove redundant daemon stopping calls, that should speed up
tests execution
2017-07-08 18:16:26 +02:00
Ilya Chernikov e2d2c5ff42 Refactor daemon startup for better logging and cleaner code 2017-07-08 18:16:25 +02:00
Alexander Udalov 55468735df Rename -module argument to -Xbuild-file
To prevent confusion with Java 9 module-related arguments

 #KT-18754 Fixed
2017-07-06 17:03:25 +03:00
Alexander Udalov 5b9ee88b52 Remove --add-opens options to workaround Java 9 visibility checks
These options are no longer needed because the problematic code in
intellij-core that was accessing these private APIs has been dealt with
in the 171 branch.

The remaining options in "Codegen Tests" run configurations are needed
because of reflection usage on JDK internals in KtUsefulTestCase
2017-07-06 12:50:04 +03:00
Valentin Kipyatkov 61d9a6b9cd Use the same way to check for ProcessCanceledException everywhere 2017-06-30 11:21:16 +03:00
Alexander Udalov a67382fdec Daemon: do not exit with internal error on invalid arguments
Invalid compiler arguments should lead to a compilation error, not
internal error. This has been fixed by splitting the
"parseArguments(...)" call (which does parsing + validation) in
CompileServiceImpl into two calls of parseCommandLineArguments +
validateArguments, and returning with a compilation error if the latter
did not succeed

 #KT-16057 Fixed
 #KT-14848 In Progress
2017-06-06 19:52:02 +03:00
Alexander Udalov 7febd846e8 Export 'intellij-core' in module 'frontend'
Remove intellij-core from dependencies of modules which already depend
on frontend or any module that exports frontend (such as frontend.java)
2017-06-06 14:29:26 +03:00
Ilya Chernikov 9d2ae54d2c Introduce other JVM options inheritance for daemon 2017-05-24 10:52:38 +02:00
Ilya Chernikov 6190b1ec2e Fix daemon selection on the memory settings 2017-05-24 10:52:37 +02:00
Ilya Chernikov f8ef48f03e minor: log daemon client registration 2017-05-24 10:52:37 +02:00
Ilya Chernikov f00149ad05 Reuse daemon launching logic for out-of-process compilation in gradle 2017-05-24 10:52:36 +02:00
Ilya Chernikov 61570fc4b8 Improve daemon client diagnostic and run failure detection
Removing prefiltering of the daemon client reporting - filtering should
be performed on the receiver site. And put daemon process output during
executioninto INFO category. May make daemon usage more talkative,
but will not eat important error messages anymore.
Add test with failure condition.
Also failed daemon start should not cause timeout anymore.
2017-05-24 10:52:35 +02:00
Ilya Chernikov bec2ae7cab Refactor daemon tests, some minor fixes in the client and daemon
Tests refactored for better readability and code reuse
Some shutdown livelock is fixed
Some logging added
2017-05-24 10:52:35 +02:00
Ilya Chernikov 8cc576d44f Add total reset to repl history and state interfaces 2017-05-03 18:11:43 +02: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
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
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
Alexander Udalov cb4d2994a3 Drop CompilerMessageLocation.NO_LOCATION, use null everywhere instead 2017-04-11 12:08:31 +03:00
Alexander Udalov 861d9a1620 Use null instead of CompilerMessageLocation.NO_LOCATION in MessageCollector 2017-04-11 12:08:31 +03:00
Alexey Tsvetkov e7e29f2651 Avoid changing java.rmi.server.hostname property 2017-04-10 20:39:34 +03:00
Ilya Chernikov 659002f5ce minor: Fix daemon shutdown livelock
due to wrong minimal aliveness, daemon was in some situations livelocked
in the last session state on shutdown.
2017-04-06 10:02:50 +02:00
Ilya Chernikov 234ad39fd6 minor: improve daemon start failure diagnostic 2017-04-06 10:02:47 +02:00
Ilya Chernikov 7ceaca133a Add new artifact kotlin-compiler-client-embeddable.jar 2017-04-06 10:02:44 +02:00
Ilya Chernikov aebfc2f4a1 minor: move native platform launcher to separate file to make native-platform dependency optional 2017-04-06 10:02:43 +02: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
Mikhail Zarechenskiy 20d5616d75 Introduce Kotlin language version 1.2
Wherein DEFAULT version is still 1.1, which means that version 1.2 should be configured manually
2017-03-30 13:27:45 +03:00
Alexander Udalov 3655fc02bd Support running Kotlin compiler daemon on JDK 9
This should have fixed the compiler that is run in Gradle on Java 9, but
there's another issue filed as KT-17112

 #KT-17112 Open
 #KT-14988 Fixed
2017-03-30 13:05:24 +03:00
Alexey Tsvetkov 0a4c43a5f1 Fallback to ProcessBuilder when native ProcessLauncher fails
#KT-16902 fixed
2017-03-24 19:03:41 +03:00
Alexey Tsvetkov 9d95c841a6 Use connect-and-lease when using daemon in JPS & Gradle
Relates to KT-15562 "Service is dying".

This commit includes multiple changes:
 1. JPS & Gradle daemon clients are refactored to use `connectAndLease` from `KotlinCompilerClient`.
 `connectAndLease` was introduced in previous commits
 2. `withKotlin` was removed because `connectAndLease` already covers retrying on connection error
 3. Gradle flag files creation is changed:
   * client-alive flag file lives as long as Gradle instance lives,
   * session-alive flag file lives until the end of a build.
2017-03-24 19:03:36 +03:00
Alexey Tsvetkov 9819de1abd Improve daemon client debug reports
Before this change a daemon client debug messages were printed
only when the client could not connect and the 'kotlin.daemon.verbose'
system property was set up.

Now messages are printed if the debug logging is enabled and
the 'kotlin.daemon.verbose' is set up.
2017-03-24 19:03:32 +03:00