Ilya Chernikov
65e6d3b0ff
[minor] Add a small diagnostics handling utility fun
2019-07-26 08:55:14 +02:00
Ilya Chernikov
b68ab0d968
Add test on repl with implicit receiver
2019-07-26 08:55:14 +02:00
Ilya Chernikov
a13d452cd8
Implement JSR223 host in the main-kts jar
...
also improve diagnostics on configuration instantiation
2019-07-26 08:55:14 +02:00
Ilya Chernikov
0108a76e99
Extract arguments calculation for base JSR223 engine into an argument
2019-07-26 08:55:13 +02:00
Ilya Chernikov
e8fa139dc8
Move direct properties configuration code into public functions in scripting host jar
2019-07-26 08:55:13 +02:00
Ilya Chernikov
747c488a78
Fix entries closing on saving compiled script to jar:
...
also adding a short sleep in tests, otherwise in some cases the
classloader was not able to find class in the jar.
Fixes script to jar saving tests on windows
2019-07-19 16:37:49 +02:00
Ilya Chernikov
bd50454a73
Change default for script displayName parameter to empty, generate name from base class in definition
2019-07-12 13:44:09 +03:00
Ilya Chernikov
0cc40440fb
Implement filePathPattern in the script configuration with handling
...
also
- tests
- extending kdoc for the definitions
2019-07-12 13:44:09 +03:00
Ilya Chernikov
c08b88281c
Remove accidetial usages of the internal jdk classes
2019-07-11 15:50:27 +02:00
Ilya Chernikov
c9a4328feb
Fix compiled scripts saving tests:
...
The tests were broken some time ago by applying script isolation, so
it was necessary to add base libraries into the classpath.
Also refactored some classpath building utilities.
2019-07-11 15:50:26 +02:00
Ilya Chernikov
9ae0ff03fa
Improve script and REPL result handling:
...
- implement error result
- refactor other result classes
- implement handling in the script evaluation extension - also restores
previous script error reporting functionality
- add possibility to customize result fileds in script and REPL
- refactor result calculation in the backend: cleanup, rename (since
it is not only about REPL now)
2019-07-11 15:50:26 +02:00
Ilya Chernikov
dc4370ff08
Implement support for new script customizations in command line compiler
...
refactor and fix internals in many places to make it work
add appropriate tests for main-kts case
2019-07-11 15:50:25 +02:00
Natalia Selezneva
923e89db69
Provide toString method for ScriptCompilationConfigurationWrapper
...
This is needed for debug and logging proposes
2019-07-10 10:10:20 +03:00
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