Compiler runner used incorrect cache key for isolated classloader:
it didn't take the actually used compiler jar into account,
only the K/N home dir.
Fix this by using the entire classpath as a key.
When running tool in-process, log the actual classpath extracted from
the classloader, not the one that was intended.
This helps to detect the cases when these two don't match.
Apply generic (backend-agnostic) compiler plugin artifact instead of
Native-specific one when Native embeddable compiler jar is used
(with `kotlin.native.useEmbeddableCompilerJar=true` project property).
This partially reverts commit 2baf344f5f,
removing support for K/N embeddable compiler jar from subplugins.
More migration-friendly implementation is to be added instead.
Create `JavaClassDescriptor`s for Java classes
Ignore anonymous and synthetic classes
as they can't impact recompilation.
Clean up handling of local and anonymous classes
Bug: KT-45777
Test: New JavaClassDescriptorCreatorTest
The "archiveFile" property is deprecated on the jar task, and
archiveFileName is used in this commit. Also, this fixes an
issue in Gradle where convention mapping is incorrectly
deserialized from configuraiton cache.
Original issue: https://issuetracker.google.com/193558867
Test: testJvmWithJavaConfigurationCache
This fixes a performance problem in the case where the lock object
is a capture and the monitor enter/exit happens directly on
field loads. When the locking happens on field loads instead of a
local, the JVM cannot prove that locking is balanced. That has
the consequence that the code is runs very slow (always in the
interpreter).
^KT-48367 Fixed.
Collections returned by collection builders are now serializable in
their read-only state.
The builder mutable collections inside collection builder lambda,
however, are not.
#KT-48177 fixed
the issue is in fact fixed by the previous commit (report error
on duplicated import) by normalizing import path before processing,
but here we're making error reporting nicer for the case.
Anonymous objects in the scope of an inline functions are copied to
all call-sites. This makes them part of the public ABI of a Kotlin
library.
We introduce a flag to mark all classes in the scope of an inline
function. When compiling with assertions enabled, we check that
this flag is set whenever we inline an anonymous object from another
module.
This commit will forward/propagate cinterops to intermediate source sets
with only one native dependent (and their metadata compilation)
^KT-47523 Verification Pending