- As mentioned in KT-60570, memory consumption in cached symbol names
providers is caused partially by lots of instances of empty mutable
sets. This commit replaces such sets with the `emptySet()` singleton.
- This improvement also makes sense for callable names because the IDE
"package names with top-level callables" set currently contains all
package names in the project.
- In my local tests of the `setUp` Find Usages performance test, the
retained size of `FirDelegatingCachedSymbolNamesProvider` is cut down
from 208MB to 170MB by the empty class name set optimization, and from
170MB to 115MB by the empty callable name set optimization.
This commit prevents language version increase due to bootstrapping
problems. Compiler version X attempts to build the project with the
current version X+1 -> warning about progressive mode cannot be enabled ->
error due to -Werror -> build failure.
This commit explicitly sets LV 1.9 for all projects with disabled FIR
bootstrap, as well as for libraries, including Native stdlib.
Related to KT-59171
By ignoring type parameters. Since type parameters in annotations are a
very limited feature, their sole use is to be able to specify them as
KClass argument: annotation class Foo<T: Any>(val bar: KClass<T>).
Since we can encounter type param only as a KClass type argument (and
never as a property type), simple approach of ignoring them works fine.
In that case, since we simply copy property types to synthetic
implementation class, its properties in IR start look like this:
annotation class FooImpl(override val bar: KClass<T of Foo>). This IR
seems to be not completely correct, since FooImpl.bar type contains T of
Foo param, which is out of its scope. However, so far I didn't
encounter any problems with this during testing and after MR discussion
this approach has been considered possible.
#KT-59558 Fixed
#KT-59036 Fixed
They were needed as a temporary migration in scope of KT-58587
Now the bootstrap and IDE include KT-58587 patch, so @Suppress and
`final` are no longer needed
- make some utility functions and classes public
- split some classes into common and Kapt 3 - specific parts
- use Kapt 4-ready filtering of @Metadata annotations in tests
User scripts may apply KGP/Jvm plugin not immediately in 'plugins {}'
block. And a script may also already add some additional resources into
a java source set before plugin apply. On apply plugin has erased such
additionally configured resource dirs as it assumed only the default one
are set. Now it also syncs them.
^KT-60459 Fixed
Refactoring in 4986cb14 introduced an unintentional behavior change:
private symbols are now findable in symbol table with lookup by
signature.
Unfortunately, this is not correct - private symbol signature might not
be unique (or at least was sometimes not unique in older compiler
versions), which leads to crashes on deserializing corresponding klib.
This commit restores old behavior.
^KT-60616
This is an attempt to bring consistency to array constructors reified requirement.
Currently,
JVM - reified type in all three: arrayOfNulls, arrayOf, emptyArray
Native - reified in arrayOfNulls and arrayOf, but not in emptyArray
JS & Wasm - reified in arrayOfNulls, but not in arrayOf and emptyArray
Merge-request: KT-MR-11005
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
Old MPP plugins are deprecated for a long time. It is time to report
fatal error for such cases.
Our stdlib still and kotlin-test still using them, so we cannot just
completely remove them, but there is a way to suppress this error:
kotlin.internal.mpp12x.deprecation.suppress=true
Code for the old plugins (together with the remaining testsdata)
will be completely removed once stdlib and kotlin-test
migration completed. ETA: ~ 2.0-Mx
#KT-60553 Verification Pending
During the tests we are using the verbose way of render the diagnostic
meaning, that we are adding the diagnostic id to the diagnostic message.
And we previously didn't have that for one case, so we were unable to
detect in tests that diagnostic with FATAL severity was reported
Temporary solution for K1 - see comments in the code
it seems that a scenario reproduced in the MainKtsTest.testKt48812
wasn't covered with analogous changes before.
And it wasn't detected while main-kts tests weren't a part of the
K1 scripting tests.
The test is fixed now, and testing of main-kts is restored.
the script declarations are considered public, at least because they
can be reused from another script then used with the `importedScripts`
configuration property. It also improves the compatibility with K1
scripting.
and base class handling:
Since in K2 we do not distinguish between script arguments taken from
the base class and provided properties, we need this extra functionality
to preserve the argument order of K1 scripts.
This is a temporary measure, since we're going to deprecate base class
usage at some point (KT-60449), so the relevant constructor arguments
should disappear too.