- centralize repository management in settings.gradle.kts
- allow to specify dokka repository with a gradle property
- automatically add mavenLocal for -local dokka versions
- specify kotlin version for building plugins in one place
- A `classId` can only be a generated function class if it ends with a
digit, per the contract described in `FunctionTypeKind`.
- The optimization uses this fact to avoid calling
`functionTypeService.getKindByClassNamePrefix`, which can be expensive
due to a hash map access.
- The optimization reduces time spent in `LLFirProvider.SymbolProvider`
during my tests by 30-90% in some highlighted files. In other
performance tests, the optimization makes performance worse, so more
work is needed. In general, higher workload tests run faster with the
optimization, while lower workload tests run slower. This is expected
as the optimization trades short-term performance (for building
classifier/callable name sets) in favor of long-term speedup.
- The changes should also reduce the size of declaration caches like
`LLFirProviderHelper.classifierByClassId`.
- Building the name sets has a second use, as a similar optimization can
be implemented for dependent module providers, which may rely on the
sets computed here.
Note that there's no code that checks that
FirReceiverParameter's annotation's use-site target
is indeed `@receiver:`, because otherwise the
annotation wouldn't have made it into
the FirReceiverParameter.
In contrast, in K1 all such annotations are treated
as annotations on a KtTypeReference.
^KT-56769 Fixed
'JvmClassFileBasedSymbolProvider' works incorrectly for some cases,
such as built-in classes. Moreover, the whole declaration binding logic
looks over-complicated and redundant, as we get a 'ClassId'/'CallableId'
from a 'KtDeclaration', and look for it again in indices.
This commit fixes a bunch of failing completion tests:
- HighLevelJvmBasicCompletionTestGenerated
- HighLevelMultiFileJvmBasicCompletionTestGenerated
- FirKeywordCompletionHandlerTestGenerated
After 1cfd2ae7ff, all non-local
declarations became targets for on-air resolution. However, some of
them, including secondary constructors, are not supposed to be used
in that way. The commit restores the previous behavior.
This commits fixes failing tests in the following groups:
- FirIdeDependentAnalysisSourceModuleIsUsedAsExpressionTestGenerated
- FirIdeDependentAnalysisSourceModuleReferenceResolveTestGenerated
- FirOnAirResolveTestGenerated