Commit Graph

56 Commits

Author SHA1 Message Date
Yan Zhulanow 34d1611ed4 Add Pill support to compiler and IDE modules 2018-03-02 03:15:17 +03:00
Ilya Chernikov a5278c2184 Get rid of PathUtil dependency in the script_util
reduces transitive dependencies required for the script_util
2018-02-28 19:29:05 +01:00
Ilya Chernikov 7e21573cf4 Convert the rest of the project to intellij repo prepared in buildSrc 2018-01-30 17:06:13 +03:00
Ilya Chernikov a6f8db5d02 Fix script-util tests 2018-01-30 17:06:12 +03:00
Ilya Chernikov a4f28cd94f Make all dependencies to idea sdk intransitive 2018-01-30 17:06:11 +03:00
Ilya Chernikov 2d8e73f3f6 Make JSR 223 examples compatible with embeddable compiler, strip ...
some dependencies.
Fixes #KT-17561 and related issues
Warning: API changed slightly
2017-12-26 19:27:31 +01:00
Alexander Udalov d4b5032810 Add JDK roots to the beginning of the roots list
This behavior was used until 6a1b6d10d8, where the JDK has
unintentionally started to be added to the end of the list, breaking
code which depended on libraries which bundle something from the JDK

 #KT-21299 Fixed
2017-11-29 11:49:48 +01:00
Nikolay Krasko d2aabe076d Refactoring: extract jar names in PathUtil and use them in artifacts 2017-11-21 01:11:01 +03:00
Pavel V. Talanov cdfdc1d19b Refactor script definitions loading
Make ScriptDefinitionProvider an interface
    and provide different implementation for cli and IDEA
Rework ide extension point to a simpler interface (ScriptDefinitionContributor)
Move template loading logic into a top level function
Allow script definitions to be reloaded in IDE
2017-11-14 16:30:33 +03:00
Alexander Udalov 3ead2e9cd4 Use KotlinCoreEnvironment.createForTests in test code
createForProduction creates and caches JavaCoreApplicationEnvironment
instance, which can alter behavior of subsequent tests
2017-11-03 14:03:02 +01:00
Ilya Gorbunov 3bea095618 Remove maven poms that are no longer submodules of the main project 2017-10-16 18:48:09 +03:00
Ilya Chernikov cff6d8cf17 Refactor context classpath discovery, share it to idea's jsr223 host...
...from script-util
fix daemon usage in repls
define compiler classpath for script-util tests explicitly
minor refactorings in the build scripts for better import into idea
2017-10-06 20:12:51 +02:00
Ilya Chernikov d039d191f2 Fix tests in the new build infrastructure 2017-09-19 23:58:30 +02:00
Ilya Chernikov deda50dbbb Continue switching projects to improved dsl: sourceSets and test running 2017-09-19 21:37:26 +02:00
Ilya Chernikov a87396b070 Add scripting projects from libraries 2017-09-19 21:37:21 +02:00
Mikhail Zarechenskiy 6a1b6d10d8 Setup JDK roots and initialize JDK_HOME in common core environment
#KT-20167 Fixed
2017-09-18 08:19:41 +03:00
Alexander Udalov 82502e1a8b Fix compilation of kotlin-script-util
Compilation was broken in 46a01ec
2017-07-28 19:26:35 +03: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 36001ff931 Do not allow to access compiler internals in .kts scripts
Set parent class loader to null explicitly instead of the system class
loader
2017-07-18 20:10:05 +03:00
Alexander Udalov 5bd3716637 Fix compilation of kotlin-maven-plugin and kotlin-script-util 2017-04-28 16:31:11 +03:00
Ilya Chernikov 88652154c9 Port compiler to the script-runtime with script base classes 2017-04-06 10:02:45 +02:00
Alexander Udalov dac9ed4a33 Fix compilation of kotlin-script-util
See 20d5616
2017-03-31 20:14:13 +03:00
Alexander Udalov ccfa42289c Fix compilation of kotlin-script-util
'check' was removed in 579238c3be
2017-03-23 11:46:26 +03:00
Alexander Udalov 332a0f5adc Use 'languageVersionSettings' extension instead of key directly
Also fix compilation of kotlin-script-util
2017-03-16 14:18:01 +03:00
Ilya Chernikov 6d9ecc60ef Skip metadata version check in repl, improve JSR 223 template compatibility 2017-02-24 16:58:25 +01:00
Ilya Chernikov d3682b7f7d Implement JSR 223 script template with eval functions, some fixes 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 b9469a9308 Fix script-util after changes in repl infrastruct 2017-02-24 16:58:24 +01:00
Ilya Chernikov 82320bdf7d Make maven/aether dependencies optional in the script-util
(cherry picked from commit 8197240)
2017-02-10 16:03:06 +01:00
Ilya Chernikov 46894da981 Get rid of daemon-client dependency on openapi, making others "provided"
(cherry picked from commit 175d74c)
2017-02-10 16:02:55 +01:00
Ilya Chernikov bd47337be2 Using stdlib instead of runtime in the JSR 223 engines 2017-01-27 22:20:45 +01: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
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 Gorbunov e025050dd9 Replace kotlin-runtime with kotlin-stdlib in kotlin-script-util and its tests 2017-01-24 22:04:46 +03:00
Ilya Chernikov 038491399b Copy (partly) context classpath extraction code from script-util to JSR223 4 Idea, use it there 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 aab1759dc5 Improve test in script-util (not fixed for TC yet) 2016-12-15 07:26:07 +01:00
Ilya Chernikov b1cd98f2d5 Refactor and fix script annotation processing 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 b19d61e2f4 Refactor annotation resolving, some tests fixed, more tests needed 2016-12-15 07:26:07 +01:00
Ilya Chernikov 7c8b6ddca4 Implement proper collection of script compilation classpath, use it in the JSR223 example factories
Fixes #KT-14713
2016-12-15 07:26:07 +01:00
Ilya Chernikov cfcd3b8186 Refactor script.util templates 2016-12-15 07:26:07 +01:00
Ilya Chernikov c01959333a Replace kotlin general runtime with script runtime in JSR223 sample factories, fixes tests 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 7a79fff9d6 Put lines history into all data structures returned by repl, refactor storage and passing of the history for that 2016-12-15 07:26:06 +01:00
Ilya Chernikov d2ba25e758 Fix script util test 2016-11-10 23:37:09 +01:00
Ilya Gorbunov adaad58cc7 Add required builtins when building tests. Either as reference to kotlin-runtime, or resort to those from the compiler with the -Xadd-compiler-builtins argument. 2016-10-31 22:03:16 +03:00
Ilya Chernikov ebc8002eb2 Fix output comparison in tests under windows in libraries project as well 2016-10-12 20:29:49 +02:00
Ilya Chernikov 846797ff61 Switch to templates in the separate script runtime 2016-10-12 15:38:52 +02:00
Ilya Chernikov c2b5c11781 Fix all small and medium-sized issues after review 2016-10-12 15:37:54 +02:00