Commit Graph

92952 Commits

Author SHA1 Message Date
Dmitriy Novozhilov cdbfa7fbbc [Plugins] Fix bundling sources of NoArg, AllOpen and Lombok for maven plugins 2022-06-07 14:12:27 +00:00
Dmitriy Novozhilov d527b00dfc [FIR] Create generated declared scope only for classes from sources and plugins 2022-06-07 14:12:27 +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 a85d25d7a6 [FIR] Rename UnderAnnotatedWith predicate to AncestorAnnotatedWith 2022-06-07 14:12:26 +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 9b56a01d74 [Plugins] Include backend parts of noarg and parcelize into jars for IDE 2022-06-07 14:12:25 +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 ae0bc1c078 [FIR] Generate copy builder for FirTypeParameter 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 fb57e1ecd5 [FIR] Add two kinds of Java origin to distinguish source and library declarations 2022-06-07 14:12:23 +00:00
Dmitriy Novozhilov 26df9d74e8 [FE] Add flag to java model to distinguish source java classes from binaries 2022-06-07 14:12:23 +00:00
Dmitriy Novozhilov 09ff6303cc Reformat TreeBasedAnnotation.kt 2022-06-07 14:12:22 +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 c62257bbab [Build] Use -Xuse-k2 flag instead of -Xuse-fir 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 bc8051ce9b [Test] Allow to create source files different from .kt and .java in SourceFileProvider 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 055865a2a1 [FIR-IDE] Register checkers from plugins in IDE session 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 bfb908dcd9 [Build] Publish only K1 related parts of Parcelize, AllOpen and NoArg for IDE 2022-06-07 14:12:18 +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 7048cac770 [FIR] Move FirPredicateBasedProvider to :compiler:fir:tree module 2022-06-07 14:12:17 +00:00
Dmitriy Novozhilov b948eaef4b [FIR] Add ability to register session components from FIR plugins 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 67589b1b09 [FIR] Don't report TAILREC_ON_VIRTUAL_MEMBER_ERROR on private declarations 2022-06-07 14:12:13 +00:00
Dmitriy Novozhilov 399aaeca9d [FIR] Implement proper copy utility for FirDeclarationStatus 2022-06-07 14:12:13 +00:00
Dmitriy Novozhilov c7e3da8709 [FIR] Extend DeclarationPredicate DSL 2022-06-07 14:12:13 +00:00
Dmitriy Novozhilov 6ff848432b [Test] Add path to all plugins testdata to test plugin config 2022-06-07 14:12:12 +00:00
Dmitriy Novozhilov 3ee0d13119 [FIR] Add additional DSL methods to FirExtensionRegistrar 2022-06-07 14:12:12 +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
Pavel Kunyavskiy 9e9c9530e7 [K/N] Disable cache on some non-default configurations
There are some compiler keys that affect code-generation or set of
linked runtime libraries. If caching is enabled, this would be handled
incorrectly, as cached version can be built with other combination of
this keys.

For now, we just disable cache for all non-default configurations.
This commit adds more correct definition of this non-default.

^KT-52613
2022-06-07 13:43:49 +00:00
Ilya Goncharov 5abbb8666d rra/ilgonmic/statistics
[JS, Statistics] Register absence in legacy webpack

[JS, Statistics]Register build metrics reporter service for webpack task

[JS, Statistics] Use only bundle size

[JS, Statistic] Add bundle size to webpack task

[JS, Statistic] Collect information about compilation size

[Gradle, JS] Add size metrics

Merge-request: KT-MR-6388
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>
2022-06-07 12:53:44 +00:00
Jinseong Jeon 7878c19225 LL: delete technically empty file 2022-06-07 13:39:56 +02:00
Pavel Mikhailovskii 65b2cee913 KT-23397 Optimize out field for property delegate when it's safe (JVM) 2022-06-07 10:46:01 +00:00
Denis.Zharkov 9ee0268197 Minor. Drop unused FirTowerDataMode.SPECIAL 2022-06-06 15:18:05 +03:00
Denis.Zharkov 41dd00c241 FIR: Use outer scope for annotation arguments resolution
^KT-41980 Fixed
2022-06-06 15:18:05 +03:00
Denis.Zharkov eae673233b FIR: Rework FirRegularTowerDataContexts
- Get rid of SPECIAL mode (just left REGULAR and class-related instead)
- Clear naming
- Restore contexts after lambda/callable reference are processed

The test has been failing before this change because after
callable reference is resolved, its tower data context has been left
erroneously in the SPECIAL-related entry
2022-06-06 09:39:29 +00:00
Denis.Zharkov 521d6c307c Minor. Make properties private in FirSpecialTowerDataContexts 2022-06-06 09:39:29 +00:00