Skip to content

Conversation

@rli
Copy link
Contributor

@rli rli commented Apr 30, 2025

This addresses multiple problems with the Flare dependency resolution:

  • Multiple projects starting will attempt to download the same artifact concurrently to the same location
  • If the user has never downloaded the LSP, they always get an error because we incorrectly assume that a file exists
  • Multiple projects can resolve different versions of the server/client

License

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

@rli rli requested review from a team as code owners April 30, 2025 10:10
@github-actions
Copy link

github-actions bot commented Apr 30, 2025

Qodana Community for JVM

2 new problems were found

Inspection name Severity Problems
Possibly blocking call in non-blocking context 🔶 Warning 1
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]


suspend fun tryDownloadLspArtifacts(project: Project, versions: List<ManifestManager.Version>, target: ManifestManager.VersionTarget?): Path? {
val temporaryDownloadPath = lspArtifactsPath.resolve("temp")
val temporaryDownloadPath = Files.createTempDirectory("lsp-dl")

Check warning

Code scanning / QDJVMC

Possibly blocking call in non-blocking context Warning

Possibly blocking call in non-blocking context could lead to thread starvation
This addresses multiple problems with the Flare dependency resolution:

* Multiple projects starting will attempt to download the same artifact concurrently to the same location
* If the user has never downloaded the LSP, they always get an error because we incorrectly assume that a file exists
* Multiple projects can resolve different versions of the server/client
@rli rli force-pushed the rli/dl-singleton branch from 8bc071d to 8b8b9a1 Compare April 30, 2025 14:19
rli added 2 commits May 1, 2025 18:11
 Conflicts:
	plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/toolwindow/AmazonQPanel.kt
) {
@Service
class ArtifactManager @NonInjectable internal constructor(private val manifestFetcher: ManifestFetcher, private val artifactHelper: ArtifactHelper) {
constructor() : this(

Check warning

Code scanning / QDJVMC

Unused symbol Warning

Constructor is never used
@rli rli merged commit 9abe243 into feature/q-lsp-chat May 2, 2025
14 of 16 checks passed
@rli rli deleted the rli/dl-singleton branch May 2, 2025 16: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