Natalia Selezneva
63767b4dca
Performance: do not check file type for scripts with standard extension
2019-07-12 16:24:57 +03:00
Ilya Chernikov
bd50454a73
Change default for script displayName parameter to empty, generate name from base class in definition
2019-07-12 13:44:09 +03:00
Ilya Chernikov
0cc40440fb
Implement filePathPattern in the script configuration with handling
...
also
- tests
- extending kdoc for the definitions
2019-07-12 13:44:09 +03:00
Ilya Chernikov
1396b3e682
Return default configuration when refinement failed on resolving script descriptor
...
also fixes appropriate IDE tests
2019-07-11 15:50:27 +02:00
Ilya Chernikov
382e55284c
Fix legacy definitions error propagation
...
also fixes script-util test with resolving errors
2019-07-11 15:50:26 +02:00
Ilya Chernikov
10e19bccb1
Abort script evaluation if environment is created with errors
...
also fixes appropriate test
2019-07-11 15:50:26 +02:00
Ilya Chernikov
9c004c3a52
Refactor scripting compiler plugin - move cli dependent parts out of the -impl jar
...
The kotlin-scripting-compiler-impl jar is used in the idea plugin and
therefore should not depend on the cli parts of the compiler to avoid
dependency from the plugin to the kotlin-compiler.jar.
Therefore the cli-dependent parts were moved to the scripting plugin
jar, which is used only in cli compiler based environments.
Also implement required abstractions to allow this movement and
drop some redundant dependencies to the cli parts in other projects.
2019-07-11 15:50:26 +02:00
Ilya Chernikov
9ae0ff03fa
Improve script and REPL result handling:
...
- implement error result
- refactor other result classes
- implement handling in the script evaluation extension - also restores
previous script error reporting functionality
- add possibility to customize result fileds in script and REPL
- refactor result calculation in the backend: cleanup, rename (since
it is not only about REPL now)
2019-07-11 15:50:26 +02:00
Ilya Chernikov
dc4370ff08
Implement support for new script customizations in command line compiler
...
refactor and fix internals in many places to make it work
add appropriate tests for main-kts case
2019-07-11 15:50:25 +02:00
Nicolay Mitropolsky
69c4db82d4
Uast: IdeaKotlinUastResolveProviderService analyze as BodyResolveMode.PARTIAL_WITH_CFA
...
it is required for `isUsedAsResultOfLambda` in `KotlinULambdaExpression`
2019-07-10 10:33:10 +03:00
Natalia Selezneva
e4d0c2cb0e
Scripts: switch ScriptReportSink to new scripting API
...
Use ScriptDiagnostic instead of ScripReport
2019-07-10 10:10:21 +03:00
Natalia Selezneva
923e89db69
Provide toString method for ScriptCompilationConfigurationWrapper
...
This is needed for debug and logging proposes
2019-07-10 10:10:20 +03:00
Natalia Selezneva
b0c9339dee
Scripts: search for script definition using PsiFile instead of file name
2019-07-10 10:10:07 +03:00
Natalia Selezneva
fbe965be9d
Scripts: pass File finding script definition instead of File.name
2019-07-10 10:08:19 +03:00
Ilya Chernikov
a96a938f87
Fix creating of the script definition from legacy template
...
adding classpath needed to load template and related class to the
appropriate host configuration
fixes tests
2019-07-08 13:20:06 +02:00
Leonid Startsev
4379780ff8
Fixed extra argument in function call after rebase
2019-07-05 18:48:51 +03:00
Leonid Startsev
80ddac64e0
Add serializers for primitive arrays to default types list
2019-07-05 18:14:34 +03:00
Ilya Chernikov
4940f64265
Refactor scripting infrastructure - convert usages to the new entities
2019-07-05 17:02:10 +02:00
Nicolay Mitropolsky
5d081efe60
Uast: tests for no implicit returns in lambdas (KT-32370)
2019-07-04 10:53:48 +03:00
Nicolay Mitropolsky
a180d78eaf
Uast: implicit returns for local function bodies (KT-32370)
2019-07-04 10:53:48 +03:00
Nicolay Mitropolsky
f85ebe7f43
Uast: implicit returns for lambda expressions (KT-32370)
2019-07-04 10:53:48 +03:00
Nikolay Krasko
8b05d4df46
More NoClassDefFoundError fixes in tests after 192 update
2019-07-02 16:45:42 +03:00
Leonid Startsev
7ef9fb5511
Export deserialization constructor from JS module
...
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/443
2019-07-01 14:56:10 +03:00
Vyacheslav Gerasimov
db3b01d2d4
Build: Centralize compiler dist build logic in :kotlin-compiler project
2019-06-27 17:56:48 +03:00
Vyacheslav Gerasimov
6cf5514f6e
Build: Fix jps import for jvm-abi-gen plugin
2019-06-27 17:56:47 +03:00
Leonid Startsev
a3218da1c3
Add IDE diagnostic on @Serializable classes for non-applied serialization plugin
2019-06-27 15:55:38 +03:00
Nikolay Krasko
b7c12014ee
Modify dependencies for 192 branch: more dependencies to full java plugin
2019-06-26 14:11:23 +03:00
Ilya Chernikov
432d500c40
Fix custom script definition cashing and script validity check:
...
- reorder initialization logic, so that script definitions are
requested only after plugins loading
- clear definitions cache after adding explicit definitions or sources
#KT-32206 fixed
#KT-32169 fixed
Note: any of these modification fix the problem alone, but the second
may prevent other similar problems, while the first fixes actual logic
of the script validity checks as well.
2019-06-26 13:01:39 +02:00
Nikolay Krasko
beb1bc09d4
Update to 192.5118.30
2019-06-25 11:48:59 +03:00
Vyacheslav Gerasimov
55f86af67f
Build: Fix test runtime for source-sections-compiler-plugin tests
2019-06-14 19:42:28 +03:00
Vyacheslav Gerasimov
986e1ceefb
Build: Fix test runtime for sam-with-receiver-compiler-plugin tests
2019-06-14 19:38:13 +03:00
Vyacheslav Gerasimov
e32bbcecc2
Build: Fix test runtime for kotlinx-serialization-compiler-plugin tests
2019-06-14 18:18:08 +03:00
Vyacheslav Gerasimov
5a664a86a8
Build: Fix test runtime for kotlin-scripting-compiler tests
2019-06-14 18:10:24 +03:00
Vyacheslav Gerasimov
e8e457a16c
Build: Fix uast compilation against 192 platform
2019-06-13 21:57:57 +03:00
Vyacheslav Gerasimov
0514437fba
Build: Workaround scripting dependencies on full Idea
2019-06-13 21:03:55 +03:00
Vyacheslav Gerasimov
5a39c637c2
Build: Fix intellij dependency leak from ir tree module
2019-06-13 21:03:55 +03:00
Yan Zhulanow
bd342e765d
SamWithReceiver: Fix IDE plugin JAR name
2019-06-13 17:33:24 +09:00
Yan Zhulanow
bc0f10449a
Kapt: Fix source root importing in MPP projects
2019-06-13 17:33:24 +09:00
Yan Zhulanow
9eab9f386d
Activate Kapt importer only for JVM compilations (KT-30578)
2019-06-13 17:33:24 +09:00
Leonid Startsev
b78d84c120
Add some tests for kotlinx.serialization plugin:
...
- declaration checker
- bytecode listings
- JVM IR
Improve @Transient redundant reporting
2019-06-11 19:32:40 +03:00
Leonid Startsev
414c116d93
Fix too strict serializer lookup for generic type parameters
2019-06-10 16:49:19 +03:00
Vyacheslav Gerasimov
5bde9720b7
Build: Fix dependencies on :kotlin-compiler project
...
Dependencies on :kotlin-compiler should never be used in configurations
which are imported transitively because ide fails to import it as
project dependency. When :kotlin-compiler dependency is imported as
kotlin-compiler.jar dependency ide re-indexes it on every change. This
behaviour is super annoying.
#KT-31120 Fixed
2019-06-08 19:36:28 +03:00
Mikhail Zarechenskiy
42b7552d17
Fix exception on attempt to map inner non-fixed type variable
...
#KT-31842 Fixed
2019-06-07 01:18:47 +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
Leonid Startsev
3792c44378
Make short path for non-serializable classes and other improvements:
...
Adjust some error messages
Add 'fallbackElement' to report on when property is implicitly typed
Split findTypeSerializerOrContext into checked and unchecked versions
2019-06-05 19:13:03 +03:00
Leonid Startsev
dc79b99dd2
Implement inspection about no-arg constructor in non-serializable supertype
2019-06-05 19:11:18 +03:00
Leonid Startsev
8f77b55ada
Retrieve serializable properties from binding context in most of the places
...
Remove unused record 'SERIALIZER_FOR_PROPERTY'
2019-06-05 19:11:18 +03:00
Leonid Startsev
fe1f36bc02
Report an error on @Serializable inline classes and missing @Transient initializers
2019-06-05 19:12:34 +03:00
Leonid Startsev
e6d96f1de9
Implement diagnostic about nullable serializer for non-nullable type
2019-06-05 19:12:00 +03:00
Leonid Startsev
6895184b84
Implement basics diagnostics reporting from the serialization plugin similarly to noArg and allOpen plugins
2019-06-05 19:11:20 +03:00