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
Zalim Bashorov
0372dae3ce
[JS scripting] Remove usages of descriptor based APIs and proper support for callable references
2020-12-28 18:53:53 +03:00
Zalim Bashorov
7c5ea414b7
[JS IR] Use mappedNames in NameTable only for REPL
...
And throw exception for unsupported types in mapToKey
2020-12-24 20:03:21 +03:00
anastasiia.spaseeva
71459db9dd
Wizard: Do not add bintray repoitory for eap versions
2020-12-09 18:16:06 +03:00
Zalim Bashorov
4c69f78de8
[JS] Replace J2V8 based ScriptEngine with a process-based version
...
The main advantage of this is that we can use a newer and official build of V8.
Also, with new infra, we can use other JS engines.
Other changes:
* ScriptEngine API is simplified and documented.
* Introduce ScriptEngineWithTypedResult with typed `eval`, mostly for JsReplEvaluator and JsScriptEvaluator.
* J2V8 version is completely removed.
* Use new ScriptEngineV8 everywhere by default.
* System property `kotlin.js.useNashorn` switches to Nashorn in all tests.
2020-12-07 17:27:23 +03:00
Alexander Udalov
e1d54bf99f
Minor, add workaround for KT-43666
2020-11-30 12:37:27 +01:00
Dmitriy Novozhilov
7396abf5a4
Build: add fastutil dependency to scripting tests
2020-11-28 14:25:53 +03:00
Ilya Muradyan
89bba93615
Introduce GetScriptingClassByClassLoader interface
...
It is needed to override default JVM behaviour
2020-11-28 09:44:06 +01:00
Ilya Gorbunov
b2b2629e79
Use new kotlin.io.path API in tests
2020-11-20 09:03:25 +03:00
Ilya Gorbunov
090b562db7
Use NIO Files for creating temp files: scripting, daemon, main-kts
2020-11-20 06:09:37 +03:00
Ilya Chernikov
4cb0437145
[minor] fix reflection usage in scripting tests
2020-10-30 12:57:43 +01:00
Ilya Chernikov
62b9d87bfc
[minor] scripting tests improvements
2020-10-30 12:57:42 +01:00
Ilya Chernikov
01d73ba0fc
Make IrScript a statement container first, update JS support
...
The IrScript is now the IrStatementContainer with significant
statements order, and the code is adapted accordingly
2020-10-30 12:57:42 +01:00
Ilya Chernikov
db23460fd5
Implement proper script runtime exception rendering with tests
...
#KT-42335 fixed
2020-10-06 21:43:11 +02:00
Ilya Chernikov
adcfca3f98
Treat classpath extraction problems on script definition loading as warnings
...
#KT-44206 fixed
2020-10-02 12:38:21 +02:00
Alexander Udalov
1d15a5547d
Suppress deprecation warnings related to scripting
2020-08-20 14:58:11 +02:00
Vyacheslav Gerasimov
ad8709b2dc
Build: Remove exclusion of kotlinx-coroutines-core in scripting-common
...
It breaks available-at feature used in MPP
2020-08-11 00:39:04 +03:00
Ilya Chernikov
034d5a948c
Add JvmDefault to the new EP method for compatibility with older impls
2020-07-31 12:07:10 +02:00
Alexander Udalov
cce55f1609
IR: add module ir.tree.impl, move main IR implementation there
2020-07-28 19:04:44 +02:00
Alexander Udalov
db4cbe7103
IR: use IrFactory in SymbolTable
2020-07-28 12:05:23 +02:00
Ryan Nett
b1173317c5
Change scripting Severity enums to order from DEBUG to FATAL.
...
#KT-39502 fixed
2020-07-27 14:29:30 +02:00
Ilya Muradyan
1ac9b4c38f
Add dependency scopes option for scripting resolvers
2020-07-14 23:42:00 +03:00
Vyacheslav Gerasimov
b5ee0e8222
Build: Remove jvmTarget 1.6 for several modules depending on 1.8 modules
...
Module targeting jvm 1.6 can't depend on jvm 8 one. In Gradle 6.5 this
behaviour is enforced by configuration error.
2020-07-09 19:31:20 +03:00
Ilya Chernikov
cd1bf563cd
Add error reporting on the options parsing errors in scripting
...
also report standard parsing warnings
also fix language version test, since it is not possible anymore
to use version 1.0
2020-06-19 13:20:58 +02:00
Ilya Chernikov
8fb41e4562
Process compiler plugins and options in scripting compiler
...
#KT-37766 fixed
2020-06-16 17:11:33 +02:00
Vyacheslav Gerasimov
ef48c38eb4
Build: Fix kotlin.kotlin-scripting-jsr223-tes test runtime
2020-06-14 20:31:29 +03:00
Vyacheslav Gerasimov
b4df4e5525
Build: Fix variant resolution ambiguity
2020-06-14 20:31:27 +03: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
6da22414dc
[minor] Fix typo in comment
2020-06-11 16:16:12 +02:00
Mathias Quintero
e45e491718
Add options param to external dependencies resolver API
2020-06-10 16:28:41 +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
Ilya Muradyan
489290263f
Add info about the end of range in scripting REPL compiler messages
2020-06-05 21:58:28 +02:00
Ilya Chernikov
dec8eb7899
Revert renaming scripting plugin jar:
...
it conflicts with the compilation on daemon, so transistion should
be planned accordingly, and now it is not a good time for it.
The most important part of the renaming remains intact.
Partially reverts commit "Rename scripting libs and plugin - invert embeddable suffix"
2020-05-27 13:15:50 +02:00
Ilya Chernikov
2509dfb287
Rename scripting libs and plugin - invert embeddable suffix
...
now regular, unshaded libs, are named with suffix `-unshaded`, while
former `-embeddable` ones named without any suffix. This will encoursge
use of the shaded libs by default, avoiding conflicts with 3-party
libs packed into the `kotlin-compiler`.
Note, that only the "frontline" libs are renamed to avoid switching
problems, the ones that not normally used directly are left as is,
including the `kotlin-compiler` itself.
2020-05-26 15:58:25 +02:00
Ilya Chernikov
c112d37ac1
Consolidate resolving in the new lib, deprecate it in script-util
...
also deprecate Import and CompileOptions annotations, because they
do not seem generic enough. Create specific copie in the main-kts
instead.
2020-05-21 16:49:57 +02: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
Ilya Chernikov
20bbcd5d5a
Implement copied key with ability to take default from source config
2020-05-21 16:49:55 +02:00
Ilya Chernikov
fb6ef38370
Revert "Add info about the end of range in scripting REPL compiler messages"
...
This reverts commit af251caf , because it breaks daemon/client
compatibility, which we'd like to keep as much as possible
2020-05-15 21:15:48 +02:00
Roman Artemev
9d9930f748
[JS SCRIPT] Fix test dependencies
...
- make sure kotlin stdlib is compiled and accessible
2020-05-14 17:58:33 +03:00
Roman Artemev
0e21dd15ba
[JS SCRIPT] Fix script test data
2020-05-14 17:58:33 +03:00
Ilya Muradyan
8a1b44cc2b
Add snippet result type to analysis output of REPL IDE services
2020-05-11 10:45:49 +02:00
Ilya Chernikov
c496b93218
[minor] refactor repl API file layout
2020-05-11 10:45:48 +02:00
Svyatoslav Kuzmich
3d5003d476
[JS_IR] Use new plugin to build Kotlin/JS stdlib with IR compiler
...
- Switch to building stdlib with bootstrap compiler since IR is stable
enough
- Build stdlib with coreLibs by default
- Include JS IR stdlib to kotlin distribution
2020-05-08 10:37:48 +03:00
Ilya Muradyan
6f40ad7de2
Add test for not evaluated snippet
2020-04-22 11:07:32 +02:00
Ilya Muradyan
ea1a6fbee7
Add history consistency check
2020-04-22 11:07:32 +02:00
Ilya Muradyan
e5ca572b91
Forward diagnostics to the evaluation result
2020-04-22 11:07:32 +02:00
Ilya Chernikov
d1a59e8da6
Fix js repl tests compilation
2020-04-17 13:38:51 +02:00
Ilya Muradyan
d2fec96f38
Add new REPL API JVM implementation
2020-04-16 21:16:08 +02:00