Commit Graph

34352 Commits

Author SHA1 Message Date
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
Valentin Kipyatkov 452b77692d Incremented binary stub version because of changes with annotation rendering in decompiler 2016-10-11 23:43:45 +03:00
Valentin Kipyatkov 5e32589084 Do not take ParameterName annotations into implicit lambda signature 2016-10-11 23:38:55 +03:00
Valentin Kipyatkov 03320d6559 Use partial resolve 2016-10-11 23:38:55 +03:00
Valentin Kipyatkov 31a4c6671e Fixed incorrect test 2016-10-11 23:38:55 +03:00
Valentin Kipyatkov 968a6cfd04 DescriptorRenderer to skip @ExtensionFunctionType and @ParameterName only when it's redundant 2016-10-11 23:38:54 +03:00
Valentin Kipyatkov ec51076355 DescriptorRenderer to render annotations for all types + separate option to render annotation arguments + use it in IdeDescriptorRenderers 2016-10-11 23:38:54 +03:00
Valentin Kipyatkov 8baa9ba1de No parameter names in type of lambda expression and anonymous function 2016-10-11 23:38:54 +03:00
Valentin Kipyatkov d4050ee074 More correct way of replacing parameter names to preserve overrides 2016-10-11 23:38:53 +03:00
Valentin Kipyatkov 4513f679de Fixed test data 2016-10-11 23:38:53 +03:00
Pavel V. Talanov 14f3e4c758 Cls stubs and decompiled text: Do not render parameter names in decompiled text and do not load ParameterName annotation in stubs
Add tests for decompiled text and stubs
2016-10-11 23:38:53 +03:00
Valentin Kipyatkov 86495fd136 No parameter name in functional type of lambda with 'it' 2016-10-11 23:38:53 +03:00