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
Vyacheslav Gerasimov
db3b01d2d4
Build: Centralize compiler dist build logic in :kotlin-compiler project
2019-06-27 17:56:48 +03: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
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
59dc546a54
Convert JvmGetScriptingClass to object to simplify (de)serialization
2019-05-25 10:10:31 +02:00
Ilya Chernikov
8c7460451e
[minor] fix some warnings
2019-05-25 10:10:30 +02:00
Ilya Chernikov
46915df56f
Implement "legacy" REPL wrappers on top of the "new" scripting infrastructure
2019-05-25 10:10:29 +02: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
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
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
Vyacheslav Gerasimov
92248d609f
Build: Centralize build logic for kotlin-plugin in :prepare:idea-plugin
2019-04-10 17:54:06 +03:00
Ilya Chernikov
c56382a62b
Move common idea and compiler parts of the scripting plugin to the new jar
2019-03-21 12:02:29 +01:00
Ilya Chernikov
931b1c66d8
Fix equality and serializability of scripting data, fix relevant caching behaviour
2019-03-19 17:11:52 +01:00
Yan Zhulanow
eb1543c71a
Minor: Fix a few compilation warnings in compiler and compiler tests, fix formatting
2019-03-06 03:30:55 +03:00
Vyacheslav Gerasimov
a42f607ecf
Build: Fix artifacts signing for maven central
...
With gradle > 5.0 `publish()` helper call should be done before
`noDefaultJar()` or any other artifact hacks, otherwise singing plugin doesn't sign any jars
2019-02-27 13:21:17 +03:00
Nicolay Mitropolsky
9bf55d81ca
Making kts-compiler able to dig out the ClassPath from the intellij PluginClassLoader
2019-02-22 13:51:47 +03:00
Ilya Chernikov
731df8d3cc
Proper handling of the scripting compiler plugin in JSR-223 with daemon
2019-02-10 13:33:21 +01:00
Ilya Chernikov
4f9e844735
Improve standard libs search logic for script compilation:
...
- refactor appropriate functions to accept optional classloader (not used yet)
- try to load from thread context classloader first
- fallback to marker class classloader in the appropriate function
2019-01-28 13:15:36 +01:00
Ilya Chernikov
95d782b6ca
Implement diagnostics for ignored compiler arguments on script compilation
2019-01-28 13:15:36 +01:00
Ilya Chernikov
7ee9801c5f
Implement additional compiler arguments support in scripts
2019-01-28 13:15:36 +01:00
Ilya Chernikov
298aaf999e
[minor] fix function name typo
2019-01-28 13:15:36 +01:00
Vyacheslav Gerasimov
f58acbeef5
Build: implement useBootstrapStdlib flag
...
Excludes stdlib projects from build and uses bootstrap stdlib artifacts
#KT-29205
2019-01-21 21:09:40 +03:00
Ilya Chernikov
2bb5e8f51f
Implement and use helpers for economical classpath update in script configs
2019-01-18 18:17:45 +01:00
Mikhail Zarechenskiy
d5ebe2e66a
Reorganize dependencies around kotlin-compiler.jar
...
#KT-26807 Fixed
2019-01-11 00:14:23 +03:00
Marcin Moskala
686cfa6fd2
Fix common misspellings
2018-12-21 16:13:42 +03:00
Ilya Chernikov
1e74ab5a62
Implement import test, fix import support in compiler and evaluator
2018-12-20 17:09:19 +01:00
Ilya Chernikov
729ebcac9b
Implement simple "add to compilation" functionality for scripts
...
(incomplete import - scripts added to the compilation but not yet
imported into scope)
Base functionality needed for #KT-27960
2018-12-20 17:09:16 +01:00
Ilya Chernikov
e0a542234f
Add script config refinement before compilation into API
2018-12-13 18:00:10 +01:00
Ilya Gorbunov
a64a76d5fc
Remove experimental coroutines opt-in from build scripts
...
It has no effect in Kotlin 1.3
Only enable coroutines if '-ReleaseCoroutines' is used
2018-11-09 04:00:26 +03:00
Ilya Chernikov
ae0b2405bc
Add ide script settings for sources and accepted location
2018-10-25 13:09:34 +02:00
Ilya Chernikov
492abd08bc
Fix bridge resolver behaviour on static dependencies
2018-10-25 13:09:32 +02:00
Ilya Chernikov
dd28d55c7d
Implement proper JDK home passing logic for scripts, deprecating old one
...
KT-27497 fixed, as well as failing tests on TC
2018-10-22 09:48:49 +02:00
Ilya Chernikov
7fbfad814e
Fix default host configuration property - make it not shared:
...
Shared instance is incorrect here and causes clashes when many
definitions are loaded in the same process.
Also make the diagnostics in case of clashes more verbose.
2018-10-10 10:53:57 +02:00
Dmitry Petrov
0191e3d1cf
Migrate to release coroutines
2018-09-27 21:59:31 +03:00
Ilya Chernikov
d760299dc1
Implement context classpath extraction using particular class,...
...
Use it in the main-kts.
Also improve diagnoistics related to the definition loading.
#KT-26828 fixed (after this commit - finally, see also another related commit)
2018-09-15 15:44:53 +02:00
Ilya Chernikov
d9760f00f6
Move context classpath utils from script-util to scripting-jvm
...
since it is the right place to have it in the new structure.
Solves the problem that script-util classes not found then script
definition with context classpath is loaded by the scripting compiler
plugin, since script-util is not packed into embeddable plugin.
The old context utils are deprecated and in fact wrap the new utils.
#KT-26828 fixed (in fact - partially, see another related commit)
2018-09-15 15:43:53 +02:00
Ilya Chernikov
836ea28fe7
Renaming remaining former "environment"-related identifiers
2018-09-06 19:17:44 +02:00
Ilya Chernikov
67ba8b5361
Rename ScriptSource to SourceCode, extract location to another i-face...
...
other related refactorings. The goal - make interface terminologically
more suitable for usage in REPL.
2018-09-06 19:17:43 +02:00
Ilya Chernikov
539e0f4961
[minor] switch to project dependencies in scripting projects
2018-09-06 19:17:43 +02:00
Ilya Chernikov
01eca8bac8
Clean up properties collection
2018-08-23 09:51:53 +03:00
Ilya Chernikov
c2e6c0ed49
Rename ScriptingEnvironment to ScriptingHostConfiguration
2018-08-23 09:51:53 +03:00