Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UPDATE_AA_VERSION: 2.1.20-dev-1729 #2150

Merged
merged 4 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Copied from kotlinc
org.gradle.jvmargs=-Duser.country=US -Dkotlin.daemon.jvm.options=-Xmx4096m -Dfile.encoding=UTF-8

kotlinBaseVersion=2.1.0-dev-7621
kotlinBaseVersion=2.1.20-dev-201
agpBaseVersion=8.7.0
intellijVersion=233.13135.103
intellijVersion=233.13135.128
junitVersion=4.13.1
junit5Version=5.8.2
junitPlatformVersion=1.8.2
googleTruthVersion=1.1

aaKotlinBaseVersion=2.1.0-dev-5441
aaIntellijVersion=233.13135.103
aaKotlinBaseVersion=2.1.20-dev-1729
aaIntellijVersion=233.13135.128
aaGuavaVersion=33.2.0-jre
aaAsmVersion=9.0
aaFastutilVersion=8.5.11-18
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ClassVisitor : KSTopDownVisitor<OutputStreamWriter, Unit>() {
data: OutputStreamWriter
) {
super.visitClassDeclaration(classDeclaration, data)
val symbolName = classDeclaration.simpleName.asString().toLowerCase()
val symbolName = classDeclaration.simpleName.asString().lowercase()
data.write(" val $symbolName = true\n")
}
}
Expand Down
4 changes: 3 additions & 1 deletion kotlin-analysis-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ dependencies {
testRuntimeOnly("org.junit.jupiter:junit-jupiter-params:$junit5Version")
testRuntimeOnly("org.junit.platform:junit-platform-suite:$junitPlatformVersion")
testImplementation("org.jetbrains.kotlin:kotlin-compiler:$aaKotlinBaseVersion")
testImplementation("org.jetbrains.kotlin:kotlin-compiler-internal-test-framework:$aaKotlinBaseVersion")
// FIXME: use aaKotlinBaseVersion after the dependency is fixed.
testImplementation("org.jetbrains.kotlin:kotlin-compiler-internal-test-framework:2.1.20-dev-201")
testImplementation(project(":common-deps"))
testImplementation(project(":test-utils"))

Expand Down Expand Up @@ -159,6 +160,7 @@ tasks.withType<ShadowJar>().configureEach {
archiveClassifier.set("")
minimize {
exclude(dependency("org.lz4:lz4-java:.*"))
exclude(dependency("com.github.ben-manes.caffeine:caffeine:.*"))
}
mergeServiceFiles()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,7 @@ internal val DEAR_SHADOW_JAR_PLEASE_DO_NOT_REMOVE_THESE = listOf(
org.jetbrains.kotlin.analysis.api.impl.base.java.source.JavaElementSourceWithSmartPointerFactory::class.java,
org.jetbrains.kotlin.analysis.api.impl.base.projectStructure.KaBaseModuleProvider::class.java,
org.jetbrains.kotlin.analysis.api.impl.base.references.HLApiReferenceProviderService::class.java,
org.jetbrains.kotlin.analysis.api.fir.KaFirDefaultImportsProvider::class.java,
org.jetbrains.kotlin.analysis.api.fir.KaFirSessionProvider::class.java,
org.jetbrains.kotlin.analysis.api.fir.references.ReadWriteAccessCheckerFirImpl::class.java,
org.jetbrains.kotlin.analysis.api.standalone.base.declarations.KotlinStandaloneFirDirectInheritorsProvider::class.java,
Expand All @@ -659,6 +660,7 @@ internal val DEAR_SHADOW_JAR_PLEASE_DO_NOT_REMOVE_THESE = listOf(
org.jetbrains.kotlin.analysis.api.impl.base.permissions.KaBaseAnalysisPermissionChecker::class.java,
org.jetbrains.kotlin.analysis.api.platform.KotlinProjectMessageBusProvider::class.java,
org.jetbrains.kotlin.analysis.api.platform.permissions.KaAnalysisPermissionChecker::class.java,
org.jetbrains.kotlin.analysis.api.platform.projectStructure.KotlinSimpleGlobalSearchScopeMerger::class.java,
org.jetbrains.kotlin.analysis.api.fir.modification.KaFirSourceModificationService::class.java,
org.jetbrains.kotlin.analysis.api.fir.references.KotlinFirReferenceContributor::class.java,
org.jetbrains.kotlin.light.classes.symbol.SymbolKotlinAsJavaSupport::class.java,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class KSPropertyDeclarationImpl private constructor(internal val ktPropertySymbo
return@lazy ktPropertySymbol.hasBackingField
val classId = when (
val containerSource =
(ktPropertySymbol as? KaFirKotlinPropertySymbol)?.firSymbol?.containerSource
(ktPropertySymbol as? KaFirKotlinPropertySymbol<*>)?.firSymbol?.containerSource
) {
is JvmPackagePartSource -> containerSource.classId
is KotlinJvmBinarySourceElement -> containerSource.binaryClass.classId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,8 @@ internal fun KaDeclarationContainerSymbol.getAllProperties(): Sequence<KSPropert
[email protected] { true }
.filter {
it.isVisibleInClass(this@getAllProperties as KaClassSymbol) ||
it.containingSymbol == this@getAllProperties
it.containingSymbol == this@getAllProperties ||
it.containingSymbol?.psi == [email protected]
}
.mapNotNull { callableSymbol ->
when (callableSymbol) {
Expand All @@ -292,7 +293,8 @@ internal fun KaDeclarationContainerSymbol.getAllFunctions(): Sequence<KSFunction
[email protected] { it.callables { true } + it.constructors }
.filter {
it.isVisibleInClass(this@getAllFunctions as KaClassSymbol) ||
it.containingSymbol == this@getAllFunctions
it.containingSymbol == this@getAllFunctions ||
it.containingSymbol?.psi == [email protected]
}
.mapNotNull { callableSymbol ->
// TODO: replace with single safe cast if no more implementations of KSFunctionDeclaration is added.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ class IncrementalJavaFileManager(val environment: KotlinCoreProjectEnvironment)

singleJavaFileRoots.addAll(newSingleJavaFileRoots)

rootsIndex = JvmDependenciesDynamicCompoundIndex().apply {
addIndex(JvmDependenciesIndexImpl(roots))
rootsIndex = JvmDependenciesDynamicCompoundIndex(true).apply {
addIndex(JvmDependenciesIndexImpl(roots, true))
}

val corePackageIndex = project.getService(PackageIndex::class.java) as CorePackageIndex
Expand Down Expand Up @@ -103,7 +103,7 @@ class IncrementalJavaFileManager(val environment: KotlinCoreProjectEnvironment)
singleJavaFileRoots.addAll(newSingleJavaFileRoots)

rootsIndex.apply {
addIndex(JvmDependenciesIndexImpl(roots))
addIndex(JvmDependenciesIndexImpl(roots, true))
}

val corePackageIndex = project.getService(PackageIndex::class.java) as CorePackageIndex
Expand Down
3 changes: 3 additions & 0 deletions kotlin-analysis-api/testData/parent.kt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
// parent of Int: foo
// parent of foo: B
// parent of B<*>: synthetic constructor for B
// parent of Any: (Any..Any?)
// parent of (Any..Any?): T
// parent of T: B
// parent of synthetic constructor for B: B
// parent of RGB: (RGB..RGB?)
// parent of (RGB..RGB?): INVARIANT (RGB..RGB?)
Expand Down
1 change: 1 addition & 0 deletions kotlin-analysis-api/testData/referenceElement.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
// KSClassifierReferenceJavaImpl: Qualifier of Any is null
// KSClassifierReferenceJavaImpl: Qualifier of Any is null
// KSClassifierReferenceJavaImpl: Qualifier of Any is null
// KSClassifierReferenceJavaImpl: Qualifier of Any is null
// KSClassifierReferenceJavaImpl: Qualifier of H is J<INVARIANT (String..String?)>
// KSClassifierReferenceJavaImpl: Qualifier of I is J
// KSClassifierReferenceJavaImpl: Qualifier of String is null
Expand Down
Loading