In gradle metadata transformations for CInterops in composite builds
it is possible that resolved artifact is not actually created.
For example if host machine is not MacOS but composite build has
projects with enabled Apple targets. So apple-specific tasks will be
disabled but still configured and during dependency resolution
its outputs will be provided in artifact view.
We have already checked for cases when there is no resolved artifact.
But apparently it is not enough, and it is important to check that file
exists physically.
^KT-63197 Verification Pending
On non-mac machines. With projects that have enabled MacOS targets.
In this scenario we don't want to ruin IDE UX for users that just
want to use IDE and work with project parts that is not related to apple
^KT-63197
single builder parameter
single postponed type variable
single origin of type information
cover member properties as type info sinks;
cover extension functions as type info sinks;
cover extension properties as type info sinks;
cover extension functions as type info sources;
cover extension properties as type info sources;
cover input values of builder arguments as type info sinks;
cover input values of builder arguments as type info sources;
cover return types of builder parameters as type info sources;
relevant issues:
KT-61907
KT-61909
KT-63477
- There is no other usage of `AssertionError` in the
`org.jetbrains.kotlin.psi` package. `errorWithAttachment` is more
idiomatic, throws an `Exception` instead of an `Error`, and avoids
leaking user code.
- The exceptions in KT-63130 occur because PSI tree change events may be
published when parts of the PSI under modification are inconsistent.
Such inconsistent elements are then analyzed by
`LLFirDeclarationModificationService` to check if the modification
occurs in a contract statement.
- The solution adds `*OrNull` functions to `KtQualifiedExpression` which
return `null` instead of failing with an exception when the receiver
or selector cannot be found.
^KT-63130 fixed
- The cause of KT-63130 is that `LLFirDeclarationModificationService`
tries to analyze inconsistent PSI. These new tests replicate the
inconsistent PSI by deleting different children and then call the
declaration modification service with it, making sure that the service
doesn't throw any exceptions. Both exceptions mentioned in the issue
are reproduced by the added tests, specifically, the receiver and
selector resilience tests for dot-qualified expressions.
- A few of the tests need to be marked with `IGNORE_FIR` until the error
has been fixed in the subsequent commit.
^KT-63130
- To support PSI modification, the test environment requires some
additional configuration, which is encapsulated in
`AnalysisApiPsiModificationTestServiceRegistrar`.
- The test also has to allow write access explicitly, which is
configured in `AnalysisApiFirModifiablePsiSourceTestConfigurator`.
- In general, Analysis API tests forbid write access because the
Analysis API should not be used from write actions. However, in some
cases we might want tests to e.g. modify PSI, which requires write
access. This change allows `AnalysisApiTestConfigurator`s to enable
write access for the specific test.
Terminating a CFG node because the result is Nothing should be reserved
for explicit Nothing type definitions, and not apply when smartcasting.
This allows boolean expressions to propagate implications correctly even
when the RHS is impossible or will never be executed.
^KT-47931 Fixed
Fixups KT-52976 as the intention was to remove conventions registration. However until this commit, `gradle81` variant was used for all the 8.1+ versions providing an implementation that registers conventions.
^KT-63499 Fixed
We could get several files from the IDE to analyze. For example, some
code fragment and a file with context information. This additional
file, in fact, can be a file where a code fragment is defined, and we
can accidentally analyze a single file twice that leads to errors.
The commit removes all the KLib resolution logic,
now Analysis API Standalone clients need to provide all the KLib
list directly.
The resolution logic was removed as too error-prone and requiring compiler configurations.
Kotlin Gradle plugin can provide a full set of required KLibs,
so if a client is a Gradle plugin, this should not be an issue.
Probably, some fancy API which will explicitly perform all KLib dependency searches
should be introduced in the future (KT-63395)
^KT-63126 fixed
This change is required to support a new approach to lowering
execution. There will be no more guarantee that every module
will execute `JsDefaultArgumentStubGenerator` lowering before
moving on.
#KT-63073