Commit Graph

101 Commits

Author SHA1 Message Date
Marco Pennekamp 708ed81eb2 [Test] Avoid importing unused @Nested annotations in generated tests
- Unused `Nested` imports frequently cause unused import warnings in the
  IDE, which are especially annoying in after-commit warning/error
  analysis.
2024-02-27 20:30:06 +00:00
Dmitriy Novozhilov acf2296590 [Test] Regenerate tests after two previous commits 2024-02-16 12:48:24 +00:00
cristiangarcia c897328af6 Make lombok tests CC compatible
Required for KTI-1553
2024-02-06 10:11:15 +00:00
Simon Ogorodnik 53e89a9722 K2. Minor. Rename FirConstExpression to FirLiteralExpression
FirConstExpression is usually confused with "constant" calculations,
while in fact, it just denotes a simple literal expression
and `1 + 1` isn't represented by a FirConstExpression.

^KT-64314 Fixed
2024-01-25 23:05:15 +00:00
Dmitriy Novozhilov 150ff1172e [FIR] Add session parameter to all "element --> reference" utilities
`FirDeserializedEnumAccessExpression` requires session to build proper
  reference, so it's important to have it in all utilities, which may
  pass this element as input

^KT-64975
2024-01-25 15:55:19 +00:00
Brian Norman be728d4291 [Lombok] Constructor can have only non-static fields
When using the AllArgsConstructor annotation (directly or via
meta-annotation), only fields that are not static should be added as
arguments. Previously, all fields were being included regardless of
static-ness, which is not consistent with the behavior of Lombok.

^KT-54025 Fixed
2024-01-12 14:55:24 +00:00
Brian Norman 2ab1e712f8 [Lombok] Constructor can have only non-final or not initialized fields
When using the AllArgsConstructor annotation (directly or via
meta-annotation), only fields that are not final or not initialized
should be added as arguments. Previously, all fields were being included
regardless of modality or initialization, which is not consistent with
the behavior of Lombok.

^KT-54054 Fixed
2024-01-12 14:55:24 +00:00
Dmitrii Gridin b6d373d8e5 Update copyright to 2024 2024-01-05 13:43:17 +00:00
Mikhail Glukhikh 1260d03561 Drop erroneous FirJavaConstructorBuilder.visibility
Related to KT-62961
2023-11-28 13:30:26 +00:00
Kirill Rakhman ac203591e5 [FE, Java resolve] Support inheritors of sealed Java type without permits clause
This fixes a false negative NO_ELSE_IN_WHEN in K2 and incidentally
also fixes a false positive NO_ELSE_IN_WHEN in K1 since the fix is in
the common code.

#KT-62491 Fixed
2023-10-31 13:41:56 +00:00
Nikolay Lunyak 4e58715760 [FIR] Check conflicting overloads via scopes
Scopes may return private symbols from
supertypes, they should not clash with
symbols from the current class.

For example, see:
`FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.FakeOverride#testPrivateFakeOverrides1`

Lombok shouldn't generate functions if the
user has defined explicit ones.

In K1 generated functions are not really
added to the declared members scope.

^KT-61243 Fixed
2023-10-09 06:55:43 +00:00
Alexander.Likhachev 6eaccc997f [Build] Fix the typo junit jupyter -> jupiter 2023-09-06 22:47:34 +00:00
Alexander.Likhachev 53fde520d5 [Build] Add jUnit dependencies in testApiJUnit5 to the implementation configuration
Adding these dependencies to the `api` configuration pollutes classpath for each dependant modules even if it doesn't need them. Instead, the dependencies should be declared more granularly if they're required
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev 357d12fc8e [Build] Move JUnit dependencies into the version catalog
The `kotlin-test` dependencies are left untouched as changing them affects publications, thus these versions are independent from the used inside our build
#KTI-1349 In Progress
2023-09-06 22:47:33 +00:00
Bogdan Mukvich 7b00323b89 [Build] Update guava
Fix some reports from "Show Vulnerable Dependencies"

^KTI-1342
2023-08-25 14:10:37 +00:00
Nikolay Krasko 9e00bb8a21 [213] More dependencies aalto + stax2
KTI-1114
2023-04-21 13:19:05 +00:00
Yahor Berdnikau 1a4d203d1c Publish lombok compiler plugin separately
- also add 'kotlin-lombok-compiler-plugin-embeddable' to be used with
  'kotlin-compiler-emebeddable'
- 'kotlin-maven-lombok' does not try to embed plugin into itself and
  just depends on compiler plugin as normal dependency

^KT-52811 In Progress
2023-04-17 14:40:50 +00:00
Dmitriy Novozhilov da581f38e1 [Test] Require specifying parser for FIR test. Unify names for FIR tests
Now all tests with `Fir` in name are named accordingly to parser which
  is used in them -- `FirPsi` or `FirLightTree`. This is needed to keep
  consistency between different types of tests, because there is no
  single default in parser mode between different scenarios of using FIR
2023-02-24 11:15:26 +00:00
Dmitriy Novozhilov 41192b022d [FIR] Pass context to all relevant methods of FirDeclarationGenerationExtension
^KT-53470 Fixed
2023-02-10 12:30:14 +00:00
Dmitriy Novozhilov ea73cde5fb [Lombok] Make visibility of fields of @Value classes private by default (K2)
^KT-51092 Fixed
2023-02-10 12:30:13 +00:00
Dmitriy Novozhilov 0550f0d394 [Lombok] Make visibility of fields of @Value classes private by default (K1)
^KT-51092
2023-02-10 12:30:12 +00:00
Dmitriy Novozhilov da0dd519d0 [Lombok] Fix substitution of java types in K2 implementation
^KT-54020 Fixed
2023-01-17 14:51:29 +00:00
Nikolay Lunyak f671a8c8a7 [FIR] Rename FirAnnotation.coneClassLikeType to unexpanded
The same reason
2023-01-17 06:26:36 +00:00
Dmitriy Novozhilov 6783621eb0 [FIR] Change API for generating nested classes from plugins
`FirDeclarationGenerationExtension.generateClassLikeDeclaration` was split
  into two functions: one for generating top level classes, and one for
  nested classes. Such change reduces verbosity and error-proness of
  this extension and also allows to smoothly run plugins on local classes

^KT-55248 Fixed
2023-01-12 17:45:39 +00:00
Alexander Udalov 3c4b5529af Update year to 2023 in COPYRIGHT_HEADER.txt
This commit is the result of changing the year to 2023 in
COPYRIGHT_HEADER.txt and running all `generate*` tasks in
`generators/build.gradle.kts`.
2023-01-02 22:52:15 +01:00
Dmitriy Novozhilov cffc32ec76 [FIR] Fir utils for FirReference in package org.jetbrains.kotlin.fir.references 2022-12-15 12:12:20 +00:00
Dmitriy Novozhilov 700a117476 [Build] Add forgotten compiler plugins tests to aggregate build 2022-12-01 07:29:35 +00:00
Ilya Kirillov 7781ad67d4 [FIR] introduce FirValueParameter.containingFunctionSymbol
^KT-55034 fixed
2022-11-22 18:25:30 +01:00
Nikolay Krasko f43ad1cb7a Remove packed stdlib from Kotlin compiler plugin artefacts
Remove annotations, kotlin-stdlib-common, kotlin-stdlib.

Packing those libraries is wrong and probably unexpected. It leads to
artifacts size increase. Can be dangerous because of bad classpath.
And also have a reproducibility issue because of caching tricks around
KotlinVersionCurrentValue class.

KTI-942
2022-10-12 13:44:30 +00:00
Dmitriy Novozhilov 367761008b [Lombok] Make FQNs of Guava collections shade-safe
^KT-53683
2022-09-20 11:08:30 +03:00
Dmitriy Novozhilov b1d42e1383 [Lombok] Update incorrect testdata according to KT-53965 2022-09-20 10:38:00 +03:00
Dmitriy Novozhilov 111dab7a88 [Lombok] Fix test configuration 2022-09-20 10:37:59 +03:00
Dmitriy Novozhilov a78d43c1ec [Lombok] Support RawTypes in fields wtih @Singular in K2 version
^KT-53657 Fixed
2022-09-12 11:29:17 +00:00
Dmitriy Novozhilov 06119a4670 [Lombok] Fix support of Iterable field marked with @Singular
^KT-53647 Fixed
2022-09-12 11:29:17 +00:00
Dmitriy Novozhilov 4ab79ed97d [Lombok] Fix behavior of ignoreNullCollections parameter of @Singular
^KT-53724 Fixed
^KT-53721 Fixed
2022-09-12 11:29:16 +00:00
Dmitriy Novozhilov 2aadaee69f [Lombok] Properly support Guava collections with @Singular
^KT-53683 Fixed
2022-09-12 11:29:16 +00: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
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
Nikita Bobko 70ed76e0bd Drop unused ':dist' dependency in some tests
Review: https://jetbrains.team/p/kt/reviews/6753

This commit doesn't fix any issue except for "cleanup". If you find a
mistake in this commit feel free to revert part of it/the whole commit

I checked every module where I drop ':dist' dependency. Tests still pass
in those modules
2022-08-22 15:42:34 +02:00
Dmitriy Novozhilov fd4aafdb75 [Lombok K2] Support @Builder and @Singular annotations
^KT-46959 Fixed
2022-08-11 15:22:36 +03:00
Dmitriy Novozhilov b32f9dcac2 [Lombok K1] Support @Singular annotation
^KT-46959
2022-08-11 15:22:35 +03:00
Dmitriy Novozhilov b311f0b862 [Lombok K1] Support @Builder annotation
^KT-46959
2022-08-11 15:22:35 +03:00
Dmitriy Novozhilov 6fde784b55 [FE 1.0] Allow generation of nested classes for java classes from plugins 2022-08-11 15:22:35 +03:00
Dmitry Gridin 4ceb170917 regenerate tests 2022-08-05 14:12:41 +02:00
Dmitriy Novozhilov 70da19bd22 [Lombok K2] Fix name convention for @With on boolean fields
^KT-53451 Fixed
^KT-53370
2022-08-03 13:46:24 +03:00
Dmitriy Novozhilov 11f8e776af [Lombok K2] Fix generating @With methods for final fields
^KT-53370
2022-08-03 13:46:24 +03:00
Dmitriy Novozhilov 637d7678b8 [Lombok K1] Fix name convention for @With on boolean fields
^KT-53370 Fixed
2022-08-03 13:46:24 +03:00
Dmitriy Novozhilov c249eb9d2d [Build] Specify lombok dependency version in versions.properties 2022-07-20 10:12:22 +00:00
Dmitriy Novozhilov 1a8496757e [Compiler] Mark all entrypoints to compiler API as experimental 2022-06-29 12:00:01 +00:00
Dmitriy Novozhilov 8b42638afa [Plugins] Introduce new API for registering compiler plugins
Original `ComponentRegistrar` exposes Project to its registration method,
  so plugins should manually register extensions to it. To prepare for
  possible unbound compiler from Project API in future new  `K2ComponentRegistrar`
  introduced which provides registration method without Project at all
2022-06-29 11:59:58 +00:00