Commit Graph

377 Commits

Author SHA1 Message Date
Ilya Chernikov 4243bafd1d Scripting: implement correct disposal of REPL state on finalization
#KT-47927 fixed
2021-08-24 21:39:38 +03:00
Ilya Chernikov a45e31720c Make state of the default REPL compiler explicit and replaceable
restores proper object hierarchy in case the legacy REPL infrastructure
2021-08-24 21:39:37 +03:00
Ilya Chernikov 61e5f68b8d Scripting invalidate compiled cache if a dependency is missing
#KT-48303 fixed
2021-08-24 21:39:35 +03:00
Ilya Chernikov e60e80f19a Scripting: improve reporting on cyclic dependency
#KT-48177 fixed
the issue is in fact fixed by the previous commit (report error
on duplicated import) by normalizing import path before processing,
but here we're making error reporting nicer for the case.
2021-08-24 21:39:33 +03:00
Alexander Udalov 1599a049aa Fix warnings in scripting modules 2021-08-06 22:36:22 +02:00
Mikhael Bogdanov f590c3201a Update ScriptingHostTest.testCompileOptionsLanguageVersion test 2021-07-29 19:45:55 +02:00
Alexander Udalov 0a9498f7e2 Build: suppress deprecated JVM target warning globally
There seems to be no point in configuring the compiler argument per
project. This argument will be deleted soon anyway, when we remove
support for JDK 1.6 & 1.7.

Also remove `disableDeprecatedJvmTargetWarning`. It didn't have any
effect in all modules where it was applied because these modules
reassign `freeCompilerArgs` anyway, with
`-Xsuppress-deprecated-jvm-target-warning` in it.
2021-07-27 13:35:39 +02:00
Nikolay Krasko 83023c2073 Remove 202 platform support in build scripts 2021-07-23 16:58:28 +03:00
Ilya Chernikov 8eb7e719d3 [minor] fix compiler warnings in scripting modules 2021-07-20 19:42:34 +03:00
Dmitriy Novozhilov f3116cb64a Fix NON_EXHAUSTIVE_WHEN_STATEMENT warnings in project code 2021-07-20 13:33:46 +03:00
Ilya Muradyan 014765a302 Add dependencies-maven-all artifact 2021-07-19 21:31:48 +03:00
Ilya Muradyan f7c2adae30 Always use wagon classloader as a plexus class world
In CLI compiler, system classloader doesn't load all classes directly,
so wagons (including HttpWagon) happen to be invisible to
Plexus DI that leads to artifacts download failures.
2021-07-19 21:31:46 +03:00
Ilya Chernikov 0cd29adcc7 Get rid of kotlinx-coroutines usage in scripting libs and plugins
the dependency on the coroutines library caused various problems like
KT-30778, or stdlib/runtime version conflicts.
The only function used was `runBlocking`, so this change replaces it
with the internal implementation based on the similar internal thing
from the stdlib.
#KT-30778 fixed
2021-07-19 16:35:36 +03:00
Mikhail Glukhikh 5871f3d663 CLI: support -option=value syntax for non-advanced flags #KT-47640 Fixed 2021-07-12 21:26:19 +03:00
Yan Zhulanow cf65754ea4 Update 203 bunch 2021-07-08 13:29:18 +03:00
Ilya Chernikov 6911860cca Clean-up coroutines usage in scripting libs and plugin
#KT-30778 fixed (again)
2021-07-05 19:26:42 +03:00
Ilya Chernikov 49e0b639f8 Add JSR-223 tests with compilable and bindings 2021-07-05 19:26:40 +03:00
Ilya Chernikov 32b6cfe2ea [Scripting] fix receiver substitution in script JVM IR lowering 2021-07-05 19:26:39 +03:00
Yahor Berdnikau 7789054547 Migrate repo to use JVM toolchains Gradle feature.
^KT-46972 Fixed
2021-07-05 14:11:12 +00:00
Nikolay Krasko 32f811e0ec Build: Cleanup old platforms from the build 2021-06-09 17:43:53 +03:00
Ilya Muradyan 23faacd21b [Scripting] Expose scripting-dependencies as API of Maven resolver 2021-05-22 04:10:39 +03:00
Ilya Muradyan 0e7d690923 [Scripting] Change compile to implementation in Maven resolver 2021-05-22 00:38:46 +03:00
Ilya Muradyan bead0e3412 [Scripting] Fix Maven resolver dependencies 2021-05-22 00:38:44 +03:00
Ilya Muradyan 7caadd87a2 [Scripting] Get rid of unneeded dependencies in Maven resolver 2021-05-19 18:32:48 +03:00
Ilya Muradyan 55a9f1a910 [Scripting] Make AetherResolveSession internal and do related refactorings 2021-05-17 18:22:29 +03:00
Ilya Muradyan a0cc88ab5a [Scripting] Add transitive support for Maven Resolver 2021-05-17 18:22:28 +03:00
Ilya Muradyan b77a822822 [Scripting] Add authorization for Maven Resolver 2021-05-17 18:22:26 +03:00
Ilya Muradyan 78c65ab802 [Scripting] Bump up Maven resolver JARs version 2021-05-17 18:22:25 +03:00
Ilya Muradyan bab5d16001 [REPL] Stop old classpath calculation on the base classloader
The mechanism of the recursive classpath checking is intended
 for the "inner" scripting/REPL classloaders and should not touch
 anything beyond.
2021-05-12 18:30:43 +03:00
Ilya Muradyan 626c1d3b48 [Scripting] Fix repository ID generation for Maven resolver 2021-05-10 19:40:32 +03:00
Ilya Muradyan 7cea639209 chore: fix typo in comment 2021-05-10 19:40:31 +03:00
Ilya Muradyan e9af2849ef Add Kotlin DeprecationLevel into the REPL completion 2021-05-07 19:56:21 +03:00
Abduqodiri Qurbonzoda 40d1849f33 Migrate compiler, idea and others to new case conversion api 2021-04-08 03:22:02 +03:00
Nikolay Krasko 03c0a81a33 Stop using Bintray in ignored test in MavenResolverTest (KTI-528) 2021-03-31 17:38:54 +03:00
Ilya Chernikov 2f49e8e0af Fix parameter index on IR script generation in REPL scenario
Before it, the wrong index lead to the validation error when repl
script definition had c-tor parameters (see test)
2021-03-26 11:41:24 +01:00
Yan Zhulanow 69fedd9791 Avoid serializing non-serializable properties (EA-253232) 2021-03-16 19:21:50 +09:00
Ilya Chernikov 09fb2cd746 [minor] disable implicits test on IR, see added comments for details 2021-03-11 15:50:33 +01:00
Ilya Chernikov 9c786a9cd9 [minor] uncomment 2 scripting tests:
Tests were failing before, but now fixed, most likely by switching to
default target 1.8 and some changes in scripting IR support.
#KT-44471 fixed
2021-03-11 15:50:31 +01:00
Ilya Chernikov 375441832e Implement REPL support in IR scripting 2021-03-11 15:50:30 +01:00
Ilya Chernikov bc6c17d4b2 Enable IR in jvm scripting host tests 2021-03-11 15:50:06 +01:00
Ilya Chernikov bac6a7346e Extend GeneratorExtensions with previous script, implemt it for JS REPL
also refactor JS REPL for better compatibility with the generic
REPL/scripting infrastructure
2021-03-11 15:50:01 +01:00
Nikita Katkov e1b3cd32f3 IDEA-253605 jvmClassPathUtil: preserve old behaviour 2021-02-24 11:48:32 +00:00
Nikita Katkov 738c6d3119 IDEA-253605 jvmClassPathUtil: correct collection of parent classloaders 2021-02-24 11:48:32 +00:00
Alexander Udalov 1d6b198915 Build: suppress version and JVM target warnings
To further reduce the output on each build.
2021-02-18 12:17:17 +01:00
Ilya Chernikov 09ea4116e4 Implement forced script configuration reloading API for plugins
#KT-43288 fixed
2021-02-09 20:33:18 +00:00
Ilya Chernikov ef4fa3381d Pass provided script configuration to refining code
when script compilation configuration refinement
happening during parsing, the updated configuration
passed to the script compiler/REPL compile function
is now used.
#KT-44580 fixed
2021-02-09 15:22:55 +00:00
Alexander Udalov e0b6d4d917 Add -Xsuppress-deprecated-jvm-target-warning to modules compiled with 1.6
Currently this leads to an unknown argument warning, but it'll be
removed automatically on the next bootstrap.
2021-02-03 12:51:39 +01:00
Dmitriy Novozhilov c0bc492029 Mute some script tests according to KT-44471 2021-01-28 13:19:33 +03: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
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