Commit Graph

34363 Commits

Author SHA1 Message Date
Ilya Chernikov 846797ff61 Switch to templates in the separate script runtime 2016-10-12 15:38:52 +02:00
Ilya Chernikov c2b5c11781 Fix all small and medium-sized issues after review 2016-10-12 15:37:54 +02:00
Ilya Chernikov 9617fc7d6b Add kotlin-daemon-client.jar to the lib folder of plugin artifact 2016-10-12 15:37:53 +02:00
Ilya Chernikov e03601317b Attempt #2 to fix kotlin-script-util test on TeamCity 2016-10-12 15:37:53 +02:00
Ilya Chernikov 16897f4935 Remove usage of getLocalHost, other minor changes related to localhost connections in daemon
- attempt to fix behaviours similar to #IDEA-161962, #KT-14042
2016-10-12 15:37:53 +02:00
Ilya Chernikov ea4a1df839 Refactor session accounting in daemon, add REPL to it, write a test 2016-10-12 15:37:53 +02:00
Ilya Chernikov 3a52c68973 Attempt to fix kotlin-script-util test on TeamCity 2016-10-12 15:37:53 +02:00
Ilya Chernikov 101d85fc0b Fix binary compatibility test data after adding more templates to the runtime 2016-10-12 15:37:52 +02:00
Ilya Chernikov 1a24d37e7f Rename back the file to avoid breaking compatibility with gradles-script-kotlin without real necessity 2016-10-12 15:37:52 +02:00
Ilya Chernikov 10d259771c Refactor repl and JSR 223 support code, add separate example jars for each type of JSR 223 repl (with tests) 2016-10-12 15:37:52 +02:00
Ilya Chernikov 079fece9b4 Add daemon client jar to libraries project 2016-10-12 15:37:52 +02:00
Ilya Chernikov bf0d5b6237 Add basic bindings support to IDEA JSR223 scripting, fix evaluator 2016-10-12 15:37:51 +02:00
Ilya Chernikov bdaaf4fb09 Add more basic script templates to runtime 2016-10-12 15:37:51 +02:00
Ilya Chernikov 063fbed75e Fix params handling in JSR 223 for Idea, add simple test 2016-10-12 15:37:51 +02:00
Ilya Chernikov 6da7276510 minor: Fix and relax error handling on script template loading 2016-10-12 15:37:51 +02:00
Ilya Chernikov 759f6f3ded Fix script tests with output capture 2016-10-12 15:37:51 +02:00
Ilya Chernikov 439622187f Move Jsr223 engine from compiler jar to script-util.jar (libraries part) 2016-10-12 15:37:50 +02:00
Ilya Chernikov 52f291f372 Implement tests for generic and remote repls 2016-10-12 15:37:50 +02:00
Ilya Chernikov 43037373d7 Implement params to pass args to generic and remote repls to support script templates with params 2016-10-12 15:37:50 +02:00
Ilya Chernikov f0d2f458e0 Fix script codegen for REPL lines with ScriptTemplate with parameters 2016-10-12 15:37:50 +02:00
Ilya Chernikov fe69185cd4 Refactor script definition and related parts:
- simplify script definition interface, convert it to class
 - create simple definitions right from base
 - refactor (rename and simplify) script definition with annotated template
 - simplify usages of script definition in many places
2016-10-12 15:37:50 +02:00
Ilya Chernikov 6bc488d95d Implement JSR 223 engine and factory for IDEA using daemon repl 2016-10-12 15:37:49 +02:00
Ilya Chernikov 1a137357e5 Add support for custom script compilation and execution to maven plugin, add simple test, relevant refactorings on the compiler side 2016-10-12 15:37:49 +02:00
Ilya Chernikov 86ece30330 Add remote repl support to the daemon, refactor repl classes accordingly, simple tests 2016-10-12 15:37:49 +02:00
Ilya Chernikov 042fc4fadc Add remote input stream support, plus minor tweaks 2016-10-12 15:37:49 +02:00
Ilya Chernikov eaa332019a Prepare repl interfaces and generic implementation for separation into possibly remote parts 2016-10-12 15:37:48 +02:00
Ilya Chernikov f992f91686 Add kotlin-script-util lib with tests
- collection of standard templates and resolvers
2016-10-12 15:37:48 +02:00
Ilya Chernikov 42a4f0ed70 Compile most test scripts with runtime 2016-10-12 15:37:48 +02:00
Ilya Chernikov 385aab8418 Add output checking to script tests 2016-10-12 15:37:48 +02:00
Ilya Chernikov 0b68f313ab minor: fix typos and terminology 2016-10-12 15:37:48 +02:00
Ilya Chernikov ba4fab56a0 Implement basic JSR 223 scripting support 2016-10-12 15:37:47 +02:00
Ilya Chernikov 63c5133167 Remove support for xml-based script configs, other minor refactorings 2016-10-12 15:37:47 +02:00
Ilya Chernikov 0f31695a0b Convert error on retrieving gradle plugin settings to warning - fixes #KT-13975, #EA-87275, #EA-87677 and alike 2016-10-12 15:37:47 +02:00
Ilya Chernikov 9618863b72 Hide EA-86599 in a log warning 2016-10-12 15:37:47 +02:00
Ilya Chernikov b127cc3941 Attempt to get more diagnostic from EA-86371 2016-10-12 15:37:46 +02:00
Alexander Udalov 777004a0e2 Fix test data after merge 2016-10-12 12:52:38 +03:00
Alexander Udalov e37a20d6b3 Do not deserialize type aliases in compatibility mode
When "-language-version 1.0" is specified in command line arguments, the
compiler should not be able to see the declarations of type aliases in
libraries, because that corresponds to the behavior of the compiler of version
1.0. Note that type aliases are _completely invisible_ in this mode (i.e.
"unresolved reference" is reported) because they must not interfere with the
classifier resolution
2016-10-12 12:19:19 +03:00
Alexander Udalov d96f10c7bd Refactor deserialization of nested type aliases
Do it exactly in the same way as with properties/functions, in
DeserializedMemberScope and nowhere else
2016-10-12 12:19:18 +03:00
Alexander Udalov 88af36001c Introduce DeserializationConfiguration
Will be used soon to deliver the language/API-version-related behavior to the
deserialization
2016-10-12 12:19:17 +03:00
Simon Ogorodnik 25b9542c06 Fix for KT-11375, KT-9710, KT-8161 2016-10-12 12:08:48 +03:00
Simon Ogorodnik df0dddedc2 Fixes for test(@JvmStatic -> const), fix for prototype assign 2016-10-12 11:56:54 +03:00
Simon Ogorodnik e84f56348c Fix KT-13750, J2K const val serialVersionUID 2016-10-12 11:56:54 +03:00
Denis Zharkov 05aa9a5682 Add a quickfix for warning on ambiguously annotated expression
#KT-14238 Fixed
2016-10-12 11:40:16 +03:00
Denis Zharkov 84153f9636 Add warning for ambiguous annotated expression syntax
#KT-14238 In Progress
2016-10-12 11:40:12 +03:00
Denis Zharkov 993d226c8f Minor. Extract method for annotations resolution on expression 2016-10-12 11:39:04 +03:00
Denis Zharkov bec84b1d7b Change parsing of annotations on block level expressions
Attach annotations to the closest prefix expression instead of
whole statement if no new line found after annotations

The motivation is for a simple annotated expression like '@ann x + y'
its syntax form must not change after prepending 'val z = ' just before it
2016-10-12 11:39:04 +03:00
Denis Zharkov 9ff439e39e Change annotations parsing in bodies of operators
This change only matters in cases of if/when/for/while having braceless
blocks

Annotations on them are parsed now as on block-level expressions, i.e.
they're attached to the whole expression
2016-10-12 11:39:04 +03:00
Denis Zharkov c01b4156d8 Minor. Rename methods in parser
Method that was called `parseControlStructureBody` is actually used for
loop bodies only, while `parseExpressionPreferringBlocks` used for
parsing body of control structure (i.e. it must be called
`parseControlStructureBody`)
2016-10-12 11:39:04 +03:00
Simon Ogorodnik 12efb20869 Regenerated tests 2016-10-12 11:08:49 +03:00
Simon Ogorodnik 1a7c507cc5 Fix for KT-13818
Javadoc @code conversion
2016-10-12 11:08:49 +03:00