This is needed for cases like dump handlers to register corresponding
checkers, which compares identity of dumps for different configurations,
like `IrTextDumpHandler` and `FirIrDumpIdenticalChecker`
It is disabled by default, can be enabled by code change.
It's useful when changes in dumper is done with significant
amount of tests changed.
^KT-65460
There are two ways of test service registration:
- manual call to `useAdditionalServices` in abstract test runner
- using of `additionalServices` property in one of test entity (e.g. in handler)
Services are registered in the same order (manual first, automatic second)
This led to the situation that if there was registered more specific
implementation of the service in the test configuration, it will be
overridden with regular implementation from handler, which is fixed
by this commit
After previous commits IrActualizer runs only there are at least two modules
in backend input. So to check diagnostics from Actualizer all tests
should contain at least two modules
Diagnostics in test `extendExpectedClassWithAbstractMember.kt` were
changed because there is an exception from IrActualizer caused by
errors from frontend (`ABSTRACT_METHOD_NOT_IMPLEMENTED`), which is
swallowed by this kind of tests
Properly set up dom-api-compat dependency for JS IR tests. Since this dependency is added
automatically for every Kotlin/JS library, it should be present during tests just as stdlib.
As a result, tests for serializable enums were changed since 1.6.0 runtime does not require enums to be explicitly serializable.
^KT-61573 Fixed
Review: https://jetbrains.team/p/kt/reviews/11969/timeline
Tests:
- MultiPlatformIntegrationTestGenerated
- CliTestGenerated
- MultiPlatformIntegrationTestGenerated
- DiagnosticTestGenerated.Multiplatform
- FirLightTreeOldFrontendDiagnosticsTestGenerated
Also add -Xexpect-actual-classes flag to all necessary ./libraries/* modules
Otherwise compilation of those modules failes because of `-Werror`
We have `BackendKinds.IrBackend` for IR emitted by the frontend.
We need a different backend kind for IR deserialized from klibs.
We cannot use `BackendKinds.IrBackend` for that purpose, because we
cannot have two different `IrBackendInput` subclasses with the same
kind.
We need a different `IrBackendInput` subclass for deserialized IR
because the `IrBackendInput` for frontend-emitted IR contains some
properties like `sourceFiles` which don't make sense for
deserialized IR.
Since we now have two backend kinds for IR artifacts, we need to make
certain functions and classes in the test infrastructure generic
over backend kinds.
Note: the JsIrDeserializedFromKlibBackendInput class is not used
anywhere yet. We will use it in the coming commits.
According to
`FirNativeCodegenBoxTestGenerated.testNestedClassesInAnnotations`,
the annotation
`kotlin.internal.PlatformDependent` is
unresolved reference.
^KT-58549 Fixed
Pinning the language version is rarely the right thing to do.
This changes makes it harder to do so by requiring an additional
directive with a name that indicates to developers that they are
likely doing something dangerous.
We can use less strict rule for produced annotations:
* Previously: the same annotations from `findAnnotation` and `annotations`
have the same identity
* Now: the same annotations from `findAnnotation` and `annotations`
are equals by 'equals'
^KT-56046
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
Previously, we resolved all declaration to the TYPES phase to collect their sealed inheritors
and thus not really checking lazy resolution to TYPES.
Now sealed class inheritors collection happens in separate LLFirResolveSession
The constraint system for the old type inference is going to be removed.
Also, `CONSTRAINT_SYSTEM_FOR_OVERLOAD_RESOLUTION` isn't used in the production