Skip to content

Conversation

@dkhalanskyjb
Copy link
Collaborator

According to @mvicsokolova, the following entry points are not used by IDEA since 2020:

kotlinx.coroutines.debug.internal.StackTraceFrame
	field callerFrame
	field stackTraceElement
kotlinx.coroutines.StandaloneCoroutine
	field _state
	field context
kotlinx.coroutines.ChildContinuation
	field child
kotlinx.coroutines.CancellableContinuationImpl
	field _decision
	field delegate
	field resumeMode
	field submissionTime
	field context
kotlinx.coroutines.DispatchedContinuation
	field continuation

According to https://youtrack.jetbrains.com/issue/IDEA-335375/Change-coroutine-debugger-implementation-to-use-a-new-package#focus=Comments-27-6989405.0-0,
this leaves only the following internal entry points:

kotlinx.coroutines.debug.internal.DebugCoroutineInfo
	method getCreationStackTrace()
	method getState()
	method lastObservedStackTrace()
	field context
	field sequenceNumber
	field lastObservedFrame
	field lastObservedThread
kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl
	method getCreationStackTrace()
	method getContext()
	field lastObservedThread
	field _state
	field _lastObservedFrame
	field sequenceNumber
kotlinx.coroutines.debug.internal.DebugProbesImpl
	field INSTANCE
	method isInstalled$kotlinx_coroutines_debug()
	method isInstalled$kotlinx_coroutines_core()
	method enhanceStackTraceWithThreadDump()
	method dumpCoroutinesInfo()
	method dumpCoroutinesInfoAsJsonAndReferences()
	method enhanceStackTraceWithThreadDumpAsJson()
kotlinx.coroutines.debug.internal.DebugProbesImpl$CoroutineOwner
	field info
kotlinx.coroutines.CoroutineId
	field Key
	method getId()

... the following public entry points:

kotlinx.coroutines.CoroutineName
	field Key
	method getName()
kotlinx.coroutines.Job
	field Key
kotlinx.coroutines.CoroutineDispatcher
	field Key

... and these entry points outside of the library:

kotlin.coroutines.CombinedContext
	method get()
kotlin.coroutines.jvm.internal.DebugMetadataKt
	method getStackTraceElement()
	method getSpilledVariableFieldMapping()

This commit updates the comments and removes the extraneous @PublishedApi annotations, giving us more flexibility to change code.

According to @mvicsokolova, the following entry points are not
used by IDEA since 2020:

kotlinx.coroutines.debug.internal.StackTraceFrame
	field callerFrame
	field stackTraceElement
kotlinx.coroutines.StandaloneCoroutine
	field _state
	field context
kotlinx.coroutines.ChildContinuation
	field child
kotlinx.coroutines.CancellableContinuationImpl
	field _decision
	field delegate
	field resumeMode
	field submissionTime
	field context
kotlinx.coroutines.DispatchedContinuation
	field continuation

This leaves only the following *internal* entry points:

kotlinx.coroutines.debug.internal.DebugCoroutineInfo
	method getCreationStackTrace()
	method getState()
	method lastObservedStackTrace()
	field context
	field sequenceNumber
	field lastObservedFrame
	field lastObservedThread
kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl
	method getCreationStackTrace()
	method getContext()
	field lastObservedThread
	field _state
	field _lastObservedFrame
	field sequenceNumber
kotlinx.coroutines.debug.internal.DebugProbesImpl
	field INSTANCE
	method isInstalled$kotlinx_coroutines_debug()
	method isInstalled$kotlinx_coroutines_core()
	method enhanceStackTraceWithThreadDump()
	method dumpCoroutinesInfo()
	method dumpCoroutinesInfoAsJsonAndReferences()
	method enhanceStackTraceWithThreadDumpAsJson()
kotlinx.coroutines.debug.internal.DebugProbesImpl$CoroutineOwner
	field info
kotlinx.coroutines.CoroutineId
	field Key
	method getId()

... the following *public* entry points:

kotlinx.coroutines.CoroutineName
	field Key
	method getName()
kotlinx.coroutines.Job
	field Key
kotlinx.coroutines.CoroutineDispatcher
	field Key

... and these entry points outside of the library:

kotlin.coroutines.CombinedContext
	method get()
kotlin.coroutines.jvm.internal.DebugMetadataKt
	method getStackTraceElement()
	method getSpilledVariableFieldMapping()

This commit updates the comments and removes the extraneous
`@PublishedApi` annotations, giving us more flexibility to change
code.
@dkhalanskyjb dkhalanskyjb changed the title Remove the @PublishedApi that are no longer needed Remove the @PublishedApi that are no longer needed for the debugger Apr 5, 2024
@dkhalanskyjb dkhalanskyjb requested a review from qwwdfsad April 5, 2024 11:39
Copy link
Member

@qwwdfsad qwwdfsad left a comment

Choose a reason for hiding this comment

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

Nice!

FTR, I checked that the debugger still works, then intentionally broke it (via `isInstalled JVM name) and ensured it didn't

@dkhalanskyjb dkhalanskyjb merged commit 09ddc06 into develop Apr 8, 2024
@dkhalanskyjb dkhalanskyjb deleted the dk-hide-old-idea-entrypoints branch April 8, 2024 09:34
Corje pushed a commit that referenced this pull request May 10, 2024
According to @mvicsokolova, the following entry points are not
used by IDEA since 2020:

kotlinx.coroutines.debug.internal.StackTraceFrame
	field callerFrame
	field stackTraceElement
kotlinx.coroutines.StandaloneCoroutine
	field _state
	field context
kotlinx.coroutines.ChildContinuation
	field child
kotlinx.coroutines.CancellableContinuationImpl
	field _decision
	field delegate
	field resumeMode
	field submissionTime
	field context
kotlinx.coroutines.DispatchedContinuation
	field continuation

This leaves only the following *internal* entry points:

kotlinx.coroutines.debug.internal.DebugCoroutineInfo
	method getCreationStackTrace()
	method getState()
	method lastObservedStackTrace()
	field context
	field sequenceNumber
	field lastObservedFrame
	field lastObservedThread
kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl
	method getCreationStackTrace()
	method getContext()
	field lastObservedThread
	field _state
	field _lastObservedFrame
	field sequenceNumber
kotlinx.coroutines.debug.internal.DebugProbesImpl
	field INSTANCE
	method isInstalled$kotlinx_coroutines_debug()
	method isInstalled$kotlinx_coroutines_core()
	method enhanceStackTraceWithThreadDump()
	method dumpCoroutinesInfo()
	method dumpCoroutinesInfoAsJsonAndReferences()
	method enhanceStackTraceWithThreadDumpAsJson()
kotlinx.coroutines.debug.internal.DebugProbesImpl$CoroutineOwner
	field info
kotlinx.coroutines.CoroutineId
	field Key
	method getId()

... the following *public* entry points:

kotlinx.coroutines.CoroutineName
	field Key
	method getName()
kotlinx.coroutines.Job
	field Key
kotlinx.coroutines.CoroutineDispatcher
	field Key

... and these entry points outside of the library:

kotlin.coroutines.CombinedContext
	method get()
kotlin.coroutines.jvm.internal.DebugMetadataKt
	method getStackTraceElement()
	method getSpilledVariableFieldMapping()

This commit updates the comments and removes the extraneous
`@PublishedApi` annotations, giving us more flexibility to change
code.
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.

3 participants