Avoiding internal API usage


The current version of my plugin has an issue with the latest PyCharm release (2023.3):

java.lang.IllegalStateException: Should not be called
	at com.intellij.openapi.fileEditor.AsyncFileEditorProvider.createEditorAsync(AsyncFileEditorProvider.kt:20)
	at io.github.donkirkby.livepycharm.SplitFileEditorProvider.getBuilderFromEditorProvider(SplitFileEditorProvider.java:294)

I found similar issues in the AsciiDoc and mjml plugins, so I copied their solutions and published a patched version of my plugin. The patched version works, but it got rejected during review, because it breaks compatibility with any PyCharm older than 2023.3. (I can live with that.) However, it also complains that an internal API method CoroutinesKt.runBlockingMaybeCancellable(...) is invoked.

Is there any way for me to fix my original issue without calling this internal API? Will the internal API call block me from publishing the patched version if I reduce the compatible versions list to 2023.3 and above?

Thanks for your support.


Please sign in to leave a comment.