We should pass container for correct logic around CLASS_HEADER_ANNOTATIONS.
Also, such correct containers will be used in the context of KT-63042 to
correctly detect an annotation ownership
^KT-63042
^KT-63842 Fixed
Add a sir-compiler-bridge module that adds Kotlin and C bridges
for SIR. As SIR is still WIP, the module accepts `BridgeRequest`
instances instead of SIR elements.
New modules 'sir', 'sir-passes', and 'sir-analysis-api' were added under
'native:swift' for creating and manipulating Swift IR elements.
* `sir` contains the implementation of Swift IR.
* `sir-analysis-api` contains translation from Analysis API to SIR.
* `sir-passses` contains transformation passes.
This groundwork will allow to progress with the Swift IR.
ObjCExport accessed `__NSCFBoolean` using
`objc_getClass("__NSCFBoolean")`. This class is a private API.
Remove this private API usage by getting the same class from
`[[NSNumber numberWithBool:YES] class]` instead.
Also remove `__NSCFBoolean` from the related error messages.
`__NSCFBoolean` didn't cause Kotlin-compiled apps to be rejected by
Apple, but this commit reduces the risk that this might happen in the
future, and addresses related user concerns.
^KT-62091
- ObjCExport tests for numbers RTTI conversions didn't really check
RTTI, because of a compiler optimization. Fix this by converting to
Any.
- Also add more tests that specifically check that bool `NSNumber` get
dynamically converted to `kotlin.Boolean` box. Those tests can't be
affected by possible future compiler optimizations.
It looks like K1 doesn't do them.
And it's not particularly bad because
in the ideal world we'd have dynamics
with variable upper bound so that
in `dynamic?.let { it }` `it` would
be `Nothing..Any` (smartcasting to
`Any` is not correct because `dynamic`
can be passed into anything, but `Any`
can not).
^KT-63071
When running builds from IDEA, especially tests, the interactive consent request is barely noticeable. Also, some of the tools windows are non-interactive terminals. Thus, we detect the IDEA builds and fail fast to make it noticeable.
^KTI-1443 Fixed
Without the filter, we were walking both through subdirectories and their files, so some files might be counted twice. Moreover, the behaviour of `File.length` is unspecified for directories.
^KT-63010 In Progress
Before this fix, the size metrics were measured after the compilation is finished, but before the caches are closed. In many cases it might lead to incorrect measurements. After flipping the default value of the `keepIncrementalCompilationCachesInMemory` flag for Gradle builds, it started to cause always incorrect results.
^KT-63010 In Progress
If a serializable class has generic type parameters, its serializer is not an object
and has a specialized constructor. This constructor was public in K1 and should
be public in K2 so it can be called from other serializable classes
(in case class is e.g., part of sealed hierarchy).
#KT-63402 Fixed
This diagnostic used an incorrect type for rendering (outer class type instead of a property type)
and didn't expand type argument of `KSerializer`.
Also add an additional test case for generic parameters.
#KT-63570 Fixed