Commit Graph

88 Commits

Author SHA1 Message Date
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 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
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
Ilya Chernikov 1823ba1c48 Fix deserialization of the compiled script
#KT-29741 fixed
2019-03-19 17:11:52 +01:00
Ilya Chernikov b395cb120a Implement import test witch caching
reproduced KT-29741
plus some tests refactoring
2019-03-19 17:11:52 +01:00
Ilya Chernikov 7a4d369c9f Extend script cache tests, revealing that cache doesn't work in fact 2019-03-19 17:11:52 +01:00
Ilya Chernikov 18198987a3 Restore jvmTarget 1.6 for scripting libraries that could be used externally
#KT-29319 fixed
2019-03-13 08:47:17 +01:00
Alexander Udalov c7c377e1b1 Use JvmTarget.DEFAULT instead of JVM_1_6 where applicable 2019-03-07 11:42:31 +01:00
Ilya Chernikov 196e274929 Move calculating dependencies from script sources to plugin 2019-03-02 08:10:16 +01: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
Alexander Udalov f733bda912 Fix compilation error introduced in d374723e3c 2019-02-25 19:22:09 +01:00
Ilya Chernikov d374723e3c Restore default jvmTarget for scripts that was lost after refactoring 2019-02-25 18:22:27 +01:00
Ilya Chernikov 5ef6ad916f Apply scripting compiler plugin to the jvm scripting host compiler 2019-02-10 13:31:57 +01:00
Mikhael Bogdanov a122cba862 Switch Kotlin project to jvm-target 1.8
#KT-29405
2019-01-31 07:43:05 +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
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 877dd7ee47 Change default jvmTarget for scripts compilation via jvmhost to 1.8
#KT-29319 fixed
2019-01-18 18:17:47 +01:00
Ilya Chernikov 2bb5e8f51f Implement and use helpers for economical classpath update in script configs 2019-01-18 18:17:45 +01:00
Ilya Chernikov c7e5ad861c Allow explicit nulls for props with default, allow null as base classloader for evaluation
and use proper default evaluation configuration if not supplied explicitly;
also add reset method to the properties builder and containsKey method to
the properties collection
#KT-29296 fixed
2019-01-18 18:17:44 +01:00
Ilya Chernikov 086c4fd5b9 Add stdlib, etc. to the script dependencies on compilation
#KT-29293 fixed
2019-01-18 18:17:44 +01:00
Ilya Chernikov 4571e273a4 Add shared script instances support, fix and refactor evaluation accordingly
also fix arguments order in the evaluator
2019-01-10 10:59:32 +01:00
Ilya Chernikov e5febddaf7 [minor] fix scripting test on windows 2019-01-10 10:59:32 +01:00
Sergey Rostov 423653d225 JPS build: workarounds for idea importing 2018-12-26 09:02:44 +03:00
Ilya Chernikov 44ea2bf1d4 Introduce script names and location ids, use them in diagnostics and...
for virtual file names. Also fix compiled script serialization.
2018-12-20 17:09:23 +01:00
Ilya Chernikov 77095cb895 [minor] add missing dependency 2018-12-20 17:09:22 +01:00
Ilya Chernikov 1e74ab5a62 Implement import test, fix import support in compiler and evaluator 2018-12-20 17:09:19 +01:00
Ilya Chernikov fce68102bd Implement imported scripts evaluation and construction 2018-12-20 17:09:18 +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 fb929c290d [minor] copy utility fun to reduce dependencies 2018-12-13 18:00:08 +01:00
Alexey Tsvetkov 22192e7008 Stop using experimental coroutines in kotlin-scripting-jvm-host tests 2018-11-13 21:54:36 +03: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 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
Alexander Udalov 009f18f1f4 Split AnalysisFlag values to AnalysisFlags and JvmAnalysisFlags
Declare AnalysisFlags in module 'frontend', and JvmAnalysisFlags in
module 'frontend.java', to avoid leaking Java-related logic to common
compiler code
2018-10-01 13:31:00 +02:00
Ilya Chernikov a02d5b4b21 Rename script annotation params according to configuration keys...
rename evaluation params consistently too
2018-09-11 14:56:51 +02:00
Ilya Chernikov 34569071b3 [minor] rename function 2018-09-06 19:17:45 +02:00
Ilya Chernikov ae107339fd Implement compiled script caching with tests 2018-09-06 19:17:45 +02:00
Ilya Chernikov 836ea28fe7 Renaming remaining former "environment"-related identifiers 2018-09-06 19:17:44 +02:00
Ilya Chernikov 7860220e76 Add simple jvm scripting host test 2018-09-06 19:17:44 +02:00
Ilya Chernikov 6c60e38260 Add compatibility with templates from script-runtime...
and add script-runtime to the compilation classpath by default
2018-09-06 19:17:44 +02:00
Ilya Chernikov 6716c512d3 [minor] Rename too long named functions 2018-09-06 19:17:43 +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