Commit Graph

82 Commits

Author SHA1 Message Date
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 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 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 7bb4233e17 Add mapping function for transformations with ResultsWithDiagnostics
also improve chaining helpers
2019-01-10 10:59:32 +01: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 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 77a4505ec2 [minor] get rid of obsolete "environment" wording 2018-12-13 18:00:12 +01:00
Ilya Chernikov e0a542234f Add script config refinement before compilation into API 2018-12-13 18:00:10 +01:00
Ilya Chernikov 3fe324bbb4 Add UrlScriptSource 2018-12-13 18:00:08 +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
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 712e23f8b0 Document scripting common API, drop unused bits 2018-09-11 14:56:53 +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 ba2e08c014 Make property collection serializable (with runtime check) 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 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 a52b57eecf Drop currently unused REPL part of the API 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
Ilya Chernikov 1e85a26b62 Fix evaluation part of the scripting API - mostly renaming 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
Ilya Chernikov 2fe5f78921 Rename ScriptEvaluationEnvironment into ScriptEvaluationConfiguration 2018-08-23 09:51:53 +03:00
Ilya Chernikov bb22dadc1e Rearrange compilation related API 2018-08-23 09:51:53 +03:00
Ilya Chernikov bd8f2a81e9 Rename ScriptDefinition to ScriptCompileConfiguration 2018-08-23 09:51:53 +03:00
Ilya Chernikov 98c0a3bdaa Optimize script base class loading 2018-08-23 09:51:53 +03:00
Ilya Chernikov d2195fc080 Fix default script definition 2018-08-23 09:51:53 +03:00
Ilya Chernikov acb0f6c6a9 Remove ScriptCompileConfiguration as separate entity, refactor pieces accordingly 2018-08-23 09:51:53 +03:00
Ilya Chernikov ab63d59a56 Refactor definition keys 2018-08-23 09:51:53 +03:00
Ilya Chernikov dbee426647 [minor] use java reflection in some places instead of kotlin one 2018-08-23 09:51:53 +03:00
Ilya Chernikov 04ffe7754e Refactoring properties collection after review 2018-08-23 09:51:53 +03:00
Ilya Chernikov 74f8a541c0 Grand refactoring of the scripting DSL + many minor usability refactorings around it 2018-08-23 09:51:53 +03:00
Ilya Chernikov 45eaca1290 Add diagnostics chaining 2018-08-23 09:51:53 +03:00
Ilya Chernikov 3fb3aa5ad1 Setup props once, fix initialization problem 2018-08-23 09:51:53 +03:00
Ilya Chernikov c41717d03b Make definition a part of the basic hosts, simplify usages 2018-08-23 09:51:53 +03:00
Ilya Chernikov 70ec004aaa Sorting default jvm props and basic implementations 2018-08-23 09:51:53 +03:00
Ilya Chernikov fe2a11142e Renaming, commenting sample 2018-08-23 09:51:53 +03:00
Ilya Chernikov 3629583942 Add overridable method "setup" for defining properties 2018-08-23 09:51:53 +03:00
Ilya Chernikov 1de37ca765 Make KotlinScript annotation accepting all params needed to define a script 2018-08-23 09:51:53 +03:00
Ilya Chernikov dafbd59707 Add shorter aliases for properties 2018-08-23 09:51:53 +03:00
Ilya Chernikov 100b908a94 Add properties builders to the dsl, implement a builder for refineConfiguration 2018-08-23 09:51:53 +03:00
Ilya Chernikov e5e1b8d100 Improve generic DSL 2018-08-23 09:51:53 +03:00
Ilya Chernikov 7a621405ae Add generic properties builder dsl, convert maven example to it 2018-08-23 09:51:53 +03:00
Ilya Chernikov d0ed86c11c Add REPL interfaces to scripting API 2018-08-23 09:51:53 +03:00