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

[kotlin][debugger] Add capability to fetch @kotlin.Metadata in the debugger #2849

Open
wants to merge 1 commit into
base: kt-master
Choose a base branch
from

Conversation

nikita-nazarov
Copy link
Contributor

As personally discussed with @zuevmaxim

import kotlin.io.encoding.ExperimentalEncodingApi

fun ReferenceType.fetchKotlinMetadata(context: EvaluationContext): KotlinClassMetadata? {
val classObject = classObject() ?: return null
Copy link
Contributor

Choose a reason for hiding this comment

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

We can cache the result of this function to avoid redundant computations

Copy link
Contributor Author

@nikita-nazarov nikita-nazarov Sep 26, 2024

Choose a reason for hiding this comment

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

I also thought about creating a metadata cache. We need a cache that would invalidate itself when the debug process stops. The only issue is that I didn't find any 'debug process wise' caches in Intellij IDEA. Only project wide ones are used in the Kotlin debugger.

@nikita-nazarov nikita-nazarov force-pushed the nazarov/metadata-in-debugger branch from 1dc6149 to ea15856 Compare October 2, 2024 13:58
@nikita-nazarov nikita-nazarov changed the base branch from master to kt-master October 2, 2024 13:58
@nikita-nazarov nikita-nazarov force-pushed the nazarov/metadata-in-debugger branch from ea15856 to 207800e Compare October 7, 2024 18:01
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