Nikita Bobko
8bb98f8f86
[imltogradle] Do not resolve transitive dependencies in gralde if don't resolve them in JPS
...
This fixes problems of Gradle not being possible to find transitive maven artifacts
if actually we don't need them
2021-06-09 15:16:18 +02:00
Nikita Bobko
bf287c0b85
[imltogradle] Don't generate unnecessary tests-jar with real dependencies when a module doesn't have any source root
...
This helps to prevent "fake" circular dependencies when
module A depends on tests of module B but module B doesn't have test source roots
In particular this commit fixes when running `:kotlin-ide.kotlin.generators:testClasses` task:
```
Circular dependency between the following tasks:
:kotlin-ide.kotlin.gradle.gradle-tooling:compileTestJava
+--- :kotlin-ide.kotlin.gradle.gradle-tooling:compileTestKotlin
| \--- :kotlin-ide.kotlin.test-framework:testJar
| +--- :kotlin-ide.kotlin.test-framework:compileTestKotlin
| | +--- :kotlin-ide.kotlin.idea:testJar
| | | +--- :kotlin-ide.kotlin.idea:compileTestKotlin
| | | | \--- :kotlin-ide.kotlin.gradle.gradle-tooling:testJar
| | | | +--- :kotlin-ide.kotlin.gradle.gradle-tooling:compileTestKotlin (*)
| | | | \--- :kotlin-ide.kotlin.gradle.gradle-tooling:testClasses
| | | | \--- :kotlin-ide.kotlin.gradle.gradle-tooling:compileTestJava (*)
| | | \--- :kotlin-ide.kotlin.idea:testClasses
| | | \--- :kotlin-ide.kotlin.idea:compileTestJava
| | | +--- :kotlin-ide.kotlin.gradle.gradle-tooling:testJar (*)
| | | \--- :kotlin-ide.kotlin.idea:compileTestKotlin (*)
| | \--- :kotlin-ide.kotlin.jvm:testJar
| | +--- :kotlin-ide.kotlin.jvm:compileTestKotlin
| | | +--- :kotlin-ide.kotlin.gradle.gradle-tooling:testJar (*)
| | | +--- :kotlin-ide.kotlin.idea:testJar (*)
| | | \--- :kotlin-ide.kotlin.repl:testJar
| | | +--- :kotlin-ide.kotlin.repl:compileTestKotlin
| | | | \--- :kotlin-ide.kotlin.idea:testJar (*)
| | | \--- :kotlin-ide.kotlin.repl:testClasses
| | | \--- :kotlin-ide.kotlin.repl:compileTestJava
| | | +--- :kotlin-ide.kotlin.idea:testJar (*)
| | | \--- :kotlin-ide.kotlin.repl:compileTestKotlin (*)
| | \--- :kotlin-ide.kotlin.jvm:testClasses
| | \--- :kotlin-ide.kotlin.jvm:compileTestJava
| | +--- :kotlin-ide.kotlin.gradle.gradle-tooling:testJar (*)
| | +--- :kotlin-ide.kotlin.idea:testJar (*)
| | +--- :kotlin-ide.kotlin.jvm:compileTestKotlin (*)
| | \--- :kotlin-ide.kotlin.repl:testJar (*)
| \--- :kotlin-ide.kotlin.test-framework:testClasses
| \--- :kotlin-ide.kotlin.test-framework:compileTestJava
| +--- :kotlin-ide.kotlin.idea:testJar (*)
| +--- :kotlin-ide.kotlin.jvm:testJar (*)
| \--- :kotlin-ide.kotlin.test-framework:compileTestKotlin (*)
\--- :kotlin-ide.kotlin.test-framework:testJar (*)
```
2021-06-08 17:15:17 +02:00
Ilya Kirillov
74567f4b02
FIR IDE: restore fir ide spec tests with shorten test class name to make TC happy
...
Otherwise, TC will complain about too long fq test method names
2021-06-07 16:48:56 +03:00
Ivan Kylchik
e5617ede7e
Add Throwable class into interpreter builtins map
...
Methods of Throwable class doesn't have bodies using FIR, so they must
be handled as builtins
2021-06-07 15:35:07 +03:00
Ivan Kylchik
8234c9cec1
Add toString function with nullable receiver into builtins map
...
On JVM we don't have body for this function, so we must process it as
intrinsic or builtin
2021-06-07 15:35:06 +03:00
Ivan Kylchik
9a8e0f3fb3
Add new builtins methods for some interfaces into IrBuiltInsMapGenerated
...
This change allow us to skip looking for override when evaluate call
for some primitive.
2021-06-07 15:34:58 +03:00
Alexander Udalov
e6254b51e1
Rewrite generator for IrBuiltInsMapGenerated
...
Similarly to 742fef9042 with OperationsMapGenerated, use optimized
`when` over strings instead of lambdas because lambdas lead to a lot of
bytecode.
The change in `IrConst.toPrimitive` is needed because for operations
like `Byte.plus(Int)` the IrConst instance would have the IR type for
kotlin.Byte, but the actual runtime value of type Int
(java.lang.Integer), which would lead to CCE from
`interpretBinaryFunction`. Previously it didn't fail because of
unchecked cast before calling the lambda, which allowed a value of
runtime type java.lang.Integer to sneak through to the lambda parameter
and be "unboxed" to the correct type via the `(... as Number).toByte()`
conversion which backend generates.
The main benefit of this change is that it reduces the size of the
proguarded compiler jar by ~0.69%.
2021-06-07 15:34:39 +03:00
Ivan Kylchik
96a090f2ab
Implement LambdaProxy class
2021-06-07 15:34:04 +03:00
Ivan Kylchik
1d0acedc48
Rewrite Complex class as interface
...
This change allow ExceptionState to be both: State and Throwable
2021-06-07 15:34:03 +03:00
Ivan Kylchik
4c75576414
Implement basic proxy for Common state
...
For now proxy works only for Any class methods and only for Common
state.
2021-06-07 15:34:01 +03:00
Nikolay Krasko
2801704ad3
Temporary remove DiagnosisCompilerTestDataSpecTestGenerated.java tests
...
Buildserver fails because of too long path names
2021-06-04 18:25:45 +03:00
Ilya Kirillov
335a2d7b71
FIR IDE: add tests based on compiler spec tests for ide
2021-06-04 13:16:17 +02:00
Mark Punzalan
5a7f4ffc99
FIR IDE: Enable tests for ReplaceInfixOrOperatorCallFix.
2021-06-03 20:17:58 +03:00
Ilya Kirillov
0da488058d
FIR IDE: add tests for completion in sealed when
2021-06-03 19:39:03 +03:00
Ilya Kirillov
48b69b4f3f
FIR IDE: add test for super keyword completion with qualifier
2021-06-03 19:38:41 +03:00
Ilya Kirillov
7d351ca6b1
FIR IDE: add possibility to have different testdata for fir & fe10 keyword tests
2021-06-03 19:38:39 +03:00
Jinseong Jeon
83256ef3bd
FIR UAST: introduce identifiers and refNames tests
2021-06-03 17:56:16 +02:00
Nikita Bobko
3e892d3184
'idea-fir-fe10-binding' move fir tests into subpackage 'org.jetbrains.kotlin.idea.fir'
...
In intellij infrastructure we run tests by matching package pattern.
So in order to be able run FIR tests we need to place them into unique package
2021-05-29 00:11:28 +03:00
Nikita Bobko
65972fa64c
'idea-frontend-fir' move fir tests into subpackage 'org.jetbrains.kotlin.idea.fir'
...
In intellij infrastructure we run tests by matching package pattern.
So in order to be able run FIR tests we need to place them into unique package
2021-05-29 00:11:27 +03:00
Nikita Bobko
1ba6845b59
'idea-fir' move fir tests into subpackage 'org.jetbrains.kotlin.idea.fir'
...
In intellij infrastructure we run tests by matching package pattern.
So in order to be able run FIR tests we need to place them into unique package
2021-05-29 00:11:26 +03:00
Nikita Bobko
af12b2fdf0
[imltogradle] Replace "Exported transitive dependency" with original module name reference
2021-05-28 14:03:07 +02:00
Nikita Bobko
6a7770573c
[imltogradle] Support attaching 211 IDEA
2021-05-28 14:03:07 +02:00
Nikita Bobko
14ed660f4f
[cleanup] Remove unused AbstractFirMultiModuleResolveTest
2021-05-25 23:53:08 +03:00
Mark Punzalan
23605e08be
FIR IDE: Enable RemoveValVarFromParameterFix for
...
VAL_OR_VAR_ON_*_PARAMETER.
2021-05-25 20:39:35 +03:00
Tianyu Geng
71c5c9f6c5
FIR IDE: add quickfix to change function return type
2021-05-25 20:39:32 +03:00
Ilya Kirillov
acda71cc90
FIR IDE: restore test generator after rebase
2021-05-20 20:33:01 +02:00
Nikita Bobko
09321e5e41
Implement ide-iml-to-gradle-generator
...
This module is used to generate build.gradle.kts files
of Kotlin IDE plugin
2021-05-20 16:09:14 +02:00
Nikita Bobko
897dafc7f3
GenerateTests: extract IDE part into separate module
...
It's refactoring-preparation commit. In later commits I will add possibility
to disable IDE modules with flags in gradle build (first step towards
removing IDE modules from kotlin repo). Thus, we need to extract IDE tests
generator in separate module for being possible to disable it with flags
2021-05-20 16:05:37 +02:00
Igor Yakovlev
c5372be267
[FIR IDE] Move and rename RawFirFragmentForLazyBodiesBuilder into Fir Ide module
2021-05-14 23:05:57 +03:00
Igor Yakovlev
0569f810cf
[FIR IDE] Add OnAir resolve tests
2021-05-14 23:05:55 +03:00
Alexander Udalov
aa13936cb2
Move GenerateProtoBuf to separate source set with no dependencies
...
Also move GenerateProtoBufCompare to a new source set with a dependency
only on build-common.
#KTI-79 Fixed
2021-05-14 21:08:56 +02:00
Alexander Udalov
e3b92fd561
Update instructions to run protoc on Windows and Linux
2021-05-13 13:58:43 +02:00
Ilya Kirillov
f8fc43f1e9
FIR IDE: add AbstractKeywordCompletionTest
2021-05-12 21:40:18 +03:00
Ilya Kirillov
f18bcdb88c
FIR IDE: add AbstractFirKeywordCompletionHandlerTest
2021-05-12 21:40:14 +03:00
Roman Golyshev
eadd7ac034
Generate multi-file quickfix tests for FIR plugin
...
Currently generate only for `Import` quickfix
2021-05-12 16:28:27 +00:00
Tianyu Geng
302e0fa46b
FIR IDE: add quickfix AddWhenElseBranchFix
2021-05-11 21:42:45 +02:00
Stanislav Erokhin
eb4bb9554d
Add ReplaceInvoke adn ReplaceCallWithUnaryOperator intention support
...
Surprisingly all test passed
2021-05-11 12:48:18 +02:00
Stanislav Erokhin
7ac599520e
Add first prototype of BindingContext implementation by FIR
...
Add ImportMemberIntention intention as a test.
In this commit all failed test were disabled, necessary fixes will be
added in the following commits
2021-05-10 14:04:03 +03:00
Jinseong Jeon
03d4cb0dfa
FIR UAST: use uast-kotlin/testData for legecy tests
2021-05-05 14:22:40 +02:00
Jinseong Jeon
40eaabdbb5
FIR UAST: prototype plugin entrypoint, declarations, test infra
2021-05-05 14:22:40 +02:00
Ilya Kirillov
65ce641b22
FIR IDE: introduce diagnostics tests bases on FIR diagnostics tests
2021-05-04 08:19:49 +02:00
Alexander Udalov
e5128a8772
Improve generated code for Gradle properties
...
Fix warnings about double nullability and useless elvis.
2021-04-26 22:02:24 +03:00
Andrey Zinovyev
f71e08df4d
[lombok] Experimental lombok plugin prototype
...
Add extension point for java descriptors
Add simple usage of this point to generate getter method
Add simple test infrastructure to test compilation with lombok plugin
2021-04-25 18:17:53 +03:00
Igor Yakovlev
e4870740e1
[LC] Fixed light classes nullability for Kotlin 1.5
...
Fixed #KT-44472
2021-04-20 15:21:12 +02:00
Abduqodiri Qurbonzoda
71c5c8b20a
Fix Range.isEmpty doc
2021-04-19 19:14:25 +03:00
Ilya Kirillov
32c1101959
FIR IDE: introduce tests for checking diagnostic visitor context collection
2021-04-19 13:52:42 +02:00
Ilya Gorbunov
8041c3aa1d
Support Char.code in constant evaluator, KT-46036
...
But do not consider Char.code a pure integer constant.
2021-04-16 03:58:34 +03:00
Mark Punzalan
957f6ddafd
FIR checker: Enable ReplaceWithDotCallFix for UNNECESSARY_SAFE_CALL.
2021-04-14 22:30:42 +02:00
Abduqodiri Qurbonzoda
98d31a1813
Expand KDoc of inc() and dec() operators #KT-43701
2021-04-10 03:23:04 +03:00
Anton Bannykh
923303c2c1
JS PIR: move PIR proto messages to a separate file
2021-04-09 19:54:23 +03:00