Ilya Chernikov
a96a938f87
Fix creating of the script definition from legacy template
...
adding classpath needed to load template and related class to the
appropriate host configuration
fixes tests
2019-07-08 13:20:06 +02:00
Ilya Chernikov
cfceeb1e8c
Implement direct bindings to script properties mapping in the JSR-223 implementation
...
fix infrastructure and codegen parts
2019-07-05 17:02:10 +02:00
Ilya Chernikov
4940f64265
Refactor scripting infrastructure - convert usages to the new entities
2019-07-05 17:02:10 +02:00
Vyacheslav Gerasimov
db3b01d2d4
Build: Centralize compiler dist build logic in :kotlin-compiler project
2019-06-27 17:56:48 +03:00
Vyacheslav Gerasimov
5a39c637c2
Build: Fix intellij dependency leak from ir tree module
2019-06-13 21:03:55 +03:00
Vyacheslav Gerasimov
5bde9720b7
Build: Fix dependencies on :kotlin-compiler project
...
Dependencies on :kotlin-compiler should never be used in configurations
which are imported transitively because ide fails to import it as
project dependency. When :kotlin-compiler dependency is imported as
kotlin-compiler.jar dependency ide re-indexes it on every change. This
behaviour is super annoying.
#KT-31120 Fixed
2019-06-08 19:36:28 +03:00
Ilya Chernikov
c39896165e
Fix script compiler options processing
2019-06-07 23:19:16 +02:00
Ilya Chernikov
e542c9ea84
Refactor script definitions and resolving/refining infrastructure:
...
- implement wrappers to wrap old and new API providers and resolvers
- make old API deprecated (with error where possible)
- drop old internal classes related to the old API
- refactor usages accordingly
- fix and add missing features to the scripting API where necessary
2019-06-06 17:21:00 +02:00
Ilya Chernikov
e5054f9648
Refactoring scripting infrastructure:
...
- add a helper for new constructing Compilation Configuration only when necessary
- add more converters for legacy diagnostics
- add helpers for simpler creating of failure results
2019-06-06 17:21:00 +02:00
Ilya Chernikov
b7fd898bb8
Add explicit return types to helpers
...
also workarounds a problem (KT-30297) with new inference
2019-06-06 17:21:00 +02:00
Ilya Chernikov
4fb2f81134
Refactor scripting - prepare utilities for refactoring of the script definitions handling
2019-06-06 17:20:59 +02:00
Ilya Chernikov
0a6ade88cc
Fix classpath detection from classloader resources
2019-06-03 13:57:20 +02:00
Ilya Chernikov
f986856d03
Improve classpath extraction from classloader:
...
- implement opt-in unpacking/caching of the jar collection archives,
such as spring boot fat jars and WARs, to the temp dir, and creating
a valid classpath from extracted archive
- turning it on for the new default jsr223 engine
- fallback to extracting classpath from resource URLs if the classloader
is not known url-based one
- refactor and optimize extraction
- cache the last retrieved classpath in the default JSR-223 script engine
factory
2019-05-31 14:06:25 +02:00
Ilya Chernikov
e7c99cd494
Fix scripting-compiler tests, add them to the global scriptingTest task
2019-05-25 10:10:34 +02:00
Ilya Chernikov
deb74acc88
[minor] fixes after review
2019-05-25 10:10:34 +02:00
Ilya Chernikov
b97813f2b0
Implement test run on embeddable jars for jsr223 and scripting host tests...
...
also:
- add missing tests to the global scriptingTests task
- extract jsr223 tests into separate project
- fix dependency in jsr223 embeddable jar
2019-05-25 10:10:33 +02:00
Ilya Chernikov
a3d1fe312e
Refactor default JSR-223 engine implementation:
...
- rename classes for clarity
- sort out dependencies
- move common pars to jvm-host jar
- switch to configurations only customization
2019-05-25 10:10:33 +02:00
Ilya Chernikov
8cd5b11da5
Add evaluation context passing to the evaluation config refiners
2019-05-25 10:10:33 +02:00
Ilya Chernikov
5d8c2ae429
Fix dependencies to compiler in scripting modules
2019-05-25 10:10:32 +02:00
Ilya Chernikov
37d859c122
Move scripting jvm host tests to a separate project...
...
to solve problems with testing with direct dependency on proguarded compiler
2019-05-25 10:10:32 +02:00
Ilya Chernikov
1527ef7640
Drop dependencies to script-util from new scripting infrastructure
2019-05-25 10:10:32 +02:00
Ilya Chernikov
59dc546a54
Convert JvmGetScriptingClass to object to simplify (de)serialization
2019-05-25 10:10:31 +02:00
Ilya Chernikov
7ae2054cba
Add a link to hostConfiguration from compilation and evaluation ones
...
also add possibility to supply functional defaults for keys in PropertiesCollection
2019-05-25 10:10:31 +02:00
Ilya Chernikov
30c6147223
Get rid of UsefulTestCase to avoid dependencies, parallelize tests
2019-05-25 10:10:30 +02:00
Ilya Chernikov
8c7460451e
[minor] fix some warnings
2019-05-25 10:10:30 +02:00
Ilya Chernikov
1dd197f201
Add missing scripting tests to the global task, make them parallel
2019-05-25 10:10:30 +02:00
Ilya Chernikov
ea068e483c
Implement JSR-223 functionality on top of the "new" REPL
2019-05-25 10:10:29 +02:00
Ilya Chernikov
46915df56f
Implement "legacy" REPL wrappers on top of the "new" scripting infrastructure
2019-05-25 10:10:29 +02:00
Ilya Chernikov
010ae5326d
Create core environment in test mode properly
2019-05-25 10:10:28 +02:00
Ilya Chernikov
89006f16cd
Prepare scripting infrastructure for REPL:
...
- refactor script compiler to simplify extending it for repl
- add repl snippet compilation functions to the new scripting compiler
- extract util functions into appropriate files
- extract repl part into separate class
- extract bridge definition and related definitions into separate file
2019-05-25 10:10:28 +02:00
Sergey Rostov
00ed49df68
JPS Build: rename packedJars property to embedded, get rid of ShadowJar
...
Configuration should have name "embedded" for IDEA import.
ShadowJar doesn't required anymore as it is already embedded in
default jar task.
2019-05-23 16:12:03 +03:00
Natalia Selezneva
710c2cd0a4
JPS Build: rename packedJars property to embedded
2019-05-23 15:14:30 +03:00
Vadim Brilyantov
01a05a5495
Move daemon jar from compiler
2019-05-17 15:51:52 +03:00
Dmitry Gridin
37c856290f
Fix minor compile warnings
2019-04-25 19:47:39 +07:00
Ilya Chernikov
4b8d9c8fdd
Fix classloaders order on script evaluation
...
the dependencies one should be a parent for the modules one, to avoid
incompatibility problems. Also fixes main-kts tests
2019-04-24 17:27:03 +02:00
nikita.movshin
abb7d3ab46
Update copyright.
...
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update 2 lines comment
2019-04-23 20:09:27 +03:00
nikita.movshin
65244b4bea
Update copyright.
...
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update only 2 lines copyright.
2019-04-23 20:09:22 +03:00
Ilya Chernikov
9900ac2462
Fix runtime compatibility with the obsolete script jvm eval config options...
...
also switch mainKtsTest to the mew option
2019-04-18 13:01:50 +02:00
Ilya Chernikov
a65dafc37d
Move scripting support classes to the scripting compiler impl module
2019-04-17 22:03:58 +02:00
Ilya Chernikov
199b32cad7
Merge scripting-impl to scripting-compiler-impl module...
...
to continue merging with the branch with further scripting refactorings
2019-04-17 22:03:57 +02:00
Ilya Chernikov
a82b386d81
Add a new module for scripting compilation infrastructure...
...
add embeddable variant as well
2019-04-17 22:03:57 +02:00
Ilya Chernikov
67ad3773de
Implement main method generation in scripts and runnable jar saving
...
refactor necessary parts on the way
2019-04-16 11:55:23 +02:00
Ilya Chernikov
c896b4873b
Rearrange scripting host classes, so the runner part is independent from the compiler
2019-04-16 11:55:23 +02:00
Ilya Chernikov
a6f0bd6677
Refactor jvm evaluation to make module operations cleaner and more robust
...
in addition:
- hide internal configuration keys
- add keys for flags controlling evaluation
- add initial module implementation for using scripts from a classpath
2019-04-16 11:55:22 +02:00
Ilya Chernikov
90444502a6
Extend evaluation API for easier passing of evaluation configuration
...
refactor helpers accordingly
2019-04-16 11:55:22 +02:00
Ilya Chernikov
fa58b41e43
Implement script evaluation configuration refinement
2019-04-16 11:55:21 +02:00
Ilya Chernikov
c51d4a4405
Implement simple "saving evaluators" to classes and to a jar
2019-04-16 11:55:20 +02:00
Caleb Brinkman
c84c33cbd6
KT-30816 BasicJvmScriptEvaluator incorrect arg order
...
https://youtrack.jetbrains.com/issue/KT-30816
Change BasicJvmScriptEvaluator to pass constructor parameters in the
correct order, include tests for scripts w/ provided properties, and
implicit receiver, and both.
2019-04-11 10:17:55 +00:00
Vyacheslav Gerasimov
92248d609f
Build: Centralize build logic for kotlin-plugin in :prepare:idea-plugin
2019-04-10 17:54:06 +03:00
Yan Zhulanow
0b94aa4be2
Pill: Disable a couple of scripting modules
...
Seems like these modules use the embeddable verson of the scripting host dependency that is not built in the Pill build.
2019-03-27 22:15:26 +03:00