Commit Graph

32 Commits

Author SHA1 Message Date
Ilya Chernikov
8953bba47c Pass scripting (host) environment independently from properties/configuration 2018-08-23 09:51:53 +03:00
Ilya Chernikov
91e6c0b77c Remove evaluator from script definition, simplify interface 2018-08-23 09:51:53 +03:00
Ilya Chernikov
e61ba1fd70 Replace dedicated configurator with definition properties + refine fun 2018-08-23 09:51:53 +03:00
Ilya Chernikov
a54675abe7 Clean and fix new scripting API 2018-08-23 09:51:53 +03:00
Alexander Udalov
5da8ce844a Minor, move ContentRoot and KotlinSourceRoot to module 'cli'
Also move CONTENT_ROOTS from JVMConfigurationKeys to
CLIConfigurationKeys since it's used on all platforms, not just JVM
2018-08-07 13:38:30 +02:00
Natalia Selezneva
41dc059da9 Register custom file extension for scripts loaded from script template 2018-08-03 15:25:35 +03:00
Ilya Chernikov
9549736d35 Fixes after review 2018-07-10 08:43:52 +02:00
Ilya Chernikov
0f46f62232 Add script class annotations generation from the base class 2018-07-10 08:43:51 +02:00
Ilya Chernikov
edf13c022e Refactor script definitions loading and discovery:
Improve logic, code reuse and readability
Add support for more corner cases
Improve reporting
Add definitions loading test
2018-07-10 08:43:51 +02:00
Ilya Chernikov
fbbfe600ec Fix list of script definitions recognized by the asm-based loading:
fix of the previous fix to #KT-24926
2018-07-10 08:43:50 +02:00
Ilya Chernikov
4812fcf1ad Fix script definition discovery logic:
for cases when directory-based dependencies are passed and directories
with resources are different from directories with classes
Significant refactoring to make code prettier
2018-07-10 08:43:50 +02:00
Ilya Chernikov
29adf09b7e Add test with other annotation, tests fix of #KT-2496 2018-06-15 12:01:49 +02:00
Rodrigo B. de Oliveira
e24a9d08f2 Only collect annotations with a name starting with KotlinScript 2018-06-15 11:53:49 +02:00
Ilya Chernikov
6fdb8746de Fixes after review 2018-05-28 22:10:56 +02:00
Ilya Chernikov
a46dd5b30e Avoid using reflected types in the scripting API
since it causes numerous classloading issues. Using the wrapping types
and reload them in the proper context when needed.
Note: this version supports only classes, but the wrapping type could
be extended to support other types in the future.
+ numerous fixes related to proper loading and handling of the templates.
2018-05-28 22:10:56 +02:00
Ilya Chernikov
92d848b6e6 Fix scripting plugin commandline processing 2018-05-25 09:51:04 +02:00
Ilya Chernikov
705faa4792 Add lazy discovery test 2018-05-25 09:51:04 +02:00
Ilya Chernikov
b3219cb762 Implement lazy script definition and light discovery in cli plugin, ...
update appropriate parts of the scripting infrastructure
2018-05-14 11:13:44 +02:00
Ilya Chernikov
516924cda1 Add support for script environment variables to the frontend 2018-05-03 22:15:09 +02:00
Ilya Chernikov
15f9ad9531 Implement quick non-script detection and lazy script discovery..
so ".kt" and ".java" files are not considered as scripts and quickly
filtered out, and for the other files the the checks are implemented
using sequences, mechanisms provided to supply script definitions
lazily, and script discovery is implemented using this mechanisms.
2018-05-03 22:15:09 +02:00
Ilya Chernikov
a29411a211 Process script templates everywhere properly:
- add options to disable scripting plugin and standard script definition
- move standard definition adding logic into appropriate place
- fix logic of scripting plugin loading
- add standard script definition on the environment creation to
  ensure compatibility with all usages
- fix testdata
- some minor fixes
2018-05-03 22:15:09 +02:00
Yan Zhulanow
715421566b Pill: Add new script modules 2018-04-09 19:45:49 +03:00
Ilya Chernikov
5bf8460032 Do not throw if the script definition name is not defined 2018-04-04 16:23:59 +02:00
Ilya Chernikov
191b1cfefa Refactor configurations handling:
- rearrange compile call parameters for clarity, more defaults
- remove baseConfiguration method - it is now covered by defaultConfiguration
for static part, and refineConfiguration call if a config parameter is
specified
- implement proper configurations chaining, documented in comment to compile function
- minor renamings and refactorings
2018-04-04 16:23:58 +02:00
Ilya Chernikov
4a4edf3458 [minor] Renames and rearrangements for clarity 2018-04-04 16:23:58 +02:00
Ilya Chernikov
5058c66e8c Refactor scripting properties:
- flatten the structure
- add some parameters
- replace iterables with lists
- renaming all scope objects uniformily
also:
- fix passing and usage of script sources
- renamings and other minor improvements
2018-04-04 16:23:58 +02:00
Ilya Chernikov
495c75c48e Rename heterogeneous map to PropertyBag, make it chainable
the commit is needed to implement single chained script configuration bags
2018-04-04 16:23:57 +02:00
Ilya Chernikov
29797ec264 Switch to plugins section in scripting build files after rebasing 2018-04-04 16:23:57 +02:00
Ilya Chernikov
ae2af238fa Fixes after refactoring the API 2018-04-04 16:23:57 +02:00
Ilya Chernikov
87de1dff03 Implement support for additional receivers for script in frontend 2018-04-04 16:23:56 +02:00
Ilya Chernikov
e79d3dd035 Fix scripting in the frontend after refactorings 2018-04-04 16:23:55 +02:00
Ilya Chernikov
d05f67127d Move scripting configuration into compiler plugin 2018-04-04 16:23:55 +02:00