fwcd / kotlin-language-server

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

Despite best efforts a sea of red in vscode: MISSING_BUILT_IN_DECLARATION #554

Open cdiddy77 opened 8 months ago

cdiddy77 commented 8 months ago

to repro, clone this repo and open the directory in vscode:

https://github.com/ThibaultBee/StreamPack

Note: there is a gradle project. Note also: go to definition works.

Note: red squiggles everywhere, all with error messages that suffix: Ensure that you have a dependency on the Kotlin standard librarykotlin(MISSING_BUILT_IN_DECLARATION)

head of Kotlin logs:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Feb 02, 2024 9:30:06 AM org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint lambda$recursiveFindRpcMethods$2
SEVERE: A delegate object is null, jsonrpc methods of 'public default org.eclipse.lsp4j.services.NotebookDocumentService org.eclipse.lsp4j.services.LanguageServer.getNotebookDocumentService()' are ignored
[Info  - 9:30:06 AM] main      Kotlin Language Server: Version 1.3.9
[Error - 9:30:06 AM] main      A delegate object is null, jsonrpc methods of 'public default org.eclipse.lsp4j.services.NotebookDocumentService org.eclipse.lsp4j.services.LanguageServer.getNotebookDocumentService()' are ignored
[Info  - 9:30:06 AM] main      Connected to client
[Info  - 9:30:07 AM] async0    Database has the correct version 3 and will be used as-is
[Info  - 9:30:07 AM] async0    Adding workspace folder StreamPack
[Info  - 9:30:07 AM] async0    Searching /Users/charlesparker/slhd/StreamPack using exclusions: [.*, bazel-*, bin, build, node_modules, target, *.kts]
[Info  - 9:30:07 AM] async0    Adding 354 files under /Users/charlesparker/slhd/StreamPack to source path
[Info  - 9:30:07 AM] async0    Updated exclusions: [.*, bazel-*, bin, build, node_modules, target, *.kts]
[Info  - 9:30:07 AM] async0    Searching for dependencies and Java sources in workspace root /Users/charlesparker/slhd/StreamPack
[Info  - 9:30:07 AM] async0    Classpath has not changed. Fetching from cache
[Info  - 9:30:07 AM] async0    Adding 144 files to class path
[Info  - 9:30:07 AM] async0    Update build script path
[Info  - 9:30:07 AM] async0    Build script classpath has not changed. Fetching from cache
[Info  - 9:30:07 AM] async0    Adding [/Users/charlesparker/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.22/2ad14aed781c4a73ed4dbb421966d408a0a06686/kotlin-stdlib-1.9.22-javadoc.jar] to build script class path
[Info  - 9:30:07 AM] async0    Reinstantiating compiler
[Info  - 9:30:07 AM] client    Updated exclusions: [.*, bazel-*, bin, build, node_modules, target, *.kts]
[Info  - 9:30:07 AM] client    Updated configuration: {"kotlin":{"java":{"home":"/Applications/Android Studio.app/Contents/jbr/Contents/Home","opts":""},"languageServer":{"enabled":true,"path":"","transport":"stdio","port":0,"debugAttach":{"enabled":false,"port":5005,"autoSuspend":false}},"trace":{"server":"off"},"compiler":{"jvm":{"target":"default"}},"diagnostics":{"enabled":true,"level":"hint","debounceTime":250},"linting":{"debounceTime":250},"scripts":{"enabled":false,"buildScriptsEnabled":false},"indexing":{"enabled":true},"completion":{"snippets":{"enabled":true}},"debugAdapter":{"enabled":true,"path":""},"debounceTime":250,"externalSources":{"useKlsScheme":true,"autoConvertToKotlin":false},"snippetsEnabled":true,"inlayHints":{"typeHints":false,"parameterHints":false,"chainedHints":false}}}
[Info  - 9:30:09 AM] async4    Updating symbol index...
[Info  - 9:30:09 AM] async4    Updated symbol index in 7 ms! (1 symbol(s))
[Info  - 9:30:10 AM] async4    Updating symbol index...
[Info  - 9:30:10 AM] async4    Updated symbol index in 1 ms! (3 symbol(s))
[Info  - 9:30:10 AM] async4    Updating symbol index...
[Info  - 9:30:10 AM] async4    Updated symbol index in 0 ms! (5 symbol(s))
[Info  - 9:30:10 AM] async3    Ranged semantic tokens in .../encoders/VideoMediaCodecEncoder.kt
[Info  - 9:30:10 AM] async3    Found 595 tokens
[Info  - 9:30:10 AM] async3    Finished in 26 ms
[Info  - 9:30:10 AM] async3    Find symbols in .../encoders/VideoMediaCodecEncoder.kt
[Info  - 9:30:10 AM] async3    Finished in 2 ms
[Info  - 9:30:10 AM] async3    Full semantic tokens in .../encoders/VideoMediaCodecEncoder.kt
[Info  - 9:30:10 AM] async4    Updating symbol index...
[Info  - 9:30:10 AM] async4    Updated symbol index in 0 ms! (7 symbol(s))
[Info  - 9:30:10 AM] async3    Found 1785 tokens
...
curtishd commented 8 months ago

I also have such issue