Commit Graph

2216 Commits

Author SHA1 Message Date
Mikhail Bogdanov 58183b774d Fix test data 2020-06-19 15:07:36 +02:00
Ilya Chernikov d5ffc7416d Clean-up and improve sam-with-receiver test with scripts 2020-06-19 14:08:19 +02:00
Ilya Chernikov cd1bf563cd Add error reporting on the options parsing errors in scripting
also report standard parsing warnings
also fix language version test, since it is not possible anymore
  to use version 1.0
2020-06-19 13:20:58 +02:00
Mathias Quintero f0bc52222d Fix annotation construction with array literals
Turns out the issue happens to be that ArrayValue uses a list of values which needs to be translated to an array of the percise type before it is used by callBy

This also addresses handling of arguments after a vararg in an annotation
2020-06-19 13:20:57 +02:00
Efeturi Money 8cb4f59114 Explicitly handle array annotation args in scripting pre-processing
#KT-35411 fixed
2020-06-19 13:20:57 +02:00
Ilya Muradyan 743abea690 Don't create default importing scopes for REPL snippets
Default scopes should be created only once, for the first snippet.
All following snippets should not create new default importing scopes.
#KT-35651 fixed
2020-06-19 13:03:25 +02:00
Ilya Muradyan 53b31a20ca Refactor REPL IDE services testing configuration and add new tests 2020-06-19 13:03:24 +02:00
Ilya Muradyan 94de114894 Support selective filtering of implicits for extensions resolution in REPL 2020-06-19 13:03:23 +02:00
Mikhail Bogdanov 929bb0e8d1 Move common logic from CodegenTestCase to KotlinBaseTest 2020-06-19 11:57:36 +02:00
Yan Zhulanow 559561ca6b Add missing intellij-core dependency for sam-with-receiver tests 2020-06-18 19:01:44 +09:00
Ilya Muradyan 8c2baf0704 Add missing definitelyDoesNotContainName methods 2020-06-18 09:51:16 +02:00
Mikhail Glukhikh 175e94c0aa Revert kotlinx-serialization-compiler-plugin OptIn dependency 2020-06-16 19:17:18 +03:00
Mikhail Glukhikh ab5cb13dae Rename: DescriptorBasedIr -> ObsoleteDescriptorBasedAPI 2020-06-16 19:17:14 +03:00
Mikhail Glukhikh cbbb497edf Make descriptor-based API in ir:tree more granular 2020-06-16 19:17:12 +03:00
Mikhail Glukhikh 1c2fbb61fe [IR] Introduce & use declaration-based SymbolTable.withReferenceScope 2020-06-16 19:17:04 +03:00
Ilya Chernikov 74c697af92 Fix SamWithReceiver tests for scripts, add tests...
that use new script definition and ability to load
annotations from script definition
2020-06-16 17:11:33 +02:00
Ilya Chernikov 8fb41e4562 Process compiler plugins and options in scripting compiler
#KT-37766 fixed
2020-06-16 17:11:33 +02:00
Vyacheslav Gerasimov b4df4e5525 Build: Fix variant resolution ambiguity 2020-06-14 20:31:27 +03:00
Vyacheslav Gerasimov 4aa3040550 Build: Use runtimeOnly instead of deprecated runtime
maven-publish plugin uses `runtimeOnly` for runtime scope instead of
`runtime`
2020-06-14 20:31:26 +03:00
Nicolay Mitropolsky 1b1e579cbf 201: Uast: fixing KotlinUastGenerationTest by using system-independent inline unaware asRecursiveLogString 2020-06-11 19:34:55 +03:00
Ilya Muradyan c2ede13d5a Fix importing scopes problem for scripting REPL
We don't need to add any importing scopes for a snippet if it doesn't
contain import directives. This fix optimizes performance by reducing
importing scopes count.
2020-06-11 16:16:13 +02:00
Ilya Muradyan 262e21fcbc Add overload to comply with the contract
Method getVariableNames() should return all variable names, but in the
inherited implementation it doesn't return resX names which represent
result fields.
2020-06-11 16:16:12 +02:00
Alexander Udalov 6e67e1e78d Replace appendln with appendLine in project 2020-06-11 13:01:30 +02:00
Mathias Quintero 83087291df Add API to get locations of collected script annotations
#KT-38404 fixed

also:
- Add wrapper class for the location combined with the location id
- Add source code location parameters to external dependency resolvers
- Add tests for locations in annotations
- Add tests for order of annotation resolution for dependencies resolvers
2020-06-10 16:28:41 +02:00
Nikolay Krasko 6babc73320 AS41: Fix problems with initialization of Android plugin in tests
org/intellij/images/fileTypes/ImageFileTypeManager
java.lang.NoClassDefFoundError: org/intellij/images/fileTypes/ImageFileTypeManager
	at org.jetbrains.android.AndroidPlugin.lambda$registerWebpSupport$1(AndroidPlugin.java:50)
2020-06-10 13:01:20 +03:00
Nikita Bobko ff7576f8e4 202: Fix compilation 2020-06-10 12:39:29 +03:00
Mads Ager dc34d355bc [JVM_IR] Generate line numbers and nops for init blocks.
This seems to be what JVM does and it allows you to set a
breakpoint on the init line.
2020-06-10 08:05:52 +02:00
Vladimir Dolzhenko 9319c4c96e DryRun mode for GenerateTests is added
Relates to #KTI-17
2020-06-08 19:05:10 +00:00
Ilya Muradyan 489290263f Add info about the end of range in scripting REPL compiler messages 2020-06-05 21:58:28 +02:00
Ilya Chernikov 5e33612238 Extract interface from CompilerMessageLocation to ease extension
The CompilerMessageLocation is an implicit part of the binary daemon
protocol so changing it breaks compatibility with older daemons.
This change allows to extend location for non-daemon uses without
breaking the binary protocol.
2020-06-05 21:58:27 +02:00
Dmitry Gridin 3fdf048e51 Regenerate Serialization* tests 2020-06-05 17:13:28 +07:00
Dmitriy Novozhilov 6c5181d8ce [FIR-PLUGIN] Add status transformer for default visibility 2020-06-05 10:34:01 +03:00
Dmitriy Novozhilov 1ffe438fa1 [FIR-PLUGIN] Update AllOpenStatusTransformer according to previous commit 2020-06-05 10:34:00 +03:00
Pavel Kirpichenkov 7fff8f82e2 Changes after review
- Replace leaking ModuleResolverTracker with use of ModuleDescriptor.Capabilies
- Provide API for retrieving ResolverForProject from ResolutionFacade
- Update names
2020-06-03 20:58:07 +03:00
Dmitriy Novozhilov f2d0d8b422 [FIR-PLUGIN] Add test for supertype modification extension 2020-06-03 13:10:17 +03:00
Dmitriy Novozhilov 0c18cb054d [FIR-PLUGIN] Add tests for generating declarations from plugin 2020-06-03 13:10:17 +03:00
Dmitriy Novozhilov 9cc13c8324 [FIR-PLUGIN] Add dummy implementation for nested class generator extension 2020-06-03 13:10:16 +03:00
Dmitriy Novozhilov 8acdb39bdd [FIR-PLUGIN] Add dummy implementation for member generator extension 2020-06-03 13:10:16 +03:00
Roman Artemev 5eae262264 [PLUGIN API] Implement custom linkage for plugin extensions 2020-06-03 12:17:14 +03:00
Yunir Salimzyanov 3b9000cc0c Cleanup 191 extension files (KTI-240) 2020-06-01 18:43:10 +03:00
Yunir Salimzyanov 7ab7ca5ff0 Cleanup as35 extension files (KTI-240) 2020-06-01 18:43:10 +03:00
Leonid Startsev 1d589e3f56 Rework access to properties in IR plugin
use accessors instead of fields whenever possible
2020-06-01 17:48:17 +03:00
Leonid Startsev 7c8c5b057f Extensible mechanism for plugin metadata during descriptor serialization
A mechanism that allows kotlinx.serialization plugin to preserve the
correct (program) order of properties after serializing/deserializing
descriptors to kotlin metadata, which is needed for correct and stable
json serialization of class hierarchies in incremental/multi-module scenario.
It uses protobuf extensions.
2020-06-01 17:48:16 +03:00
Natalia Selezneva fd07d5f301 Scripting setting: auto reloading of script dependencies is now per definition 2020-06-01 15:12:53 +03:00
Ilya Muradyan bbe00b2fdc Add scripting REPL completion options
nameFilter - way of filtering descriptors by their names;
filterOutShadowedDescriptors - if true, filters out descriptors
shadowed by descriptors in latter-compiled snippets. May slow down
completion performance.
2020-05-31 17:05:24 +02:00
Nicolay Mitropolsky 6ed453dfbc Uast: removing deprecated JvmDeclarationUElement (KT-23887) 2020-05-31 06:54:12 +03:00
Yunir Salimzyanov 8d51b027ed Add annotation to prevent test invocation twice
Cause: it helps to fix double inversion of muted non-flaky tests result
(KTI-216).
2020-05-30 22:50:34 +03:00
Nicolay Mitropolsky 86e434195e Uast: UastKotlinPsiVariable made isEquivalentTo it's physical PSI (KT-39174) 2020-05-29 11:00:47 +03:00
Dmitriy Novozhilov 1973060e8c [FIR-PLUGIN] Fix AllOpenClassGenerator after previous commit 2020-05-29 10:22:03 +03:00
Dmitriy Novozhilov 41cdb61ef3 [FIR] Move all symbol providers to separate package 2020-05-29 10:20:57 +03:00