Skip to content

Add PSI element implementations of KSFunctionDeclarationImpl and KSPropertyDeclarationJavaImpl#2877

Open
bcorso wants to merge 1 commit intogoogle:mainfrom
bcorso:psi-declarations
Open

Add PSI element implementations of KSFunctionDeclarationImpl and KSPropertyDeclarationJavaImpl#2877
bcorso wants to merge 1 commit intogoogle:mainfrom
bcorso:psi-declarations

Conversation

@bcorso
Copy link
Copy Markdown
Collaborator

@bcorso bcorso commented Apr 21, 2026

This change adds a PSI element implementation of KSFunctionDeclarationImpl and KSPropertyDeclarationJavaImpl to work around performance bugs in the Analysis API for java source/class file declaration resolution (https://youtrack.jetbrains.com/issue/KT-85692).

To use the new implementation, enable the experimentalPsiResolution flag.

Bug: https://youtrack.jetbrains.com/issue/KT-85692

Copy link
Copy Markdown
Collaborator

@jaschdoc jaschdoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! Most of my comments are nits and most questions are just for clarification.
However, I'm concerned that we are starting to depend on the configuration mode in too many places and should reconsider how we want to support these two modes of operation. But that is outside the scope of this PR :)

@bcorso bcorso requested a review from hfmehmed as a code owner April 27, 2026 07:12
@bcorso bcorso force-pushed the psi-declarations branch 7 times, most recently from a3b1846 to 2f754ba Compare April 27, 2026 22:51
@jaschdoc
Copy link
Copy Markdown
Collaborator

@bcorso, do you want me to review it again? If so, could you rebase on main and push again? We recently had some CI issues which should be fixed for now.

@bcorso bcorso force-pushed the psi-declarations branch 2 times, most recently from 77fe633 to 8e84ca8 Compare May 2, 2026 08:29
@bcorso bcorso requested a review from jaschdoc May 3, 2026 16:40
@bcorso bcorso force-pushed the psi-declarations branch 4 times, most recently from 23256fd to 88035cf Compare May 4, 2026 04:07
jaschdoc
jaschdoc previously approved these changes May 5, 2026
Copy link
Copy Markdown
Collaborator

@jaschdoc jaschdoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! Thank you. My comments are mostly just nits and questions :)

Comment thread test-utils/testData/api/declarationsInClass.kt Outdated
Comment thread test-utils/testData/api/declarationsInClass.kt
jaschdoc
jaschdoc previously approved these changes May 7, 2026
Copy link
Copy Markdown
Collaborator

@jaschdoc jaschdoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I left two minor comments, we can change in another PR.

@jaschdoc
Copy link
Copy Markdown
Collaborator

jaschdoc commented May 7, 2026

@troelsbjerre could you take a quick look as well? Thanks!

This change adds a PSI element implementation of `KSFunctionDeclarationImpl`
and `KSPropertyDeclarationJavaImpl` to work around performance bugs in the
Analysis API for java source/class file declaration resolution.

To use the new implementation, enable the `experimentalPsiResolution` flag.

Bug: https://youtrack.jetbrains.com/issue/KT-85692
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants