kotlin-language-server icon indicating copy to clipboard operation
kotlin-language-server copied to clipboard

Extra files added to class path during initialization

Open pajatopmr opened this issue 4 years ago • 0 comments

A question: when initializing KLS for a simple hello world project (~24 files, which is reasonable) I observe that 1508 extra files are being added in the notifications sent to the client. Are those files the content of dependent jar files perhaps?

{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"main Connected to client"}} 2021-02-05T05:04:57.058Z ServerNotification in routeValidMessage(): {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"client Adding workspace file:/Users/pmr/IdeaProjects/lsp4k-sdk/build/resources/test/sample-projects/kotlin-gradle/hello-world to source path"}} 2021-02-05T05:04:57.058Z ServerNotification in routeValidMessage(): {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"client Adding .../hello-world/build.gradle.kts, .../hello-world/settings.gradle.kts, .../kotlin/HelloWorldTest.kt, .../kotlin/HelloWorld.kt, .../kotlin/main.kt under /Users/pmr/IdeaProjects/lsp4k-sdk/build/resources/test/sample-projects/kotlin-gradle/hello-world to source path"}} 2021-02-05T05:04:57.058Z ServerNotification in routeValidMessage(): {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"client Searching for dependencies and Java sources in workspace root /Users/pmr/IdeaProjects/lsp4k-sdk/build/resources/test/sample-projects/kotlin-gradle/hello-world"}} 2021-02-05T05:04:57.058Z ServerNotification in routeValidMessage(): {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"client Resolving dependencies for \u0027hello-world\u0027 through Gradle\u0027s CLI using tasks [kotlinLSPProjectDeps]..."}} 2021-02-05T05:04:58.081Z ServerNotification in routeValidMessage(): {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"client Successfully resolved dependencies for \u0027hello-world\u0027 using Gradle"}} 2021-02-05T05:04:58.081Z ServerNotification in routeValidMessage(): {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"client Adding 24 files to class path"}} 2021-02-05T05:04:58.081Z ServerNotification in routeValidMessage(): {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"client Update build script path"}} 2021-02-05T05:04:58.081Z ServerNotification in routeValidMessage(): {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"client Resolving dependencies for \u0027hello-world\u0027 through Gradle\u0027s CLI using tasks [kotlinLSPKotlinDSLDeps]..."}} 2021-02-05T05:04:59.213Z ServerNotification in routeValidMessage(): {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":2,"message":"client Gradle task failed: \nFAILURE: Build failed with an exception.\n\n* Where:\nInitialization script \u0027/var/folders/y_/ww6srdkn14n8qxhyhhz4c3ch0000gn/T/classpath17278278930796242651.gradle\u0027 line: 15\n\n* What went wrong:\nExecution failed for task \u0027:kotlinLSPKotlinDSLDeps\u0027.\n\u003e No signature of method: static org.gradle.kotlin.dsl.accessors.AccessorsClassPathKt.projectAccessorsClassPath() is applicable for argument types: (org.gradle.api.internal.project.DefaultProject_Decorated, org.gradle.internal.classpath.DefaultClassPath) values: [root project \u0027hello-world\u0027, []]\n\n* Try:\nRun with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.\n\n* Get more help at https://help.gradle.org\n\nBUILD FAILED in 596ms"}} 2021-02-05T05:04:59.213Z ServerNotification in routeValidMessage(): {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"client Successfully resolved build script dependencies for \u0027hello-world\u0027 using Gradle"}} 2021-02-05T05:04:59.213Z ServerNotification in routeValidMessage(): {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"client Adding 1508 files to class path"}} 2021-02-05T05:04:59.214Z ServerNotification in routeValidMessage(): {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"client Reinstantiating compiler"}}

pajatopmr avatar Feb 05 '21 05:02 pajatopmr