Commit Graph

2034 Commits

Author SHA1 Message Date
Yahor Berdnikau 860d3fda95 Undeprecate 'kotlinOptions' DSL
'@ReplaceWith' is not that flexible in this case and proper IDE support
required for smooth migration. After such migration in IDE will be added
 - deprecation should be restored.

 ^KT-54399 Fixed
2022-12-16 17:25:49 +00:00
Dmitrii Gridin b2c0a37050 [SLC] implement infrastructure for light class hierarchy tests 2022-12-13 16:54:25 +00:00
Alexander Udalov 25c5ad176c Minor, update instructions for installing protobuf261 + regenerate 2022-12-01 01:37:55 +01:00
Nikolay Lunyak 4b3dc008f0 [FIR] KT-54260: Fix the compiler crash
AllOpen plugin makes the properties all-open, but the annotation class
is left closed, because allopen for k2 literally checks
`classKind == CLASS`.

Since the properties are open, a
`NON_FINAL_MEMBER_IN_FINAL_CLASS` diagnostic is reported for them. It's
positioning strategy seeks for the explicit `open` modifier which is
not present.

The added test should not crash the compiler.

^KT-54260 Fixed
2022-11-22 20:25:38 +00:00
Ilya Chernikov fa0cda6236 FIR JS: enable full JS box tests with FIR 2022-11-12 14:34:07 +01:00
Ilya Kirillov 2378437b30 [Analysis API FIR] do not create resolved KtTypes for unresolved ones 2022-11-11 12:00:00 +01:00
Jinseong Jeon c9a2e10dd7 AA: merge single/multi modules tests for PsiTypeProvider
...because single-module test is also multi-module test
2022-11-02 17:38:16 +01:00
Jinseong Jeon d98081dce2 AA: introduce MPP tests for PsiTypeProvider 2022-11-02 17:38:16 +01:00
Ilya Kirillov e2416f48fe [Analysis API] add tests for containing declaration for delegated member scope 2022-10-26 19:19:04 +00:00
Ilya Kirillov 97df0a0902 [Analysis API] rework containing declaration provider
now it should work for non-source declarations
2022-10-26 19:19:00 +00:00
Yahor Berdnikau a7e1d36528 Drop compileOnly dependency on :kotlin-gradle-compiler-types in compiler
This dependency was only required for compiler options Gradle DSL
generation, but was leaking into runtime not-accessible classes.

^KT-54602 Fixed
2022-10-26 16:32:36 +02:00
Dmitrii Gridin b8a64d20ac [AA] restore Fe10IdeNormalAnalysisSourceModuleSymbolByReferenceTestGenerated
^KT-54311
^KT-54385
2022-10-17 14:59:50 +00:00
Sergej Jaskiewicz 227864c6ec [JS IR] Add a compiler option for generating name entries in sourcemaps 2022-10-14 10:09:39 +00:00
Yahor Berdnikau 023b9bf284 Align new compiler options names with api naming
Use Kotlin*CompilerOptions or Kotlin*CompilerToolOptions naming approach.

^KT-54306 Fixed
2022-10-13 12:19:08 +00:00
Kristoffer Andersen f765457e51 [K2] isUsedAsExpression analysis 2022-10-05 15:06:52 +00:00
Ilya Kirillov 49f2f85927 [Low Level FIR] fix exception when creating symbol by invalid code 2022-10-04 12:56:07 +00:00
Ilya Kirillov 2d7218b542 [Analysis API FIR] fix test generation 2022-10-03 16:02:23 +02:00
Ilya Gorbunov 34de2d9155 Trim trailing spaces in generated docs of builtins 2022-10-02 19:04:36 +00:00
Paŭlo Ebermann 418c530820 docs: mod/rem: clarify who is dividend and divisor 2022-09-30 15:41:55 +03:00
Alexander Udalov 8757988037 Minor, generate trailing comma in enums in Gradle compiler types
This both simplifies the generator code and makes the generated code
conform to the style guide (see
https://kotlinlang.org/docs/coding-conventions.html#trailing-commas), in
particular it improves version control diffs for generated enums.
2022-09-22 21:56:10 +02:00
Nikolay Krasko 1630386712 Move to JDK_X_Y variables 2022-09-21 22:53:19 +00:00
Yahor Berdnikau 136ccbd328 Remove JvmTarget.JVM_1_6 from Gradle DSL
This target is not available inside compiler and left for IDE
compatibility.

^KT-54103 Fixed
2022-09-21 13:34:26 +02:00
Ilya Kirillov cd5b9d6356 [Analysis API] do not generate standalone tests which use compiler plugin 2022-09-21 09:44:24 +02:00
Yahor Berdnikau 286d0d56af Introduce Kotlin compiler options with Gradle Properties API types
Old one is deprecated and delegates to new options. All new options
are marked with task input types, so they could be used as `@Nested`
input.

Generated options are using specific types in generated
compiler options. This should simplify code completion and provide
meaningful hints to user.

At this point repository compilation will fail.

^KT-27301 In Progress
2022-09-19 12:30:39 +02:00
Yahor Berdnikau 28dd3d4e71 Generate Gradle compiler types into separate project
This will allow to use them on the DSL generation.

^KT-27301 In Progress
2022-09-19 12:30:39 +02:00
Yahor Berdnikau 5eebcf8c77 Generate Js runtime diagnostic mode type
^KT-27301 In Progress
2022-09-19 12:30:39 +02:00
Yahor Berdnikau c1ed683ed8 Generate Js source map embed mode type
^KT-27301 In Progress
2022-09-19 12:30:38 +02:00
Yahor Berdnikau 626bd34319 Generate JS module kind type
^KT-27301 In Progress
2022-09-19 12:30:38 +02:00
Yahor Berdnikau 14f45b48b3 Generate JS main function execution mode type
^KT-27301 In Progress
2022-09-19 12:30:38 +02:00
Yahor Berdnikau 7772ab00cd Generate JvmTarget Gradle DSL object
This is generated based on JvmTarget compiler type without exposing
compiler internals.

^KT-27301 In Progress
2022-09-19 12:30:38 +02:00
Yahor Berdnikau 37c66837ee Make 'generateGradleOptions' task visible
Makes all generate* tasks easier to discover.

^KT-27301 In Progress
2022-09-19 12:30:38 +02:00
Yahor Berdnikau 6842842827 Generate KotlinVersion Gradle DSL object
To avoid exposing compiler internal types inside Gradle DSL public api.

ApiVersion and LanguageVersion in terms of compiler api is almost the
same. Actually ApiVersion is generated based on LanguageVersion. To
reduce user confusion what enum to use and what is the difference
- in Gradle DSL they are now exposed as single enum - KotlinVersion.

Mark KotlinVersion with DeprecationLevel.ERROR if related
LanguageVersion is unsupported and with DeprecationLevel.WARNING if
related LanguageVersion is deprecated.

^KT-27301 In Progress
2022-09-19 12:30:34 +02:00
Jinseong Jeon e50da634bc AA: add tests for resolution to built-ins 2022-09-17 16:43:12 +02:00
Anže Sodja 09d6dfc8bf [Assign plugin] Add a compiler plugin for overloading assign ('=') operator 2022-09-16 10:12:41 +03:00
Alexander Udalov d50cf81e42 Remove tests on incremental compilation with old JVM backend
#KT-48532 Fixed
2022-09-16 00:16:31 +02:00
Alexander Udalov 97f63d539c Remove tests on jvm-abi-gen with old JVM backend
#KT-48532 Fixed
2022-09-16 00:16:31 +02:00
Vladimir Sukharev c8864369fd Use main class as test generator name
Merge-request: KT-MR-7031
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-09-09 12:51:18 +00:00
Dmitriy Novozhilov a2ffba275c [Serialization] Migrate all tests to new test infrastructure 2022-09-05 10:20:05 +00:00
Ilya Gorbunov 800ff20fc7 Exclude rangeUntil operation from constant evaluation and interpretation #KT-52933 2022-08-24 22:22:54 +00:00
Ilya Gorbunov 203a00151d rangeUntil member operator in builtins #KT-52933 2022-08-24 22:22:53 +00:00
Ilya Gorbunov ec9c862034 Minor cleanup: remove unused condition 2022-08-24 22:22:52 +00:00
Dmitriy Novozhilov cc00dcc038 [Serialization] Reorganize module structure 2022-08-22 17:23:18 +03:00
Nikita Bobko 2a4f3f41aa 2/5 Replace source dependency on kotlin-reflect with binary dependency
Review: https://jetbrains.team/p/kt/reviews/6753

Meaningful semantic change was splitted into 5 commits to simplify the
change review. Sinle commit would be too big.

Why replace source to binary: to get rid of kotlin-reflect in Kotlin
plugin artifact KTIJ-22276

Note: Kotlin Maven artifacts (./gradlew publish) changed their
dependency on kotlin-reflect
2022-08-22 15:43:49 +02:00
Nikita Bobko 0874fb71c6 Replace all kotlin-reflect-api dependencies with kotlin-reflect
Review: https://jetbrains.team/p/kt/reviews/6753

Why: I'm going to replace source dependency on kotlin-reflect with
binary dependency. Normalize reflect dependency before global
processing.
2022-08-22 15:43:11 +02:00
Nikita Bobko 8f79e833a8 Drop all redundant kotlin-reflect, kotlin-reflect-api dependencies
Review: https://jetbrains.team/p/kt/reviews/6753

All redundant I managed to find, of course.

Why: I'm going to process all reflect dependencies in the next commits.
Cleanup reflect dependency before processing.

They are redundant because:
1. if `compileOnly` then compilation didn't break after dropping the
   dependency
2. if `test*` then tests didn't break after dropping the dependency.
3. `analysis/analysis-api-fir/analysis-api-fir-generator/build.gradle.kts`
   `compiler/fir/checkers/checkers-component-generator/build.gradle.kts`
   Drop `implementation(project(":kotlin-reflect-api"))` because the
   module already depends on
   `implementation(project(":kotlin-reflect"))`
4. `compiler/daemon/daemon-client/build.gradle.kts`. Drop `runtimeOnly`
   because after dropping `compileOnly` compilation didn't break (so
   `runtimeOnly` looks suspicious). Less safe than 1-3
2022-08-22 15:42:57 +02:00
Jinseong Jeon 846ab7d97b AA: revamp standalone-mode tests 2022-08-17 19:16:17 +02:00
Dmitry Savvinov c1e21f5b8f [mpp, tests] Add infrastructure for *Generated KPM Core tests 2022-08-12 12:34:14 +02:00
Ilya Kirillov 8856977c78 [Symbol LC] add test for declaration parents 2022-08-10 22:49:12 +02:00
Dmitry Gridin 807b9d2566 generators: update copyright to 2022 2022-08-05 14:12:42 +02:00
Jinseong Jeon 199219483e FIR LC: set modifier list as a parent of light annotations
^KTIJ-22354 Fixed
2022-08-03 08:57:37 +02:00