There are design questions about reflection for adapted references,
so the current proposal is to prohibit reflection on them and support
it properly later
#KT-40406 Fixed
See original logic at org.jetbrains.kotlin.types.expressions.unqualifiedSuper.UnqualifiedSuperKt#resolveUnqualifiedSuperFromExpressionContext
^KT-39070 Fixed
^KT-39599 Related
Before this change, it was resolved independently of containg call
But in fact, the type of `super` depends on the name of the callee
(see KT-39599 and KT-39070)
KAPT was relying on clearing JarFileFactory to make sure
annotation processing does not hold onto annotation processing
classpath once done. Once KAPT switched to using Gradle workers, multiple
KAPT runs were sharing the same class loader ie. the same version
of JarFileFactory. Clearing the cache resulted in race condition,
as some runs were unable to load processors from jars.
This commit fixes this problem by avoiding the use of ServiceLoader
which was causing the issue. Jars would be added to the cache, but
they would never be removed. That's why JarFileFactory had to be
clearned manually. By loading the processor names manually (simply
exploring the classpath), no file handles leak.
Fixes https://youtrack.jetbrains.com/issue/KT-34604
Test: verified against the test project from the bug
When serializing ClasspathEntryData, ids assigned to types were
incorrect, resulting in corrupt data when deserializing files. This
happened if there were dependencies between classes.
Fixes KT-39876
Test: ClasspathAnalyzerTest
The success marker file is written to the disk only upon successful
commonization. If something goes wrong, this file is not written to
the disk. So the subsequent call of 'runCommonizer' task will be
considered not up-to-date.
^KT-40120
Don't annotate the whole 'distributionDir' with @InputDirectory.
The contents of the distribution directory may grow over time due to
compilation cache and new commonized libraries.
Don't annotate 'baseDestinationDir' with @InputDirectory. The base
destination directory may contain numerous subdirectories with the
libraries produced for different combinations of commonized targets.
This means that the contents of the base directory will grow over time.
Use more precise directory up-to-dateness checks:
* Annotate the directory with the original common libraries
(i.e. 'stdlib') as @InputDirectory.
* Annotate the directory with the original platform libraries
(all targets altogether) as @InputDirectory.
* For each combination of commonized targets mark the list of the
directories with resulting libraries as @OutputDirectories.
^KT-40120
There is no need to update type of delegate expression if it's already
resolved correctly (doesn't include non-proper types). In almost all
cases it was fine except number literals as there we didn't box
expression in backend and got problems at bytecode verification stage
#KT-40057 Fixed