- Write now returns result (Metadata or ByteArray) directly without re-wrapping it;
- annotationData/bytes is private to avoid unsoundness if external client corrupts it;
- .toXxx() do not throw exceptions anymore and deprecated. Exceptions are thrown only from read/write;
- Instead of toXxx(), properties like .kmClass should be used instead. They're initialized eagerly and return a view without copying.
- KotlinClassMetadata.Unknown is now a data object, as no useful information is exposed
#KT-59365 Fixed
Instead of access by index. To avoid performance issues
when the subclass `get(index)` has non-constant time complexity.
It also aligns behavior with JVM.
For example when commonMain depends on commonTest there will be
CommonMainWithDependsOnDiagnostic diagnostic reported.
Or running gradle build on linux with apple targets inside will report
DisabledKotlinNativeTargets diagnostic.
KotlinSourceSetTreeDependsOnMismatchTest is not interested in them
Excluding android source sets can actually bring unexpected behaviour
when, for example, androidInstrumentedTest get depends on commonMain.
In this case "nativeMain" will be reported as checked skipped android
source sets, but they are still present in dependsOn edges.
Another important aspect is that mpp+android is a majority and their
cases should be checked as well
^KT-47144 Verification Pending
Introduce "White Crow" heuristic that will report incorrect dependency
edge when there is only one source set with different Source Set Tree.
Otherwise, report all source sets from all Source Set Tree groups
to user to choose which of them are incorrect.
And cover with more tests.
^KT-47144 Verification Pending
In Kotlin Multiplatform it is not possible to have
source set dependencies between two different SourceSet Trees.
For example commonTest can't dependOn commonMain as SourceSet dependency
instead binaries of commonMain should be included as dependency to
commonTest. Which is implemented through different mechanisms
^KT-47144 Verification Pending
- 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
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)