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

Use reflection-based PsiElement in error reporting #445

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

drewhamilton
Copy link
Owner

@drewhamilton drewhamilton commented Dec 10, 2024

to work around compiler vs. IDE packaging issue.

I think this will address #428, but I'm having trouble verifying locally. The IDE keeps popping up the same error stacktrace, even though the catch is now in place. Maybe it's using some kind of caching mechanism, so I'm just going to try and merge this and see if it fixes the issue.

Comment on lines +88 to +91
try {
Class.forName("org.jetbrains.kotlin.com.intellij.psi.PsiElement")
} catch (_: ClassNotFoundException) {
Class.forName("com.intellij.psi.PsiElement")
Copy link
Owner Author

Choose a reason for hiding this comment

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

I swapped the order from the example, because I think the former is the one used by the compiler while the latter is used by the IDE, and I want the compiler to be faster. Not sure about this though.

@drewhamilton drewhamilton merged commit ce322b0 into main Dec 10, 2024
6 checks passed
@drewhamilton drewhamilton deleted the drew/psi-element-workaround branch December 10, 2024 18:18
@drewhamilton drewhamilton mentioned this pull request Dec 10, 2024
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.

1 participant