Commit Graph

101637 Commits

Author SHA1 Message Date
Yahor Berdnikau 67090ff10a [Gradle] Sync ListProperty, SetProperty and MapProperty types as non-convention
Such approach, while does not conform conceptually, ensures
compatibility with existing user build scripts and works more logically
for external users: https://github.com/gradle/gradle/issues/18352

^KT-59056 Fixed
2023-06-06 17:02:06 +00:00
Brian Norman 48484368c7 [Test] Support RENDER_DIAGNOSTICS_FULL_TEXT directive for FIR tests 2023-06-06 15:42:21 +00:00
Pavel Mikhailovskii 22a5dd7f29 Fix signatures of suspend functions with big arity 2023-06-06 15:37:34 +00:00
OliverO2 027593cd78 [KxSerialization] Fix NPE when accessing delegated property
Kotlin 1.7.20 added optimizations for delegated properties on the JVM,
which broke serialization for optimized properties. Commit bfeff81
tried to fix that, but broke non-optimized delegated properties. This
commit restores correct serialization for optimized and non-optimized
properties, also ensuring that it only affects the JVM target.

 #KT-58954 Fixed
 #KT-59113 Fixed
2023-06-06 17:17:39 +02:00
Pavel Kunyavskiy 733ca5a358 [K/N] Unmute tests already working on native
Also, add issue references for some tests
2023-06-06 14:29:21 +00:00
cristiangarcia 46d113605b Adopt configuration-avoidance where possible
Before this change `./gradlew help` (with native enabled)
Created immediately: 1322
Created during configuration: 1541

after this change:
Created immediately: 596
Created during configuration: 1509

To know more about configuration avoidance: https://docs.gradle.org/current/userguide/task_configuration_avoidance.html
2023-06-06 14:27:42 +00:00
Bogdan Mukvich ad8909113d Add SBOM for maven plugins 2023-06-06 13:27:26 +00:00
Bogdan Mukvich 303b01b89b Add SBOM configuration for all published artifacts by default 2023-06-06 13:27:26 +00:00
Vyacheslav Gerasimov e0a477f16d Build: Refactor sbom configuration & wire it with main publication 2023-06-06 13:27:25 +00:00
Bogdan Mukvich 18f52832f5 Configure SBOM maven publishing for stdlib 2023-06-06 13:27:25 +00:00
Bogdan Mukvich 02de693a12 Configure SBOM should return artifact 2023-06-06 13:27:25 +00:00
Bogdan Mukvich 1e4f78dcff Update spdx-gradle-plugin 2023-06-06 13:27:25 +00:00
Denis.Zharkov 0775748aa9 Postpone enabling JSpecify annotations by default until 2.0
Thus, KT-55586 is being postponed, too.
The reasoning behind this change is that the language-committee issue
has not been approved yet, so new annotation package can't be enabled
by default, but it seems that it doesn't make sense having
a different behavior for the old one but at least that would make them
work consistently, so we postpone them, too.
2023-06-06 12:45:31 +00:00
Aleksander Kuznetsov 53c488079f [serialization] permit multiple occurrences of lazy function in sources
IDEA projects may have duplicate dependencies on kotlin stdlib. In that case, `IrPluginContext.referenceFunctions` may return more than one copy of each standard function, including three overloads of `kotlin.lazy`. And here's when serialization plugin may fail with an exception.

 It affects Kotlin debugger -- if such a project or module also has serialization plugin enabled, then it completely breaks new evaluation, meaning it's impossible to compute any expression.

Fixes IDEA-314785

Merge-request: KT-MR-10262
Merged-by: Alexander Kuznetsov <Aleksander.Kuznetsov@jetbrains.com>
2023-06-06 12:43:25 +00:00
Dmitrii Krasnov 65aa5fc02e migrated cocoapods test with xcodebuild to new test dsl (junit 5 and gradle test kit)
#KT-51553 In Progress
2023-06-06 11:26:15 +00:00
Alexander Udalov b8785fbd90 K2: do not support disabling NoSourceCodeInNotNullAssertionExceptions
Disabling of this language feature (see KT-57570) was not supported in
the (default) light tree mode, and after this change it will not be
supported in the PSI mode as well. This makes the behavior more
consistent and allows us to remove the directive
IGNORE_BACKEND_K2_LIGHT_TREE in the future (KT-56757).
2023-06-06 10:06:39 +00:00
Alexander Korepanov 82a1242f22 [JS IR] Add tests for JS IR IC + PL
^KT-57347 related
2023-06-06 09:27:57 +00:00
Alexander Korepanov 97620030c6 [JS IR] Rollback PL hacks from JS IR IC infra
^KT-57347 related
2023-06-06 09:27:57 +00:00
Alexander Korepanov fab8a101bb [JS IR] Track PL stubs in IC infra
^KT-57347 fixed
2023-06-06 09:27:57 +00:00
Alexander Korepanov 22dfe07580 [IR BE] Add the ability to collect PL stubbed symbols
^KT-57347 related
2023-06-06 09:27:57 +00:00
Alexander Korepanov aef8ece123 [JS IR] Refactor signature serializer in JS IR IC infra 2023-06-06 09:27:57 +00:00
Alexander Korepanov bb72a8bcb7 [JS IR] Minor style fixes in JS IR IC infra 2023-06-06 09:27:57 +00:00
Nikolay Lunyak 23f87eda1f [FIR] KT-57803: Report the error message for light tree
The renaming prevents the JVM clash.

^KT-57803 Fixed
2023-06-06 07:43:37 +00:00
Vladimir Dolzhenko 7f74950993 Adjust name of IntelliJ Kotlin Plugin team
Merge-request: KT-MR-10425
Merged-by: Vladimir Dolzhenko <Vladimir.Dolzhenko@jetbrains.com>
2023-06-06 07:10:22 +00:00
Dmitrii Krasnov 7f70ac73fd Fixed k/n it tests after removing deprecated targets iosArm32 and watchosX86
^KT-51553
^KT-56533
2023-06-06 06:28:16 +00:00
Vladimir Sukharev 37adc99b9a [K/N] Don't pass -language_version to the second stage of new test system.
^KT-56182
Merge-request: KT-MR-10414
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-06-05 17:59:16 +00:00
Nataliya.Valtman 833b5c12a1 KT-59034 Remove variant factory usage from OperationCompletionListener 2023-06-05 16:25:06 +00:00
Ilya Goncharov d1b775f157 [Gradle, JS] Fix uname system call for configuration cache compatibility
[Gradle, JS] Fix problem with configuration cache in KotlinKarma

^KT-58969 fixed
^KT-58970 fixed
2023-06-05 15:21:34 +00:00
Pavel Punegov d81084f66f [K/N][test] Add test for ^KT-58537 2023-06-05 14:40:11 +00:00
Pavel Punegov 47c7dfe6b4 [K/N][klib] Wrap library dependencies with quotation marks
Fixes ^KT-58537. Space in the library now should be correctly parsed now
Klib readers can already read this
2023-06-05 14:40:11 +00:00
Egor Kulikov 347c748182 [FIR] Add excessive delegated constructors to FIR tree
^KTIJ-25453 fixed

Merge-request: KT-MR-10379
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
2023-06-05 14:27:53 +00:00
Sebastian Sellmair 7fbdd8e0bc [Gradle] Update multiplatform test run configurations to 'run as test' 2023-06-05 14:25:01 +00:00
Dmitriy Dolovov cf9aa6a360 [Native][tests] Clean-up in c-interop tests 2023-06-05 12:47:56 +00:00
Dmitriy Dolovov 502cbe8b17 [PL][tests] W/a for broken @Deprecated annotations in existing c-interop KLIBs
^KT-59030
2023-06-05 12:47:56 +00:00
Dmitriy Dolovov 280caf003f [PL] W/a for broken @Deprecated annotations in existing c-interop KLIBs
^KT-59030
2023-06-05 12:47:56 +00:00
Anna Kozlova b96e5b072a [LL] ensure that stub based symbol provider works on class files
This makes `.originalElements` calls redundant, no need to filter duplicates.
Additionally, it ensures that ktDeclaration's are from cls,
so all types are fully qualified and stubs contain all additional information,
required to build resolved fir e.g.,
fully qualified names are split as classIds, flexible types, etc

Merge-request: KT-MR-10449
Merged-by: Anna Kozlova <Anna.Kozlova@jetbrains.com>
2023-06-05 12:46:11 +00:00
Ilya Kirillov c78997d0f2 [Java Resolve] fix compilation of projects which use JavaElement compiler internals
The original problem was the KT-58194 where JavaElement's were reworked.

The rework changed the signatures of some declarations which were used in the KSP

^KT-59031 fixed
2023-06-05 12:21:36 +00:00
Sergej Jaskiewicz f2031ae642 [IR] Don't print multifile/synthetic facade class names in irText tests
This only applies to JVM and fq-names in declaration references
in IR dumps.

This enables us to run more irText tests on platforms other than JVM
(see KT-58605).
2023-06-05 10:40:17 +00:00
Anna Kozlova cc76bbd09d [psi] don't decompile to detect invalid code
in compiled code no error elements are possible

Merge-request: KT-MR-10407
Merged-by: Anna Kozlova <Anna.Kozlova@jetbrains.com>
2023-06-05 10:17:40 +00:00
Pavel Kunyavskiy f2520a9cb7 [K/N] Rework is checks and as casts codegeneration
^KT-58707
^KT-59022
2023-06-05 08:56:17 +00:00
Yahor Berdnikau b2212b9275 [Gradle] Add compatibility fix to explicit api import in MPP projects
MPP projects import relies that `-Xexplicit-api` flag is present in
DefaultLanguageSettingsBuilder.freeCompilerArgs property to enable
related inspections.

^KT-59063 Fixed
2023-06-02 20:06:14 +00:00
Vyacheslav Gerasimov 58dfdd2f77 Build: Sync cache-redirector script with "Table of redirects" 2023-06-02 18:53:01 +00:00
Ivan Kylchik 622aeff007 [IR] Deprecate to use fqName in IrPackageFragment 2023-06-02 16:38:04 +00:00
Ivan Kylchik b9856320cf [IR] Rename fqName to packageFqName for IrPackageFragment 2023-06-02 16:38:04 +00:00
Sebastian Sellmair 75ab2ce4e7 [Gradle] KotlinJvmRun: Configure jvm toolchain
^KT-59055 Verification Pending
2023-06-02 16:32:01 +00:00
Anna Kozlova 38ae16e9d3 [AA] explicitly search for sources of synthetic functions declarations
these synthetic classes are found by `FirBuiltinSyntheticFunctionInterfaceProvider`,
which isn't based on stubs and has no explicit source

This fixes tests in IJ repo, such as uast based tests:
`FirLegacyUastResolveEverythingTestGenerated#testLambdaReturn`

Merge-request: KT-MR-10406
Merged-by: Anna Kozlova <Anna.Kozlova@jetbrains.com>
2023-06-02 14:27:26 +00:00
Artem Kobzar bfd57fd2df [K/JS, K/Wasm] Optimize simple objects declaration and usage ^Fixed KT-58797 2023-06-02 14:23:40 +00:00
Anna Kozlova 7d6275e228 [LL] use green stub or load stubs from disk when no stub is available
e.g. if ast is loaded then no stub is attached to a file
but building deserialized fir can require information from enriched cls stub,
otherwise part of the information would be missed, e.g. contracts.

presumably, this can happen only after decompiled code is opened in the editor
(also meaning no source code is attached to the library),
green stub should exist until GCed,
thus performance degradation in the common case is not expected
2023-06-02 14:11:47 +00:00
Egor Kulikov 8ae5336f04 [FIR] Add top level invalid destructuring declarations in classes
Part of ^KTIJ-23263

Merge-request: KT-MR-10424
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
2023-06-02 14:05:00 +00:00
Dmitrii Krasnov 1dee01474c Added kotlin-gradle-statistics versioning. test that checks any changes in kotlin-gradle-statistics src folder and fails if there were no VERSION increased
#KTIJ-25581 In Progress

Merge-request: KT-MR-10349
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2023-06-02 13:56:43 +00:00