Commit Graph

1856 Commits

Author SHA1 Message Date
Pavel Kirpichenkov b7e5d9faae Update annotation rendering in diagnostics
Disable annotation rendering in default type and descriptor renderers.
Preserve annotations in Android and Serialization plugins.
Update error texts in ide tests.
Nullability annotations in Java descriptors are rendered with context-dependent renderer.

#KT-20258 Fixed
2019-10-04 11:18:45 +03:00
Ilya Chernikov b8258bfc71 Drop TestCaseWithTempDir usage from scripting compiler plugin tests
fighting with flaky tests
2019-10-03 12:24:50 +02:00
Ilya Chernikov 3fec15202f [minor] fix source root creation from imported scripts:
make the usages of KotlinSourceRoot consistent everywhere
2019-10-03 12:24:50 +02:00
Igor Yakovlev ca9e760379 Remove redundant analyzeWithAllCompilerChecks from NoArg plugin test 2019-10-01 13:53:20 +03:00
Ilya Kirillov 2ace905429 Fix IndexOutOfBoundsException (EA-211554) in SerializationPluginDeclarationChecker 2019-09-29 12:27:44 +03:00
Georgy Bronnikov 6c2eb3dd16 Change expected test output 2019-09-27 16:32:15 +03:00
nicolay.mitropolsky 995dda3785 Uast: support for String-identifiers 2019-09-27 12:22:07 +03:00
Ilya Chernikov 0a1aff4f80 Do not add updated script classpath to the compilation configuration
it is added via the updateClasspath call with proper duplicates control
2019-09-26 07:16:24 +02:00
Vyacheslav Gerasimov c1e1dbd83e Build: Fix usages of "java.home" for tools.jar dependency
#KT-33984
2019-09-25 17:54:18 +03:00
Ivan Gavrilovic 4da6675640 Do not depend on BaseFileObject type for incremental KAPT
This class does not exist in JDK9, so running incremental KAPT on
JDK9 fails. Because it is used only to get the name of the file,
this has been replaced with usage of the public JavaFileObject API.
2019-09-25 19:21:10 +09:00
Ivan Gavrilovic aaa00b0f6f KT-33889: Do not use private non-API methods from JavacProcessingEnvironment
Avoid using JavacProcessingEnvironment.validImportStringToPattern method
because it has been removed in JDK9. This commit changes how we compute
pattern to match the class names, and it create instances of Pattern
manually by following spec for Processor.getSupportedAnnotationTypes().
Support for module prefix is not added yet.
2019-09-25 19:21:10 +09:00
Vyacheslav Gerasimov d54bc3a4bb 193: Fix tests compilation for 193 platform 2019-09-24 18:22:35 +03:00
Igor Yakovlev 286702a99c Format code for NoArgPlugin 2019-09-23 17:07:33 +03:00
Igor Yakovlev 1deba19e1c Refactoring NoArg compiler plugin
Remove NoArgClassKey relation betwen AbstractNoArgDeclarationChecker and NoArgExpressionCodegenExtension
Separate NoArgExpressionCodegenExtension to Ide and Cli versions
2019-09-23 17:07:33 +03:00
Ivan Gavrilovic 573e7f2eee Run JDK11 tests for KAPT only if JDK11 is available
Otherwise, just skip running them.
2019-09-23 17:32:37 +09:00
Ivan Gavrilovic 0cdfe89a26 KT-33052: Fix KAPT stub generation for enums on JDK11
When using JDK11, generating stubs for enums is broken.
This commit handles the faulty generation by JDK11 by
fully printing enums in custom implementation of tree
printing.

Test: added JDK11 tests for KAPT stub  generation
2019-09-20 00:04:27 +09:00
Ivan Gavrilovic 60fa632d02 KT-33515: Remove Kotlin sources generated by KAPT
When KAPT is unable to run incrementally make sure to
clean directory that contains generated Kotlin sources.
This location is specified using '-Akapt.kotlin.generated'
option.
2019-09-20 00:04:27 +09:00
Kevin Bierhoff 565099d941 fix new test name 2019-09-18 14:42:32 +03:00
Kevin Bierhoff bc207ed8db fix for KT-29471
#KT-29471 Fixed
2019-09-18 14:42:09 +03:00
Vyacheslav Gerasimov 381f6d8226 193: Inline removed parents method in UastLightIdentifier 2019-09-17 21:16:13 +03:00
Ilya Chernikov d3b826c71d Improve class name generation for scripts and REPL snippets
- allow to override default name/scheme
- implement host/engine specific names for jsr223 to avoid classloading
  clashes (also fix "eval in eval" test)
2019-09-17 16:05:38 +02:00
Ilya Chernikov 6de05bb2c7 Drop hardcoded extraction of the snippet id from script name
rely on the userdate instead
2019-09-17 16:05:38 +02:00
Ilya Chernikov 61d517fb31 Implement script dependencies resolution directly from classloader
#KT-27956 fixed
2019-09-17 12:43:18 +02:00
Ilya Chernikov f8db150a2b [minor] Drop some usages of kotlin reflection in scripting compiler plugin 2019-09-17 12:43:16 +02:00
Leonid Startsev cec37cf78a Add supertype type arguments to super() call in deserialization ctor
#KT-31619 fixed
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/525
2019-09-16 15:03:17 +03:00
Leonid Startsev 0b669e72b0 Do not report error about 'initializer required for @Transient properties' on lateinit vars
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/553
2019-09-16 15:03:17 +03:00
Leonid Startsev 4e516d7c94 Fix IR validation warnings in serialization plugin
- Insert patchDeclarationParents after whole processing
- Copy IR nodes to avoid duplications
- Insert correct type for getter during serialization of properties from parent class
- Do not use irThrowIse because it is broken somewhere in Native backend
2019-09-16 15:03:17 +03:00
Igor Yakovlev 27accbb089 Fix KotlinLintTestGenerated.testParcel + extensions registrations fixes 2019-09-13 19:40:31 +03:00
Ilya Chernikov b2d2ba5811 Refactor test utils: don't add main-kts to the classpath...
by default on running scripting tests via the call to K2JVMCompiler
2019-09-13 13:19:26 +02:00
Ilya Chernikov 45f5c42a53 Add appropriate script extension to the source name, if not provided
#KT-31704 fixed
2019-09-13 13:19:26 +02:00
Ilya Chernikov 939d76fd2a Isolate script execution from compiler classloader
Since fix of KT-33554, the script execution classpath is set correctly
according to the compilation classpath, so isolation makes sense now.
2019-09-13 13:19:26 +02:00
Ilya Chernikov 771f5c13dd Fix imported script functionality in JSR-223/REPL:
- setup compilation properly to take imported scripts into account
- add compiled imported scripts into generated results
= calculate ScriptLightVirtualFile path as relative - simplifies imported scripts location
2019-09-13 13:19:26 +02:00
Igor Yakovlev 5dc29b9059 Fix build 183 - add missing functions 2019-09-12 18:42:56 +03:00
Igor Yakovlev 841ed45440 Fix build 183 - missing imports added 2019-09-12 17:53:31 +03:00
Igor Yakovlev cfcecaaeab LightClassApplicabilityCheckExtensions refactoring and IdeSerializationPluginApplicabilityExtension fix 2019-09-11 17:05:13 +03:00
Igor Yakovlev 2b7dee6f8d Add CodegenApplicabilityCheckerExtension and use it to fallback to Heavy LigthClasses
+ Fixed #KT-33584
2019-09-11 15:29:12 +03:00
Nikolay Krasko edb700b898 Switch to 192 platform 2019-09-06 11:28:25 +03:00
Natalia Selezneva 961e8c2c74 Refactor the mechanism how script configurations are updated
Introduce file attributes cache, which is only applicable when no dependencies are cached in memory cache
Refactor ScriptDependenciesCache to memory cache that is able to get configuration from cache and checks if it is up to date
Move all public methods to ScriptDependenciesManager
Introduce ScriptClassRootsManager that checks if root change event should be called after script configuration update
2019-09-06 10:52:17 +03:00
Natalia Selezneva dc46f73ecf Rewrite scripting related API to PsiFile instead of VirtualFile
There were several places where we converted virtualFile to PsiFile. This operation need a read access and may throw ProcessCanceledException,
so we want to minimize its usages in IDE
2019-09-06 10:51:26 +03:00
Alexander Udalov bf5ca2ed84 Cleanup compiler warnings in IR-related modules 2019-09-03 19:32:57 +02:00
Darya Razumova 5fc6fa8619 Unregistered bunch directives and files test 2019-09-02 18:31:06 +03:00
Nikolay Krasko b856d60575 Add required plugins for Android Studio 3.6 to runtime 2019-09-02 15:14:32 +03:00
Nikolay Krasko 8ae4293a0f Remove 181 branch from build scripts
#KT-33536 Fixed
2019-08-30 12:14:54 +03:00
Nikolay Krasko 0ae9240e5f Remove 182 and AS33 from build scripts
#KT-33536 Fixed
2019-08-30 12:14:50 +03:00
Nikolay Krasko d04749dd3f Remove other specific code after removing 182
#KT-33536 Fixed
2019-08-30 12:14:38 +03:00
Nikolay Krasko 4d0fc1dc22 Remove 182 support
#KT-33536 Fixed
2019-08-30 12:13:44 +03:00
Nikolay Krasko 1c4ee6bd79 Remove as33 support
#KT-33536 Fixed
2019-08-30 12:13:09 +03:00
Ilya Chernikov fda37eaaae [minor] Rearrange test utils for easier reuse 2019-08-28 17:59:12 +02:00
Ilya Chernikov 947867286c [minor] Fix potential problems with sequence, add a todo 2019-08-28 17:59:12 +02:00
Ilya Chernikov c9b25cad01 Fix classpath handling when evaluating legacy scripts from kotlinc
#KT-33554 fixed
2019-08-28 17:59:12 +02:00