Commit Graph

43 Commits

Author SHA1 Message Date
Natalia Selezneva d68c3584f2 Scripting: add test for loading configuration for gradle scripts 2019-12-16 14:55:42 +03:00
Sergey Rostov 75a23b4bc4 Minor: changes after review 2019-11-22 11:43:35 +03:00
Sergey Rostov 0fb58ed94c Scripting loading tests and extension points 2019-11-22 11:43:34 +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
Roman Golyshev 28e2d2faf2 KT-34740 Make getImplicitReceiversWithInstanceToExpression keep script implicit receivers
- This makes completion aware of scripts implicit receivers (it matters in .gradle.kts files, for example)
- ^KT-34740 Fixed
2019-11-22 11:22:46 +03:00
Natalia Selezneva 35e2c9eb59 Fix scripting tests in 193
^KT-34541 Fixed
2019-10-30 12:02:45 +03:00
Nikolay Krasko 697d3a0e5a 193: Mute scripting test in 193 (KT-34541) 2019-10-28 14:06:06 +03:00
Natalia Selezneva 63e5d4fe95 Tests: rewrite some AbstractScriptConfigurationTest to the new script infrastructure 2019-09-23 12:06:25 +03:00
Natalia Selezneva eca7bbdb8c Scripts: Check if file is in all script dependencies class files scope instead of searching for module info
^KT-32799 Fixed
^KT-16760 Add test
2019-09-23 12:06:25 +03:00
Natalia Selezneva 3ad7f516be Add caret to test to check exception in ProjectResolutionFacade that can happen during resolving of symbol from script dependencies 2019-09-20 10:35:52 +03:00
Ilya Chernikov e542c9ea84 Refactor script definitions and resolving/refining infrastructure:
- implement wrappers to wrap old and new API providers and resolvers
- make old API deprecated (with error where possible)
- drop old internal classes related to the old API
- refactor usages accordingly
- fix and add missing features to the scripting API where necessary
2019-06-06 17:21:00 +02:00
Natalia Selezneva 58eca451c4 Sdk passed in script dependencies should be used during script resolve
PsiElementFinder doesn't find classes from sdks that aren't Project SDK, so when Script Sdk differs from it we need to additionally search classes in script sdk using KotlinScriptDependenciesClassFinder (as we do for classes from ScriptDependencies.classpath)

^KT-31152 Fixed
2019-05-20 10:41:15 +03:00
Natalia Selezneva 6eff314b9d Script tests: check that script is highlighted 2018-12-26 16:56:49 +03:00
Natalia Selezneva c2315f065a Add test for script definitions settings 2018-10-15 11:32:49 +03:00
Natalia Selezneva 4b138ae2b8 Do not use async script dependencies resolver in tests 2018-09-13 14:50:22 +03: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 8674cd7a6b Fix scripting tests 2018-09-06 19:17:43 +02:00
Natalia Selezneva 6672fd7bbf Fix tests for highlighting in scripts with custom script definition 2018-08-03 15:25:35 +03:00
Natalia Selezneva 41dc059da9 Register custom file extension for scripts loaded from script template 2018-08-03 15:25:35 +03:00
Natalia Selezneva 5741f81f25 Fix AbstractScriptConfigurationTest
Add dependency on script runtime for module.
Provide default test script template thought template-classpath.
2018-07-10 08:43:52 +02:00
Natalia Selezneva 2b322ecf9c Do not store external dependencies in ScriptModuleInfo
There is a cache from ScriptModuleInfo to ScriptDependenciesInfo.
In case when only script dependencies are changed we won't recreate the facade for them and will obtain external dependencies for ScriptModuleInfo stored in ScriptDependenciesInfo. So we cannot store external dependencies inside ScriptModuleInfo. The same problem is with relatedModuleSourceInfo.
2018-05-24 08:47:32 +03:00
Natalia Selezneva 49a1788728 Update testData after switching on kotlin internal mode in tests 2018-05-03 11:32:52 +03:00
Natalia Selezneva a58bc7f301 Fix transitive module dependencies for scripts 2018-04-10 14:07:04 +03:00
Natalia Selezneva 8d9f539c79 Return correct ProjectFacade for script and its dependencies
^KT-22588 Fixed
2018-04-10 14:06:34 +03:00
Natalia Selezneva f8ad244899 Rewrite AbstractScriptConfigurationTest to test file from project sources
Changes in testData are needed to avoid running injection for string literals
2018-04-10 14:06:23 +03:00
Natalia Selezneva 3d73786e98 Highlight scripts according to ScriptLocation annotation in ScriptDefinition 2018-03-30 14:43:17 +03:00
Natalia Selezneva 58edab37c1 Add test for fatal severity in scripts 2018-03-19 09:41:38 +03:00
Natalia Selezneva 4b4acfee2c Scripts: display errors from external resolver in panel if text range is empty 2018-03-17 00:21:10 +03:00
Pavel V. Talanov 6551ee5403 Test completion in script files
Test for 'JavaResolutionUtils.getJavaDescriptorResolver' failing with AE
Tests ebd3ac6dc8
See EA-105435
2017-12-25 20:12:46 +03:00
Pavel V. Talanov deda5e7eee Fix navigation to script dependency sources failing
Specifically in case where some lib is in project and script dependencies at the same time
2017-09-08 15:06:00 +03:00
Pavel V. Talanov ebd3ac6dc8 Fix script resolver failing
Specifically the case where some lib is in project dependencies and script dependencies at the same time

 #EA-105435 at least partially fixed
 #KT-19458 Fixed
 #KT-19474 Fixed
2017-09-08 15:05:58 +03:00
Pavel V. Talanov 53144def10 AbstractScriptConfigurationTest: rewrite script template setup
Allow simpler setup of common scenarios
Do not require to define DependenciesResolver for every test
Drop redundant template files
2017-09-08 15:04:17 +03:00
Pavel V. Talanov a120130069 Workaround NonClasspathClassFinder not supporting inner classes
Explicitly split qualified names, can be removed once platform is fixed

 #KT-19310 Fixed
2017-08-29 20:54:25 +03:00
Pavel V. Talanov 05ea99441f script.runtime 1.1.4: Update test data implementations 2017-07-30 18:21:35 +03:00
Pavel V. Talanov 5faad493b4 Catch and report exceptions from DependenciesResolver 2017-07-19 12:29:25 +03:00
Pavel V. Talanov b1ac451959 Make sure template classpath is always among script dependencies 2017-07-19 12:29:15 +03:00
Pavel V. Talanov 1b42095dc1 Support @AcceptedAnnotations for different kinds of resolvers 2017-07-19 12:28:49 +03:00
Pavel V. Talanov 1c412b4068 AsyncDependenciesResolver: provide implementation for sync resolve 2017-07-19 12:28:46 +03:00
Pavel V. Talanov 10e14103b6 Propagate reports from script dependency resolver
Compiler: show as compiler messages
IDE: annotate code in a separate highlighting pass
2017-07-19 12:28:20 +03:00
Dmitry Jemerov 8f38d03b48 Indicate vararg parameters in Goto Symbol presentation
#KT-17899 Fixed
2017-05-18 21:02:24 +02:00
Ilya Chernikov 88652154c9 Port compiler to the script-runtime with script base classes 2017-04-06 10:02:45 +02:00
Pavel V. Talanov 434018f679 ScriptConfigurationNavigationTest: test navigation to kotlin library 2017-03-21 16:19:59 +03:00
Pavel V. Talanov 10660f35d7 Add tests for script configuration machinery, namely ScriptTemplateProvider EP
Test highlighting and navigation depending on provided script definition
2016-08-16 16:45:59 +03:00