Commit Graph

101850 Commits

Author SHA1 Message Date
Brian Norman 5fe5113344 [Test] Sort FIR diagnostics by offset for consistent rendering 2023-06-15 13:49:41 +00:00
Artem Daugel-Dauge 2abe04132b [Tests] Try to make CocoaPods installation more robust 2023-06-15 13:46:37 +00:00
Alexander Shabalin 00fd0a421f [K/N] Remove runtime tests for legacy MM 2023-06-15 13:16:08 +00:00
Alexander Shabalin 43a7711fcc [K/N] Add CallsCheckerIgnoreGuard 2023-06-15 13:16:08 +00:00
Dmitrii Krasnov 39e97e5766 Migrated AppleFrameworkNonMacIT to new test dsl (junit 5 and gradle test kit)
#KT-51553 In Progress
2023-06-15 11:44:58 +00:00
Dmitriy Dolovov 72525a22a6 [KLIB] Extract "ir_provider" manifest property name as a const val 2023-06-15 11:07:30 +00:00
Artem Daugel-Dauge b1faee5ec6 [Gradle] Configuration cache support in CocoaPods plugin and Apple frameworks tasks
^KT-54362 Verification Pending

Merge-request: KT-MR-9947
2023-06-15 10:37:28 +00:00
vladislav.grechko 457837a255 Fix function invocation mangling rule
Mangle invocations of functions with value classes in signature which
override (directly or indirectly) a method declared in Kotlin code.
Otherwise, NoSuchMethodError is being thrown.

^KT-55945: Fixed
2023-06-15 09:34:21 +00:00
Anna Kozlova f80ed4592d [AA] Handle KtTypeReference children in CompileTimeConstantProvider
CompileTimeConstantProvider could receive a reference expression,
whose grandparent is KtTypeReference (seen that in UAST inspection).
FIR would not contain anything explicit for this reference,
FirResolvedTypeRef would be received as the nearest parent.
Of course, in this case, there could be no compile time constant anyway.
2023-06-15 07:06:41 +00:00
Dmitrii Krasnov 455aa4a76a Migrated the rest part of git connected cocoapods tests to the new test dsl (junit 5 and gradle test kit)
#KT-51553 In Progress
2023-06-15 07:06:08 +00:00
Ivan Kylchik 3ce61f988f [IR] Replace mutable property in const transformer with data class 2023-06-14 19:02:39 +00:00
Ivan Kylchik 0e2b348fa0 [IR] Try to tun IrInterpreterKCallableNamePreprocessor only once
#KT-58923 Fixed
2023-06-14 19:02:39 +00:00
Ivan Kylchik a6a389933d [IR] Slightly simplify string concatenation folding
#KT-58923
2023-06-14 19:02:39 +00:00
Ivan Kylchik dd264cff50 [IR] Split const folding into necessary one and for optimizations only
In this commit we have a lot of change in test data. This was caused
by the way where we evaluate constants. We split constant evaluation
into two distinct parts: only necessary evaluations for `fir2ir`
(like const val and annotations) and optimizations for lowering.
Now we don't do all constant evaluation on `fir2ir`, but IR
dump is executed after this phase, so test data changed.

#KT-58923
2023-06-14 19:02:39 +00:00
Ivan Kylchik 8067df3c94 [IR] Combine IrInterpreterNameCheck with common one
This way we achieve faster compilation time. We want to traverse
IR tree as little as possible. If we add new checker than the time
to evaluate constants basically doubles.

#KT-58923
2023-06-14 19:02:39 +00:00
Ivan Kylchik e5ed1714d1 [IR] Unconditionally allow to interpret IrConst
We can interpret all const elements. It wasn't true on early
prototype phase because of some problems with unsigned numbers,
but right now it is correct to assume that all const are valid.

#KT-58923
2023-06-14 19:02:39 +00:00
Ivan Kylchik 6f4f06757a [IR] Add KType to IrBuiltins 2023-06-14 19:02:39 +00:00
Ivan Kylchik 0021a5f655 [K2] Save inlined java field into special InlineConstTracker 2023-06-14 19:02:39 +00:00
Ivan Kylchik 39242e517e [IR] Minor refactoring 2023-06-14 19:02:39 +00:00
Ivan Kylchik 2129938ef2 [IR] Properly handle interpretation errors if inside annotation class
#KT-58923
2023-06-14 19:02:38 +00:00
Ivan Kylchik ec4cf40f6f [IR] Allow to fold IrGetField expressions
#KT-58923
2023-06-14 19:02:38 +00:00
vladislav.grechko b8b8b7fd3a [JVM_IR] Move variables out of IrInlinedFunctionBlock on MFVC lowering
Variables in `IrInlinedFunctionBlock` declared before the composite
blocks with arguments evaluation may lead to error on codegen while
processing `IrInlinedFunctionBlock`.

^KT-58779: Fixed
2023-06-14 17:34:14 +00:00
vladislav.grechko 4f1d181c88 [JVM_IR] Set correct origin for new variables on MFVC flattening.
Preserve information that variable is temporary while flattening.
Otherwise, unnecessary bytecode for them might be generated.
2023-06-14 17:34:14 +00:00
Alexander Korepanov fc898c7620 [JS IR] Use type upper bounds for calculating function signatures
^KT-59239 Fixed
2023-06-14 14:57:15 +00:00
Dmitry Savvinov a4d40498c7 [mpp] Remove KMM-related diagnostic functional tests
Functional tests do not run on Mac-hosts on CI. Adding a corresponding
integration will be handled as part of more general KGP/MPP tests
rework
2023-06-14 14:36:48 +02:00
Dmitry Savvinov 768e185280 [mpp] Ignore KMM-related diagnostic tests
Currently, CI runs on Linux agents which can not work with iOS targets
2023-06-14 14:36:48 +02:00
Dmitry Savvinov 66411a92f0 [Gradle] Cleanup: remove unused classes
- CompilationFreeArgsValidator got accidentally unused at some point,
and for now we don't see a reason to enable it back. A proper solution
includes exposing K/N linker options more explicitly via DSL, which
would address the initial problem of passing linker options to compiler
accidentally

- With ComplationFreeArgsValidator removal and migration of
DisabledNativeTargetsReporter to diagnostics infra, AggregateReporter
becomes unused so it can be removed as well
2023-06-14 14:36:48 +02:00
Dmitry Savvinov e74e6759ed [Gradle] Cleanup: remove SingleWarningPerBuild API
Instead, newer infrastructure for diagnostics should be used (see
'KotlinToolingDiagnosticsCollector')
2023-06-14 14:36:48 +02:00
Dmitry Savvinov 8a5433734b [Gradle] Migrate K2-usage warning 2023-06-14 14:36:48 +02:00
Dmitry Savvinov b6a90cfe7e [Gradle] Migrate warning about using pre-HMPP dependencies to new infra 2023-06-14 14:36:48 +02:00
Dmitry Savvinov 57b71b8ea6 [Gradle] Migrate warning about not chosen JS-environment 2023-06-14 14:36:48 +02:00
Dmitry Savvinov 76c37f359a [Gradle] Migrate warning about inconsistent JVM target 2023-06-14 14:36:48 +02:00
Dmitry Savvinov 5658991fe3 [Gradle] Migrate reporting of K/N targets disabled on current host 2023-06-14 14:36:48 +02:00
Dmitry Savvinov 5a9aa43aa5 [Gradle] Migrate disabled cinterops commonization warning 2023-06-14 14:36:47 +02:00
Dmitry Savvinov 63f61685c0 [Gradle] Migrate diagnostic about empty Kotlin targets in an MPP project
Also demote it from FATAL to ERROR, as FATAL leads to pretty disruptive
UX in IDE (import fails, and you don't get a broken project, which
makes it hard to fix the root cause and declare a target)
2023-06-14 14:36:47 +02:00
Dmitry Savvinov dcb51e64df [Gradle] Migrate warning about missing Android-target to new infra 2023-06-14 14:36:47 +02:00
Dmitry Savvinov 84fb045d8a [Gradle] Migrate warning about pre-1.3 MPP plugins 2023-06-14 14:36:47 +02:00
Dmitry Savvinov 4f309c0c8f [Gradle] Migrate unrecognized K/N distro warning 2023-06-14 14:36:47 +02:00
Dmitry Savvinov d9b7130f4b [Gradle] Migrate reporting of deprecated properties usage 2023-06-14 14:36:47 +02:00
Dmitry Savvinov 4bef185ccb [Gradle] Migrate checks for non-disambiguated targets 2023-06-14 14:36:47 +02:00
Dmitry Savvinov 1a5cbe1245 [Gradle] Improve diagnostics-related test assertions
- Allow matching substring for 'assertNoDiagnostic' as well
- Better handling of cases when multiple diagnostics with the same ID
are reported (properly look for one 'withSubstring' if provided)
2023-06-14 14:36:47 +02:00
Dmitry Savvinov 1ab1dccea1 [Gradle] Support rendering diagnostics reported in execution phase
- Introduce 'UsesKotlinDiagnostics' marker-interface for tasks that
want to report diagnostics during their execution

- Introduce 'transparent mode' to collector. When all projects are
evaluated, Collector switches to it and will render all received
diagnostics right away. This allows reporting and rendering diagnostics
that are reported not from tasks, but after evaluation phase (e.g.
diagnostics on resolved dependencies)

^KT-58353 Fixed
2023-06-14 14:36:47 +02:00
Dmitry Savvinov 37e791a7d3 [Gradle] Minor: drop deprecated kotlin.build.report.enable property 2023-06-14 14:36:47 +02:00
Dmitry Savvinov dc4bbbc333 [mpp] Minor: drop warning about deprecated K/N test binary access 2023-06-14 14:36:47 +02:00
Dmitry Savvinov 6e8493fa52 [mpp] Minor: drop support for "kotlin.native.restrictedDistribution" 2023-06-14 14:36:47 +02:00
Dmitry Savvinov eeb95f2feb [Gradle] Minor: compare against expected testData in tmpDir
This might become an issue if (when) the editable diff window will
be supported, but for now it doesn't make much difference against
which file we compare the actual output.
2023-06-14 14:36:46 +02:00
Dmitry Savvinov 896292cba1 [Gradle] Minor: remove unused parameter 2023-06-14 14:36:46 +02:00
Timofey Solonin 6d66eb4ac2 [MPP] Use two simulator targets in CocoaPodsIT
^KT-58822
2023-06-14 12:28:23 +00:00
Timofey Solonin 14bc02287b [MPP] Replace obsolete target in CommonizerHierarchicalIT.optimisticCommonization
^KT-58822
2023-06-14 12:10:00 +00:00
Artem Kobzar d2b64cd481 [K/JS] Generate .js files from .ts if they were not created, because of the incremental flag in tsconfig
The incremental option will prevent creating file if there is an incremental cache from TS compiler even if the file doesn't exist.
The situation could happen if `./gradlew clean` was executed (js file will be removed and ts incremental cache - not)

Merge-request: KT-MR-10229
Merged-by: Artem Kobzar <Artem.Kobzar@jetbrains.com>
2023-06-14 09:26:18 +00:00