Skip to content

Conversation

rli
Copy link
Contributor

@rli rli commented Jun 12, 2025

we are inappropriately freezing EDT while passing workspace context to the LSP

#5811

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

we are inappropriately freezing EDT while passing workspace context to the LSP
@rli rli requested a review from a team as a code owner June 12, 2025 00:51
Copy link

github-actions bot commented Jun 12, 2025

Qodana Community for JVM

3 new problems were found

Inspection name Severity Problems
Unstable API Usage 🔶 Warning 2
Unused symbol 🔶 Warning 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

@andrewyuq andrewyuq requested a review from Copilot June 12, 2025 16:38
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

holder.languageServer
}
} catch (_: Exception) {
LOG.debug { "LSP not running" }
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: should this be an info with exception message?

@rli rli requested review from a team as code owners June 20, 2025 23:55
chatManager.getAllTabIds().forEach { tabId ->
AmazonQLspService.executeIfRunning(project) { server ->
rawEndpoint.notify(CHAT_TAB_REMOVE, mapOf("tabId" to tabId))
currentThreadCoroutineScope().launch {

Check warning

Code scanning / QDJVMC

Unstable API Usage Warning

'currentThreadCoroutineScope()' is declared in unstable 'com.intellij.openapi.progress.CoroutinesKt' marked with @ApiStatus.Experimental
}
AmazonQLspService.didChangeConfiguration(project)

currentThreadCoroutineScope().launch {

Check warning

Code scanning / QDJVMC

Unstable API Usage Warning

'currentThreadCoroutineScope()' is declared in unstable 'com.intellij.openapi.progress.CoroutinesKt' marked with @ApiStatus.Experimental
}
}

fun<T> syncExecuteIfRunning(runnable: suspend AmazonQLspService.(AmazonQLanguageServer) -> T): T? =

Check warning

Code scanning / QDJVMC

Unused symbol Warning

Function "syncExecuteIfRunning" is never used
rli added 3 commits June 23, 2025 17:51
 Conflicts:
	plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLanguageClientImpl.kt
@samgst-amazon samgst-amazon merged commit 9981133 into main Jun 25, 2025
14 of 16 checks passed
@samgst-amazon samgst-amazon deleted the rli/blocking-lsp-threads branch June 25, 2025 19:54
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