Commit Graph

101441 Commits

Author SHA1 Message Date
Nataliya.Valtman 06ac8a10cd Use FlowParameter for buildFinish event
Support build scan report for Gradle 8.1

#KT-55740: Fixed
#KT-58251: Fixed
2023-05-25 14:24:16 +00:00
Troels Bjerre Lund 99e4ca65be [K/N] Fix GC stats reporting sweep in wrong epoch ^KT-55364
Co-authored-by: Troels Lund <troels@google.com>

Merge-request: KOTLIN-MR-696
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
2023-05-25 12:48:30 +00:00
Sergej Jaskiewicz 2fc5316c1b [IR] Add a kdoc for IrValueParameter.isHidden 2023-05-25 12:33:35 +00:00
Egor Kulikov 9a77632f1c [FIR] Fix invalid expression throwing exception when determining type
^KTIJ-25421 fixed

Merge-request: KT-MR-10317
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
2023-05-25 12:31:42 +00:00
Egor Kulikov 5e38c2d570 [FIR] Fix invalid expression throwing exception when determining type
^KTIJ-25421 fixed

Merge-request: KT-MR-10290
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
2023-05-25 12:29:46 +00:00
Nikolay Lunyak 83f2c2e1f0 [FIR] KT-58623: Unify FirInlineDeclarationChecker
> Condition 'isSuspendFunctionType' is always false when reached

The change in the native tests is needed, because K2
doesn't support disabling old language features

^KT-58623 Fixed
2023-05-25 12:19:51 +00:00
Nikolay Lunyak 75c0304671 [FIR] KT-58623: Ensure the diagnostics are missing for Native 2023-05-25 12:19:51 +00:00
Nikolay Lunyak 699366f178 [FIR] KT-58184: Prevent missing diagnostics on component calls
Update the component function visibility
based on the already resolved visibility
of the property before transforming
the status of the component function itself.

^KT-58184 Fixed
2023-05-25 12:19:30 +00:00
Svyatoslav Scherbina d45e0116dd Bump Kotlin/Native version to 1.9.20-dev-2332 2023-05-25 12:13:46 +00:00
Alexander Udalov d32268c5cb JVM: do not assume that methods have body in BridgeLowering
They don't have bodies in the kapt stub generation mode.

 #KT-58787 Fixed
2023-05-25 12:07:58 +00:00
Brian Norman b2230327df [FIR] Refactor upper bound validation with better source element info
Attach source information to each argument of the type before expanding
to preserve information during validation. This allows errors to be
reported on the original argument during nested type alias expansion.

^KT-50798 Fixed
^KT-50703 Fixed
2023-05-25 11:24:17 +00:00
Alexander Shabalin d82a6f2fa2 [K/N] Fix default value of testTarget 2023-05-25 10:32:48 +00:00
Anton Lakotka 9456872bbe [Gradle] Remove unnecessary participatingSourceSetsLazy
The `withDependsOnClosure` is live object, it is ok to request it early
as long as other properties will read data from it at the end of the
configuration.

^KT-58471 Verification Pending
2023-05-25 10:25:17 +00:00
Anton Lakotka 731d3bf602 [Gradle] Remove legacy participatingSourceSets logic
It is unknown why we would need to include commonMain source set
explicitly from kotlinExtension.sourceSets.

Few assumptions:
* common main source set loaded somehow from different classloader
* compatibility with legacy multipaltform plugins

^KT-58471 Verification Pending
2023-05-25 10:25:16 +00:00
Anton Lakotka 60939a8fe6 [Gradle] Change skipProjectDependencies to transformProjectDependencies
For better code readability

^KT-58471 Verification Pending
2023-05-25 10:25:16 +00:00
Anton Lakotka 792c08ec7d [Gradle] Test CInterop commonization doesn't trigger configuration resolution
...before taskGraph is ready

KT-56858 Verification Pending
2023-05-25 10:25:16 +00:00
Anton Lakotka fc33892e70 [Gradle] Test cinterop dependency from composite build
KT-58471 Verification Pending
2023-05-25 10:25:16 +00:00
Anton Lakotka 7c47ff0819 [Gradle] Introduce isProjectComponentIdentifierInCurrentBuild
KT-58471 Verification Pending
2023-05-25 10:25:16 +00:00
Anton Lakotka 9ead1d84b1 [Gradle] Fix CInterop commonization for included builds
KT-58471 Verification Pending
2023-05-25 10:25:16 +00:00
Anton Lakotka b6a3a60f36 [Gradle] Update UP-TO-DATE checks in MppCInteropDependencyTransformationIT
CInteropDependencyTransformation task now is executed also for project
dependencies.

KT-58471 Verification Pending
2023-05-25 10:25:16 +00:00
Anton Lakotka e937f0739b [Gradle] Process project dependencies in CLI version of CInterop[MDT]Task
If MetadataDependencyTransformation is triggered it will resolve related
metadata dependency configuration. Which is not recommended from gradle
performance point of view.
Update CInterop[MDT]Task to work as regular [MDT]Task i.e. it will
process project dependencies during task execution but keep the original
functionality for IDE. Since during IDE import it is expected to resolve
configurations during gradle configuration phase.

^KT-58471 Verification Pending
2023-05-25 10:25:16 +00:00
Anton Lakotka 72c7d15be8 [Gradle] Share Cinterop and regular [MDT]Tasks inputs
These tasks are essentially operating on the same inputs but produces
different ouputs. Therefore, it makes sense to extract their Task Inputs
into a separate container and let these tasks share it.

KT-58471 Verification Pending
2023-05-25 10:25:16 +00:00
Sergej Jaskiewicz 7abc6af124 [FIR, IR] Fix name mangling for dynamic types
^KT-57566 Fixed
2023-05-25 10:23:33 +00:00
Ivan Kochurkin 994c2229df [FIR] Report UNSUPPORTED_FEATURE for expect/actual members if MPP is disabled
Always enable MultiPlatformProjects for K2MetadataCompilerArguments

 ^KT-57243 Fixed
2023-05-25 09:46:56 +00:00
Ivan Kochurkin 16ed06d4e9 [FIR] Add EXPECT_ACTUAL_MODIFIER positioning strategy 2023-05-25 09:46:56 +00:00
Sebastian Sellmair d8ed7a2820 [Gradle] Run functionalTests in parallel 2023-05-25 09:33:44 +00:00
Kirill Rakhman 4dd1f9f4d6 [FIR] Set type arguments for callable reference in property delegation
#KT-58555 Fixed
2023-05-25 09:27:47 +00:00
Aleksei.Cherepanov bdfc2c33c5 Add missed dependency for JPS serialization
#KTIJ-25610 Fixed
2023-05-25 08:22:11 +00:00
Alexander Udalov 3eb7ac1aac Remove ReflectProperties.lazy, replace with lazy(PUBLICATION)
There's no point in using `ReflectProperties.lazy` over
`lazy(PUBLICATION)`, especially because of the subtle problems the
former can create, such as KT-27585. This is inspired by the fix in
99b38ccb74, although in this case I couldn't come up with an example
that would lead to a runtime exception.
2023-05-24 16:39:45 +00:00
Sebastian Sellmair e0389a0a87 [Gradle] Implement KotlinJvmTarget.mainRun (KotlinJvmRun)
This task will also automatically support the use case of
a 'carrier' task for the IDE. The IDE can use this task
to execute generic main methods, providing a -P<taskName>.mainClass
property

^KT-58661 Verification Pending
2023-05-24 15:00:07 +00:00
Ivan Kochurkin 432c781ff7 [K2, MPP] Fix actualization of fake overrides (fixes a set of bugs in coroutines / ktor)
Split MissingFakeOverridesAdder on FakeOverridesActualizer and ActualFakeOverridesAdder

^KT-57984 Fixed
^KT-58003 Fixed
^KT-58124 Fixed
^KT-57833 Fixed
^KT-58153 Fixed
2023-05-24 14:54:51 +00:00
Dmitriy Novozhilov 58f8e25bfe [JVM IR] Generate mutable lower bound type for flexible IR types 2023-05-24 14:07:33 +00:00
Dmitriy Novozhilov fdc236296d [FIR2IR] Generate @FlexibleMutability annotation on IR types if needed 2023-05-24 14:07:32 +00:00
Ilmir Usmanov a0484de1a6 JVM_IR: Do not copy static init blocks to inline class's constructor
#KT-58593 Fixed
2023-05-24 13:24:47 +00:00
Vladimir Sukharev 74c57e6057 [K2/N] Compile to native binary in two stages
^KT-56855 Fixed

Merge-request: KT-MR-10219
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-05-24 13:07:12 +00:00
Vladimir Sukharev 62901e22ec [K2/N] Turn on IR verification for passed tests
^KT-57716 Fixed

Merge-request: KT-MR-10300
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-05-24 12:23:00 +00:00
Sebastian Sellmair 3b1a7c3ac1 [Gradle] CInteropConfigurations: Support lazy configuration
Using 'whenEvaluated' (aka 'afterEvaluate') is not supported
when using lazy APIs (like register). In order to safely
copy user configuration in both use-cases,
'launchInStage(AfterFinaliseDsl)' is used as this will be safe
either way.

^KT-58838 Verification Pending
2023-05-24 11:45:21 +00:00
Sebastian Sellmair dafe24a3a9 [Gradle] Implement KT58838LazyCinteropConfiguration to cover KT-58838 2023-05-24 11:45:21 +00:00
Alexander Udalov a4121fa8f3 Enable NoSourceCodeInNotNullAssertionExceptions since 1.9
#KT-57570 Fixed
2023-05-24 11:29:51 +00:00
Alexander Udalov ad1dfd5cb9 JVM: change logic of applying KT-57570 behavior a bit
If `-Xno-unified-null-checks` is specified, do not throw exceptions, but
rather revert to the old behavior, with source code in exception
messages.

Note that `-Xno-unified-null-checks` is a flag which enables behavior of
Kotlin 1.3. It can be removed once we no longer support API version 1.3.
2023-05-24 11:29:51 +00:00
Sergej Jaskiewicz 5d3fe7547a [IR] Fix mangling generic properties from IR-based descriptors
For type parameters of generic properties,
`DeclarationDescriptor#getContainingDeclaration` must return
the property descriptor instead of the accessor function descriptor.

^KT-57436 Fixed
2023-05-24 09:58:39 +00:00
Mikhail Glukhikh 5f1976c450 FE: add test for KT-58840 2023-05-24 08:56:21 +00:00
Mikhail Glukhikh 2fcd296db8 FE: fix effective visibility bound calculation logic
#KT-58757 Fixed
#KT-58840 Fixed
2023-05-24 08:56:20 +00:00
Mikhail Glukhikh c130786889 FE: reproduce KT-58757 2023-05-24 08:56:20 +00:00
Pavel Kunyavskiy ee1608ec99 [PL] Make call an exception in case of several inherited implementations
^KT-57701
2023-05-24 08:17:59 +00:00
Vladimir Sukharev fde8909e6f [K2/N] IntegerLiteralType coercion only to unsigned integer types
^KT-57484 Fixed

Merge-request: KT-MR-10270
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-05-24 07:56:14 +00:00
Vladimir Sukharev a534708900 [K2/N] Use FqName to mangle invisible class-like symbol in fake override
^KT-57484

Merge-request: KT-MR-10263
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-05-24 07:34:11 +00:00
Dmitrii Krasnov 548ebbaf90 refactored OsCondition behavior with multiple same annotations on the same target
#KT-51553 In Progress
2023-05-24 06:58:01 +00:00
Justin Paupore dd9e127d2c [Analysis API] Hide FIR-specific diagnostic details.
Change the public-facing KtFirDiagnostic to be an interface, not
a class, and change the internal implementations to be classes, not
interfaces. This allows hiding access to the KtPsiDiagnostic underlying
the AA diagnostic class.
2023-05-23 21:24:02 +02:00
Nikolay Krasko 3eeb867f56 Minor: cleanup warnings in codebase-tests 2023-05-23 16:52:40 +00:00