Commit Graph

3098 Commits

Author SHA1 Message Date
Yahor Berdnikau 4d47cf07be Update org.robolectric:android-all to 4.4_r1-robolectric-r2
Possibly could fix flaky parcelize plugin tests on Windows OS.
2022-06-21 11:26:30 +00:00
Mikhael Bogdanov 162ca4ac2b KAPT+IR: support IR error types
#KT-49682
2022-06-20 11:42:53 +00:00
Mikhael Bogdanov 41d6f0dca4 Remove ir.tree.impl from build 2022-06-20 11:42:52 +00:00
Simon Ogorodnik e3c7929fee KT-52284 Clarify message in Kapt with K2 error 2022-06-20 10:39:25 +00:00
Alexander Udalov 448cba07bb Psi2ir: do not generate init block body in kapt mode 2022-06-17 16:51:06 +02:00
Alexander Udalov 7e9d7c895a Kapt: add flag kapt.use.jvm.ir for enabling JVM IR support
#KT-49682
2022-06-17 16:51:06 +02:00
Ilya Chernikov c2316ca305 Scripting: avoid definitions discovery when compiling regular kotlin
If only regular kotlin .kt (and .java) files are compiled, do not
register file extensions that may come from discovered script
definitions. Since the discovery is lazy by itself, this should
skip jars processing for regular compilation scenarios without scripts.
#KT-47816 fixed
2022-06-16 21:28:07 +00:00
Ilya Chernikov 5caf2a2aca Scripting: refactor plugin command line processing
- process command line properly when plugin is autoloaded
- add and fix options to disable definitions autoloading and discovery
- cleanup unused code
(partial test is added to "avoid definitions discovery" commit)
2022-06-16 21:28:07 +00:00
Ilya Chernikov a8c4ea04c8 Scripting: add check for 'kotlin' package similar to the regular sources
#KT-52598 fixed
2022-06-16 21:28:06 +00:00
Ilya Chernikov f5950ac8f3 minor: avoid double reporting of scripting diagnostics
also fix arror reporting for scripts with location
2022-06-16 21:28:06 +00:00
Ilya Chernikov 855059b93c Scripting: update scripts in source roots handling
#KT-52525 fixed
related to #KT-52735
2022-06-16 21:28:06 +00:00
Ilya Chernikov b2b13a0247 minor: remove unused class 2022-06-16 21:28:05 +00:00
Ilya Chernikov 120ecce753 Scripting: refactor processing of JvmDependencyFromClassLoader in repl 2022-06-16 21:28:04 +00:00
Ilya Chernikov 597677dae3 Scripting: refactor history handling in legacy REPL using new infra
#KT-47187 fixed
2022-06-16 21:28:03 +00:00
Ilya Chernikov 92bf260057 Scripting: Implement conditional conversion for REPL result values
to support value types erased from runtime classes. See example
in added tests for motivation.
#KT-45065 fixed
also refactor launcher repl test and result type rendering
2022-06-16 21:28:03 +00:00
Ilya Chernikov b36d1be5f8 Scripting: switch legacy CLI REPL to the new infrastructure 2022-06-16 21:28:02 +00:00
Yuriy Artamonov cb2a54cef8 KT-50907 Update no-arg plugin to for jakarta persistence api namespace 2022-06-16 18:31:49 +00:00
Yan Zhulanow 28625e135d [Pill] Disallow 1.6 JVM target in generated facets 2022-06-16 18:31:48 +00:00
Dmitriy Novozhilov a30216c655 [IR] Mark methods with descriptors of ReferenceSymbolTable with @ObsoleteDescriptorBasedAPI
Also remove optIn annotation from IrPluginContext.symbolTable
2022-06-16 13:43:49 +00:00
Yahor Berdnikau b6edf9a86e Shadow Gradle plugin 3rd party dependencies
Such dependencies will be embedded into plugin jar and their package
will be relocated. This is need to avoid dependency conflicts with
user build scripts dependencies or other Gradle plugins.

Kotlin project dependencies are not shadowed.

^KT-46034 Fixed
2022-06-15 10:57:56 +02:00
Sergey.Shanshin f192c2a541 Use EnumSerializer for explicitly serializable enum instead of auto-generated
Resolves Kotlin/kotlinx.serialization#683 Kotlin/kotlinx.serialization#1372
2022-06-14 10:21:48 +00:00
Pavel Mikhailovskii ecb3cc193c KT-51883 Don't use "-" in generated unique lifted declaration names 2022-06-10 18:36:04 +00:00
Dmitriy Novozhilov b23092b447 jvm-abi-gen: report compilation errors instead of throwing exceptions during configuration 2022-06-10 09:47:35 +03:00
pyos 60405237d2 jvm-abi-gen: mark as supporting K2 (in new mode) 2022-06-10 09:44:31 +03:00
Dmitriy Novozhilov 36a154507e [Parcelize] Remove dependency from backend module to k2 module
This is needed to avoid dependencies on FIR classes inside Parcelize IDE
  plugin
2022-06-08 11:33:37 +00:00
Sergey.Shanshin facde26371 Added serialization support for the kotlin.time.Duration class as built-in 2022-06-07 20:37:05 +00:00
Dmitriy Novozhilov f5637e5077 [FIR] Look for jar with plugin annotations in system property and by direct path in tests
This is needed to make those tests work in JPS, because corresponding
  system property is set only by gradle
2022-06-07 14:12:27 +00:00
Dmitriy Novozhilov 66c2679673 [Plugins] Extract parts of cli modules which were used from IDE into common modules
This is needed to avoid IDE dependencies on cli modules, because they
  include FIR classes, which are inaccessible in regular Kotlin IDE plugin
2022-06-07 14:12:26 +00:00
Dmitriy Novozhilov 83d0a3e7a3 [FIR] Extract FirPluginKey into :core:compiler.common and rename it to GeneratedDeclarationKey
This is needed to avoid dependency on :compiler:fir:fir2ir module in
  backend parts of compiler plugins. It will allow to publish those
  parts into jars for IDE, where they are needed for working of debugger
  and bytecode toolwindow
2022-06-07 14:12:25 +00:00
Dmitriy Novozhilov a84ece7233 [Lombok] Add implementation of plugin for FIR 2022-06-07 14:12:25 +00:00
Dmitriy Novozhilov e58e86932c [FIR] Pass declared member scope to methods of declaration generation extension 2022-06-07 14:12:24 +00:00
Dmitriy Novozhilov 430ea414a9 [Lombok] Convert tests with compilation errors to diagnostic tests 2022-06-07 14:12:23 +00:00
Dmitriy Novozhilov 23c69f8d17 [FIR] Add to new types of annotation predicates
- `ParentAnnotatedWith` matches declarations, which parent is annotated
- `HasAnnotatedWith` matches declarations, which have at least one
     direct child with annotation

Also, `DeclarationPredicate.Any` is removed, because there is no
  intention to support lookup for all declarations in module

^KT-52486 Fixed
2022-06-07 14:12:22 +00:00
Dmitriy Novozhilov 7c19f3b1ca [Lombok] Migrate tests to new test infrastructure 2022-06-07 14:12:21 +00:00
Dmitriy Novozhilov c9c24d27d7 [Lombok] Fix style of FILE directive in testdata 2022-06-07 14:12:21 +00:00
Dmitriy Novozhilov dcd96932aa [Lombok] Adapt format of codegen tests to standard box() style 2022-06-07 14:12:20 +00:00
Dmitriy Novozhilov f34061acc1 [FIR] Fix resolution of plugin annotations annotated with meta annotations
There was a problem, that after founding of new annotation with meta
  annotation we did not come back to previous files, which may contain
  declarations with this new annotation
2022-06-07 14:12:19 +00:00
Dmitriy Novozhilov c2bf68c9d3 [Lombok] Reorganize module structure of Lombok compiler plugin
Also rename its jar to `kotlin-lombok-compiler-plugin`

^KT-52468 Fixed
2022-06-07 14:12:19 +00:00
Dmitriy Novozhilov 5d0655247f [NoArg] Add implementation of plugin for FIR 2022-06-07 14:12:18 +00:00
Dmitriy Novozhilov 8acb8aa043 [FIR] Introduce utility service for plugins for matching common predicate pattern 2022-06-07 14:12:17 +00:00
Dmitriy Novozhilov 60df531c02 [NoArg] Migrate NoArg tests to new test infrastructure 2022-06-07 14:12:16 +00:00
Dmitriy Novozhilov 8fc4962213 [NoArg] Reorganize module structure of NoArg plugin 2022-06-07 14:12:16 +00:00
Dmitriy Novozhilov 0f757c300a [Atomicfu] Make Atomicfu compatible with K2
Atomicfu is backend-only plugin, so it compatible with both frontends
2022-06-07 14:12:15 +00:00
Dmitriy Novozhilov 259862d294 [Parcelize] Reorganize module structure of Parcelize plugin
Also mark parcelize as compatible with K2
2022-06-07 14:12:15 +00:00
Dmitriy Novozhilov 2a7dc1cc0c [AllOpen] Reorganize module structure of AllOpen plugin
This scheme will be common for all compiler plugins with K1 and K2 support:
- `plugin-common` contains classes shared with K1 and K2 implementations (if any)
- `plugin-k1` contains implementation for K1 compiler
- `plugin-k2` contains implementation for K2 compiler
- `plugin-backend` contains implementation for backend extensions (if any)
- `plugin-cli` is module for registration of plugin in CLI compiler
- `plugin` is a root module with tests and all submodules embedded

This structure is needed to distinguish parts related to different frontends,
  which is needed for proper dependencies settings for Kotlin IDE plugins
2022-06-07 14:12:15 +00:00
Dmitriy Novozhilov 22ebea8174 [FIR] Support FIR version of all-open plugin 2022-06-07 14:12:14 +00:00
Dmitriy Novozhilov 4003ca0691 [FE] Add ability to set compatibility of plugin with K2 in ComponentRegistrar 2022-06-07 14:12:14 +00:00
Dmitriy Novozhilov b0c2332b4c [AllOpen] Fix package structure 2022-06-07 14:12:11 +00:00
Dmitriy Novozhilov 01664da0a3 [AllOpen] Migrate AllOpen tests to new test infrastructure 2022-06-07 14:12:11 +00:00
Nikolay Lunyak ac1fb07102 [FIR JS] Add checkers.js 2022-06-02 13:47:28 +00:00