fwcd / kotlin-language-server

Kotlin code completion, diagnostics and more for any editor/IDE using the Language Server Protocol
MIT License
1.65k stars 209 forks source link

Access Denied on Windows, folder or file locked #158

Open llgcode opened 5 years ago

llgcode commented 5 years ago

Hi, some folders are locked by the kotlin language server, so windows explorer or any process raise an "Access denied" when access to this folder. I've open Process Explorer and found that process "C:\Program Files\Java\jdk1.8.0_112/bin/java.exe" -classpath "****" org.javacs.kt.MainKt lock a folder where java classes are generated by a javac. I precise that this vscode workspace doesn't contain any kotlin file or kotlin config. when killing the process, it works perfectly. I have deactivated kotlin extension to fix the issue, I use it only to edit teamcity kotlin settings.

this problem has occurred recently (maybe an extension update in vscode). regards

BrenekH commented 5 years ago

I also am having issues with some folders being locked by this project. For me, the build/tmp folder in my repository is being locked up such that my gradle script that extracts libraries in that directory fails.

msoucy commented 4 years ago

Issue still exists as of v0.6.0.

This issue prevents running a gradle build separately. For some use cases this is necessary, as gradle tasks are used for deploying, testing, etc.

I know nothing about how the language server works, but is this related to the Gradle daemon?

msoucy commented 4 years ago

Update, still with v0.6.0 - this issue seems to have vanished. To fix it:

llgcode commented 4 years ago

I will give it a try

LeadAssimilator commented 6 months ago

Still happening. Both classes.jar and R.jar are being left open. Forcing a GC.run doesn't cause them to close either.