Commit Graph

51 Commits

Author SHA1 Message Date
Ilya Chernikov 9d2ae54d2c Introduce other JVM options inheritance for daemon 2017-05-24 10:52:38 +02:00
Ilya Chernikov 8cc576d44f Add total reset to repl history and state interfaces 2017-05-03 18:11:43 +02:00
Alexey Tsvetkov e7e29f2651 Avoid changing java.rmi.server.hostname property 2017-04-10 20:39:34 +03:00
Alexey Tsvetkov da24a99b91 Set 'java.rmi.server.hostname' property on client too
The RMI documentation (http://docs.oracle.com/javase/7/docs/technotes/guides/rmi/javarmiproperties.html)
says it is useful to set up a `java.rmi.server.hostname`
system property on a client and a server.
When the property is set up on a client, I saw that "RenewClean" threads
stopped listening to my external IP, so all client and server threads
are now only listening the loopback interface.

I also changed the way the property is set up on the server side:
before the change it was passed in jvmargs at a process launcher.
I moved this code directly to the main method of the daemon,
because it is easy to forget to set up the property,
when running the main for debug purposes.
2017-03-24 19:03:24 +03:00
Mikhail Glukhikh 045a23ae10 Cleanup: apply "Convert lambda to reference" 2017-03-15 17:36:02 +03:00
Mikhail Glukhikh b121bf8802 Cleanup: fix some compiler warnings (mostly deprecations, javaClass) 2017-03-15 17:35:31 +03:00
Mikhail Glukhikh 1375267996 Cleanup: apply redundant curly braces in string template inspection 2017-03-15 16:13:22 +03:00
Ilya Chernikov fa5728b288 Use Void instead of Unit in RMI calls, should fix EA-82064
("Could not initialize class Kotlin.Unit")

(cherry picked from commit b3a1311)
2017-02-24 16:58:25 +01:00
Ilya Chernikov 63aae56b11 Get rid of eval on daemon completely, fixes also JSR 223 examples 2017-02-24 16:58:24 +01:00
Ilya Chernikov 75234701c7 Fix remote repl state facade 2017-02-24 16:58:24 +01:00
Ilya Chernikov c5bc58ad32 Implement remote part of the new repl state handling 2017-02-24 16:58:24 +01:00
Alexey Tsvetkov 3b222f13f3 Replace daemon's message after start with constant string
#KT-15783 fixed

When a daemon client cannot find an existing daemon, it starts a new one.
The client waits for a daemon to start and initialize.
Then the daemon is expected to signal that it is ready for compiling by printing message in stdout.
Before this change the message was the daemons' run path (a directory where all daemons store
their "flag" files).
However the path printed by the daemon was not matched by the path expected by the client somehow
on Windows for a user with a username containing non-English letters.
This commit replaces the message with the constant string.
2017-02-18 19:35:06 +03:00
Ilya Chernikov 9eae929084 Fixes after review 2017-02-11 16:27:27 +01:00
Ilya Chernikov cb7de0e262 Implement more reliable daemon election, fixes KT-15562
also making shutdown more reliable
2017-02-11 16:27:25 +01:00
Ilya Chernikov 7c0cdf90cf Move daemon session flag files to daemon discovery dir by default + minor fixes:
- Move flag files from the temp dir, because right now JPS cleans temp dir on each build start. Should fix KT-15707, also may affect KT-15562.
- change compiler runner to allow the fix above
- Fix flag file name filtering
- Fix ifAlive handling on the new compile method in the daemon.
2017-01-28 15:36:06 +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 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
Alexey Tsvetkov 3d07c40887 Minor: rename CompilationResultSink->CompilationResults 2017-01-13 15:08:12 +03:00
Alexey Tsvetkov bdae0b5efb Fix the build 2017-01-13 15:08:12 +03:00
Alexey Tsvetkov 41c5568b74 Minor: add comment 2017-01-13 15:08:12 +03:00
Alexey Tsvetkov 39b37b85e3 Minor: rename Storage->Sink 2017-01-13 15:08:12 +03:00
Alexey Tsvetkov f027860ac0 Minor: rename CompilationResult->CompilationResultCategory 2017-01-13 15:08:12 +03:00
Alexey Tsvetkov a3415d8d0e Minor: move CompilerMode 2017-01-13 15:08:12 +03:00
Alexey Tsvetkov 072edf4b5a Minor: introduce EXCEPTION report category 2017-01-13 15:08:12 +03:00
Alexey Tsvetkov a56c92f28d Minor rename parameters to match parent constructor 2017-01-13 15:08:12 +03:00
Alexey Tsvetkov 16352ff2e5 Refactor messages sending 2017-01-13 15:08:12 +03:00
Alexey Tsvetkov e44cc43ada Move CompilerMode and TargetPlatform to CompilationOptions 2017-01-13 15:08:12 +03:00
Alexey Tsvetkov c5a5463f50 Rename AdditionalCompilerArguments->CompilationOptions 2017-01-13 15:08:12 +03:00
Alexey Tsvetkov bf50a23221 Remove operations tracer from compile() interface 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 d4d1d5ad0f Refactor daemon interface 2017-01-13 15:08:12 +03:00
Alexey Tsvetkov de2736489b Unify Gradle and Kotlin daemon cache version checking 2016-12-19 22:55:25 +03:00
Alexey Tsvetkov d5e42e3271 Clear jar cache with daemon 2016-12-19 22:55:24 +03:00
Alexey Tsvetkov 69e8cf6a25 Compile multiplatform projects with daemon 2016-12-19 22:55:24 +03:00
Alexey Tsvetkov 8228d5828e Fix multiproject Gradle IC with daemon 2016-12-19 22:55:22 +03:00
Alexey Tsvetkov 51a8f6ee4f Implement server side IC 2016-12-19 22:55:21 +03:00
Ilya Chernikov 6e96d192bf Move incremental components to compller util to reduce dependencies of compiler interface modules 2016-11-09 11:09:32 +01:00
Ilya Chernikov 16897f4935 Remove usage of getLocalHost, other minor changes related to localhost connections in daemon
- attempt to fix behaviours similar to #IDEA-161962, #KT-14042
2016-10-12 15:37:53 +02:00
Ilya Chernikov 43037373d7 Implement params to pass args to generic and remote repls to support script templates with params 2016-10-12 15:37:50 +02:00
Ilya Chernikov 86ece30330 Add remote repl support to the daemon, refactor repl classes accordingly, simple tests 2016-10-12 15:37:49 +02:00
Ilya Chernikov 042fc4fadc Add remote input stream support, plus minor tweaks 2016-10-12 15:37:49 +02:00
Alexander Udalov 53b584f48c Simplify usages of IncrementalPackageFragment and related code
Since its scope is now empty, no descriptor now has a container that is an
instance of IncrementalPackageFragment -> a lot of code is not needed anymore
2016-10-05 11:24:30 +03:00
Ilya Chernikov 4e18e91463 Attempt to fix EA-82064:
"java.lang.NoClassDefFoundError: Could not initialize class kotlin.Unit"
2016-08-10 14:18:03 +02:00
Mikhail Glukhikh 733f3e8025 Code cleanup: type parameters can have in / out variance 2016-05-13 17:57:02 +03:00
Ilya Chernikov 22283be1b7 minor: Make term "canceled" uniformly spelled in identifiers and strings in the daemon 2016-05-06 13:06:38 +02:00
Alexander Udalov 6048ebf871 Fix terminology: internal name instead of FQ name 2015-12-21 20:27:41 +03:00
Alexander Udalov a9476dfe37 Replace 'kotlin-runtime' in module dependencies with 'util' 2015-12-21 18:46:08 +03:00
Ilya Chernikov 6ba68da811 Working around cancellation-related exception in case of different versions of daemon and client 2015-12-18 22:17:15 +01:00
Ilya Chernikov 96a9634ace using mapNotNull insteand of map + filterNotNull 2015-11-27 19:04:05 +01:00
Ilya Chernikov fd81063134 Renaming daemon main object, so it is better recognizable in jps/ps output 2015-11-27 19:04:05 +01:00