Alexander Udalov
b3d85e656e
Fix warnings after update to 202 platform
...
#KT-44069 Fixed
2021-01-13 19:17:22 +01:00
Ilya Chernikov
9a7d1948a7
Implement support for -Xdefault-script-extension cli option
2021-01-07 10:37:22 +01:00
Ilya Chernikov
1bd6cc823c
Fix provided properties access generation
...
The presense of accessors in the descriptor led to the wrong code
generation in some cases.
#KT-43176 fixed
2021-01-07 10:37:20 +01:00
Ilya Muradyan
89bba93615
Introduce GetScriptingClassByClassLoader interface
...
It is needed to override default JVM behaviour
2020-11-28 09:44:06 +01:00
Ilya Chernikov
7572b50385
Expose script parameters from descriptor explicitly...
...
and universally as ValueParameterDescriptors;
update implementation accordingly
2020-10-30 12:57:43 +01:00
Ilya Chernikov
5ab822be36
Import scope of the imported script
...
#KT-34178
2020-10-02 18:53:31 +02:00
Ilya Chernikov
d88e87aaac
Fix ScriptDefinition subtyping after earlier refactorings
...
#KT-41905 fixed
(may also fix other yet undetected or not analyzed problems with script
definitions)
2020-10-02 12:38:21 +02:00
Dmitriy Novozhilov
d1fd1da56f
Rename Visibility to DescriptorVisibility
2020-09-04 11:07:42 +03:00
Vladimir Dolzhenko
54d3c5fb0a
Pick up script language level from used stdlib in a gradle's classpath
...
^KT-41283 Fixed
2020-08-26 14:09:58 +00:00
Ilya Chernikov
ee9c597767
Build: Remove exclusion of kotlinx-coroutines-core in scripting-compiler
...
The previous fix was insufficient to fix gradle substitution in MPP
projects (https://github.com/gradle/gradle/issues/14017 )
2020-08-24 19:13:16 +02:00
Alexander Udalov
1d15a5547d
Suppress deprecation warnings related to scripting
2020-08-20 14:58:11 +02:00
Sergey Rostov
1f52c0e0d4
gradle.kts: improve service initializtion
...
- prevent analyzing .gradle.kts files until all services are loaded
- remove services caches where it is not required
- replace cached services with cache only during vfs events batch processing
- prevent services loading in actions updating
2020-07-10 17:47:10 +03:00
Vladimir Dolzhenko
ab20b3e083
Add InterruptedException handler to CancellableSimpleLock
...
#EA-220650 Fixed
2020-06-29 08:47:53 +00:00
Natalia Selezneva
bcd3921bae
Fix freeze during loading script configurations through legacy scripting API
...
Do not wrap the whole configuration loading process into readAction
^KT-39771 Fixed
2020-06-23 16:04:24 +03:00
Mathias Quintero
f0bc52222d
Fix annotation construction with array literals
...
Turns out the issue happens to be that ArrayValue uses a list of values which needs to be translated to an array of the percise type before it is used by callBy
This also addresses handling of arguments after a vararg in an annotation
2020-06-19 13:20:57 +02:00
Efeturi Money
8cb4f59114
Explicitly handle array annotation args in scripting pre-processing
...
#KT-35411 fixed
2020-06-19 13:20:57 +02:00
Ilya Muradyan
94de114894
Support selective filtering of implicits for extensions resolution in REPL
2020-06-19 13:03:23 +02:00
Vyacheslav Gerasimov
4aa3040550
Build: Use runtimeOnly instead of deprecated runtime
...
maven-publish plugin uses `runtimeOnly` for runtime scope instead of
`runtime`
2020-06-14 20:31:26 +03:00
Ilya Muradyan
262e21fcbc
Add overload to comply with the contract
...
Method getVariableNames() should return all variable names, but in the
inherited implementation it doesn't return resX names which represent
result fields.
2020-06-11 16:16:12 +02:00
Mathias Quintero
83087291df
Add API to get locations of collected script annotations
...
#KT-38404 fixed
also:
- Add wrapper class for the location combined with the location id
- Add source code location parameters to external dependency resolvers
- Add tests for locations in annotations
- Add tests for order of annotation resolution for dependencies resolvers
2020-06-10 16:28:41 +02:00
Natalia Selezneva
fd07d5f301
Scripting setting: auto reloading of script dependencies is now per definition
2020-06-01 15:12:53 +03:00
Ilya Chernikov
d92e4d28f5
Provide a method to update script definitions after loading into IDE
...
also documenting ScriptDefinitionsProvider
2020-05-21 16:49:56 +02:00
Ilya Chernikov
4b032a14af
Refactor host configuration handling and script definition creation
...
so it is possible now to create custom host configuration with template
and all configurations are handled consistenly.
Also introduce and use new ScriptDefinition class wrapping compilation
and evaluation configurations, that could be consistenly created from a
template.
2020-05-21 16:49:55 +02:00
Ilya Chernikov
255ad47406
Use copied key to extract default jdkHome from host configuration
2020-05-21 16:49:55 +02:00
Sergey Rostov
4daac14008
Revert due to massive flaky tests
2020-05-12 23:01:01 +03:00
Sergey Rostov
802c03b934
Script configuration: fix getting javaHome
2020-05-12 16:20:43 +03:00
Sergey Rostov
14edc26cf1
Revert due to test failing in 201
2020-05-08 10:13:07 +03:00
Sergey Rostov
aca1771619
Script configuration: fix getting javaHome
2020-05-07 21:48:46 +03:00
Vladimir Dolzhenko
b0483a67c2
Perform tryLock-and-checkCanceled on waiting lock in LockBasedStorageManager
...
Relates to #KT-38012
2020-04-14 13:11:30 +02:00
Ilya Chernikov
195a90d333
Cleanup warnings in scripting code
2020-04-13 13:49:34 +02:00
Ilya Chernikov
c64ba50655
Abstract script compiled module implementation used in saving/caching
...
removes classloading problem when main-kts is loaded from a CL
without scripting compiler.
Also relax dependencies collection on saving to a jar and hide redundant
logging.
Running main.kts script via a run configuration works now.
#KT-37765 fixed
2020-04-13 13:49:32 +02:00
Ilya Chernikov
6a24268db1
Fix scripting discovery file recognition for directory dependencies
2020-04-13 13:49:32 +02:00
Dmitry Gridin
62760bdac3
i18n: update bundle in idea-gradle
...
#KT-37483
2020-03-30 14:58:29 +07:00
Ilya Chernikov
b96109f23f
Add diagnostic code to the ScriptDiagnostic
...
to allow checking for specific errors, e.g. incomplete statements in
the REPL
2020-02-13 11:33:40 +01:00
Mikhail Zarechenskiy
c64577b735
Temporary fixes for Kotlin project after enabling NI
...
Most of these fixes will gone away after compiler bootstraping
2020-02-13 11:15:57 +03:00
Ilya Chernikov
b8034567ef
Change script definition lookup key from File to ScriptSource
...
to make it more generic and allow easier implementation fo the
non-file based scripts.
2019-12-02 16:46:54 +01:00
Ilya Chernikov
a190ab260e
Load main-kts jar automatically from scripting plugin, if available
2019-12-02 16:46:52 +01:00
Natalia Selezneva
07b6dadbf0
Scripting: move additional classpath to the end of script classpath (KT-34626)
...
Do not add duplicated entries
Original script dependencies should go first
2019-11-27 11:08:44 +03:00
Natalia Selezneva
ca71b2fe90
Add script configuration dependencies to script classpath
...
It was missing during configuration refinement thought new scripting API and during loading script configuration on Gradle project import
Do not pass additional classpath to configuration classpath: this may only affects Gradle with New scripting API (because it isn't used from other places)
In additional classpath kotlin-compiler and kotlin-stdlib was passed and there is no needs for this during loading Script Definitions through new scripting API
^KT-34626 Fixed
2019-11-22 11:43:34 +03:00
Natalia Selezneva
72ef43f462
Show filePattern in settings for new script definitions if present
2019-11-22 11:43:32 +03:00
Ilya Chernikov
9aaf08de08
Fix equality for the KtFileScriptSource
2019-10-29 20:44:18 +01:00
Vladimir Dolzhenko
fa0398ffd3
Fix readAccess in ScriptExtraImportsProviderExtension on checking isScript
...
#EA-214435 Fixed
2019-10-21 17:18:24 +02:00
Jordan Demeulenaere
158f7f1cd7
Avoid PsiFile searching when resolving imported scripts descriptors.
2019-10-18 13:17:28 +03:00
Ilya Chernikov
1f46e60153
Implement samWithReceiver support for scripts when ...
...
it configured from script compilation configuration
#KT-34294 fixed
2019-10-11 17:43:50 +02:00
Ilya Chernikov
7b93970ce2
Use default scripting host configuration if not provided
2019-10-10 17:43:27 +02:00
Vitaliy.Tikhonov
c6c3d2de9e
[JS SCRIPTING] create tests for repl
2019-10-10 12:52:06 +03:00
Vitaliy.Tikhonov
240abdb750
[JS IR BE] update current lowerings for IrScript
2019-10-10 12:52:05 +03:00
Ilya Chernikov
d3b826c71d
Improve class name generation for scripts and REPL snippets
...
- allow to override default name/scheme
- implement host/engine specific names for jsr223 to avoid classloading
clashes (also fix "eval in eval" test)
2019-09-17 16:05:38 +02:00
Ilya Chernikov
6de05bb2c7
Drop hardcoded extraction of the snippet id from script name
...
rely on the userdate instead
2019-09-17 16:05:38 +02:00
Ilya Chernikov
f8db150a2b
[minor] Drop some usages of kotlin reflection in scripting compiler plugin
2019-09-17 12:43:16 +02:00