clangd / vscode-clangd

Visual Studio Code extension for clangd
https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd
MIT License
630 stars 109 forks source link

Folder names containing spaces not picking up compile_commands.json (probably) #702

Open stijnfrishert opened 4 days ago

stijnfrishert commented 4 days ago

In our codebase (at work) we have a folder that contains spaces. When working on files in said folder, I have problems with clangd showing incorrect inlay hints. The code compiles just fine.

All incorrect errors have to do with c++ versioning. Our codebase is at c++20, the hints are about the <concepts> header missing, or std::unordered_map::contains not existing. Both are c++20 additions.

We are using CMake, so I'm guessing the issue is with the compile_commands.json not getting picked up correctly for folders containing whitespace.

Most importantly, when I remove the whitespace the problem disappears.

Other colleagues working with CLion don't seem to have the issue, which leads me to believe it's not an apple clang problem.

Logs The following shows up in the log for the file I've been testing:

I[16:07:24.166] Indexed /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp (11183 symbols, 140384 refs, 1130 files)
I[16:07:24.166] Failed to compile /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp, index may be incomplete

System information Clangd version (clangd --version): Apple clangd version 16.0.0 Clangd version in Output log: clangd version 18.1.3 (https://github.com/llvm/llvm-project c13b7485b87909fcf739f62cfa382b55407433c0) clangd extension version: v0.1.29 Operating system: macOS Sonoma 14.6.1

HighCommander4 commented 3 days ago

Can you post a complete set of logs (from clangd startup, up to and including you seeing an unexpected diagnostic in a file you open), taken with --log=verbose?

stijnfrishert commented 2 days ago

Here it is, @HighCommander4

I[12:57:06.903] clangd version 18.1.3 (https://github.com/llvm/llvm-project c13b7485b87909fcf739f62cfa382b55407433c0)
I[12:57:06.904] Features: mac+grpc+xpc
I[12:57:06.904] PID: 23413
I[12:57:06.904] Working directory: /Users/stijn/Development/resolume/resolume_c
I[12:57:06.904] argv[0]: /Users/stijn/Library/Application Support/Code/User/globalStorage/llvm-vs-code-extensions.vscode-clangd/install/18.1.3/clangd_18.1.3/bin/clangd
I[12:57:06.904] argv[1]: -header-insertion=never
I[12:57:06.904] argv[2]: --log=verbose
V[12:57:06.904] User config file is /Users/stijn/Library/Preferences/clangd/config.yaml
I[12:57:06.904] Starting LSP over stdin/stdout
V[12:57:06.905] <<< {"id":0,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"general":{"markdown":{"parser":"marked","version":"1.1.0"},"positionEncodings":["utf-16"],"regularExpressions":{"engine":"ECMAScript","version":"ES2020"},"staleRequestSupport":{"cancel":true,"retryOnContentModified":["textDocument/semanticTokens/full","textDocument/semanticTokens/range","textDocument/semanticTokens/full/delta"]}},"notebookDocument":{"synchronization":{"dynamicRegistration":true,"executionSummarySupport":true}},"textDocument":{"callHierarchy":{"dynamicRegistration":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dataSupport":true,"disabledSupport":true,"dynamicRegistration":true,"honorsChangeAnnotations":false,"isPreferredSupport":true,"resolveSupport":{"properties":["edit"]}},"codeLens":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"completion":{"completionItem":{"commitCharactersSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"insertReplaceSupport":true,"insertTextModeSupport":{"valueSet":[1,2]},"labelDetailsSupport":true,"preselectSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"completionList":{"itemDefaults":["commitCharacters","editRange","insertTextFormat","insertTextMode"]},"contextSupport":true,"dynamicRegistration":true,"editsNearCursor":true,"insertTextMode":2},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"diagnostic":{"dynamicRegistration":true,"relatedDocumentSupport":false},"documentHighlight":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"documentSymbol":{"dynamicRegistration":true,"hierarchicalDocumentSymbolSupport":true,"labelSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"foldingRange":{"dynamicRegistration":true,"foldingRange":{"collapsedText":false},"foldingRangeKind":{"valueSet":["comment","imports","region"]},"lineFoldingOnly":true,"rangeLimit":5000},"formatting":{"dynamicRegistration":true},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"inactiveRegionsCapabilities":{"inactiveRegions":true},"inlayHint":{"dynamicRegistration":true,"resolveSupport":{"properties":["tooltip","textEdits","label.tooltip","label.location","label.command"]}},"inlineValue":{"dynamicRegistration":true},"linkedEditingRange":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"publishDiagnostics":{"codeDescriptionSupport":true,"dataSupport":true,"relatedInformation":true,"tagSupport":{"valueSet":[1,2]},"versionSupport":false},"rangeFormatting":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"honorsChangeAnnotations":true,"prepareSupport":true,"prepareSupportDefaultBehavior":1},"selectionRange":{"dynamicRegistration":true},"semanticTokens":{"augmentsSyntaxTokens":true,"dynamicRegistration":true,"formats":["relative"],"multilineTokenSupport":false,"overlappingTokenSupport":false,"requests":{"full":{"delta":true},"range":true},"serverCancelSupport":true,"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator","decorator"]},"signatureHelp":{"contextSupport":true,"dynamicRegistration":true,"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"typeHierarchy":{"dynamicRegistration":true}},"window":{"showDocument":{"support":true},"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"workDoneProgress":true},"workspace":{"applyEdit":true,"codeLens":{"refreshSupport":true},"configuration":true,"diagnostics":{"refreshSupport":true},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true,"relativePatternSupport":true},"executeCommand":{"dynamicRegistration":true},"fileOperations":{"didCreate":true,"didDelete":true,"didRename":true,"dynamicRegistration":true,"willCreate":true,"willDelete":true,"willRename":true},"inlayHint":{"refreshSupport":true},"inlineValue":{"refreshSupport":true},"semanticTokens":{"refreshSupport":true},"symbol":{"dynamicRegistration":true,"resolveSupport":{"properties":["location.range"]},"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"workspaceEdit":{"changeAnnotationSupport":{"groupsOnLabel":true},"documentChanges":true,"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"Visual Studio Code","version":"1.94.2"},"initializationOptions":{"clangdFileStatus":true,"fallbackFlags":[]},"locale":"en-gb","processId":22137,"rootPath":"/Users/stijn/Development/resolume/resolume_c","rootUri":"file:///Users/stijn/Development/resolume/resolume_c","trace":"off","workspaceFolders":[{"name":"resolume_c","uri":"file:///Users/stijn/Development/resolume/resolume_c"}]}}

I[12:57:06.905] <-- initialize(0)
V[12:57:06.906] Invoking /usr/bin/xcrun to find clang installation
V[12:57:06.933] Invoking /usr/bin/xcrun to find clang installation
I[12:57:06.962] --> reply:initialize(0) 56 ms
V[12:57:06.962] >>> {"id":0,"jsonrpc":"2.0","result":{"capabilities":{"astProvider":true,"callHierarchyProvider":true,"clangdInlayHintsProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor","info"]},"compilationDatabase":{"automaticReload":true},"completionProvider":{"resolveProvider":false,"triggerCharacters":[".","<",">",":","\"","/","*"]},"declarationProvider":true,"definitionProvider":true,"documentFormattingProvider":true,"documentHighlightProvider":true,"documentLinkProvider":{"resolveProvider":false},"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"\n","moreTriggerCharacter":[]},"documentRangeFormattingProvider":true,"documentSymbolProvider":true,"executeCommandProvider":{"commands":["clangd.applyFix","clangd.applyTweak"]},"foldingRangeProvider":true,"hoverProvider":true,"implementationProvider":true,"inactiveRegionsProvider":true,"inlayHintProvider":true,"memoryUsageProvider":true,"referencesProvider":true,"renameProvider":{"prepareProvider":true},"selectionRangeProvider":true,"semanticTokensProvider":{"full":{"delta":true},"legend":{"tokenModifiers":["declaration","definition","deprecated","deduced","readonly","static","abstract","virtual","dependentName","defaultLibrary","usedAsMutableReference","usedAsMutablePointer","constructorOrDestructor","userDefined","functionScope","classScope","fileScope","globalScope"],"tokenTypes":["variable","variable","parameter","function","method","function","property","variable","class","interface","enum","enumMember","type","type","unknown","namespace","typeParameter","concept","type","macro","modifier","operator","bracket","label","comment"]},"range":false},"signatureHelpProvider":{"triggerCharacters":["(",")","{","}","<",">",","]},"standardTypeHierarchyProvider":true,"textDocumentSync":{"change":2,"openClose":true,"save":true},"typeDefinitionProvider":true,"typeHierarchyProvider":true,"workspaceSymbolProvider":true},"serverInfo":{"name":"clangd","version":"clangd version 18.1.3 (https://github.com/llvm/llvm-project c13b7485b87909fcf739f62cfa382b55407433c0) mac+grpc+xpc x86_64-apple-darwin23.6.0"}}}

V[12:57:06.965] <<< {"jsonrpc":"2.0","method":"initialized","params":{}}

I[12:57:06.965] <-- initialized
V[12:57:06.978] <<< {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"cpp","text":"#include \"file_timestamp_watcher.hpp\"\n\n#include <cassert>\n#include <filesystem>\n\n#include <core/threading/RAThread.h>\n\nnamespace ra {\n\n\tFileTimestampWatcher::~FileTimestampWatcher()\n\t{\n\t\tstopWatching();\n\t}\n\n\tra::UniqueID FileTimestampWatcher::watchFile(const std::filesystem::path& path, std::function<void(bool)> onChange)\n\t{\n\t\tstd::lock_guard<std::mutex> lock(mutex);\n\n\t\tif (entries.empty())\n\t\t\tstartWatching();\n\n\t\tconst ra::UniqueID id = ra::generateUniqueID();\n\t\tif (auto it = entries.find(path); it != entries.end())\n\t\t{\n\t\t\tit->second.callbacks.emplace(id, std::move(onChange));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tEntry entry;\n\t\t\tentry.callbacks.emplace(id, std::move(onChange));\n\n\t\t\tif (std::filesystem::exists(path))\n\t\t\t\tentry.timestamp = std::filesystem::last_write_time(path);\n\t\t\telse\n\t\t\t\tentry.timestamp = std::nullopt;\n\n\t\t\tentries.emplace(path, std::move(entry));\n\t\t}\n\n\t\treturn id;\n\t}\n\n\tvoid FileTimestampWatcher::unwatchFile(const ra::UniqueID& id)\n\t{\n\t\tstd::lock_guard<std::mutex> lock(mutex);\n\n\t\tfor (auto& [path, entry] : entries)\n\t\t{\n\t\t\tif (entry.callbacks.erase(id) > 0)\n\t\t\t{\n\t\t\t\tif (entry.callbacks.empty())\n\t\t\t\t\tentries.erase(path);\n\n\t\t\t\tif (entries.empty())\n\t\t\t\t\tstopWatching();\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tvoid FileTimestampWatcher::unwatchFileAll(const std::filesystem::path& path)\n\t{\n\t\tstd::lock_guard<std::mutex> lock(mutex);\n\n\t\tif (auto it = entries.find(path); it != entries.end())\n\t\t\tentries.erase(it);\n\n\t\tif (entries.empty())\n\t\t\tstopWatching();\n\t}\n\n\tvoid FileTimestampWatcher::startWatching()\n\t{\n\t\tassert(!isWatching());\n\n\t\trunning = true;\n\t\tthread = std::thread(&FileTimestampWatcher::run, this);\n\t}\n\n\tvoid FileTimestampWatcher::stopWatching()\n\t{\n\t\tif (!running)\n\t\t\treturn;\n\n\t\trunning = false;\n\t\tif (thread.joinable())\n\t\t\tthread.join();\n\t}\n\n\tbool FileTimestampWatcher::isWatching() const\n\t{\n\t\treturn running;\n\t}\n\n\tbool FileTimestampWatcher::isWatchingFile(const std::filesystem::path& path) const\n\t{\n\t\treturn entries.contains(path);\n\t}\n\n\tvoid FileTimestampWatcher::run()\n\t{\n\t\t//        setThreadName(\"FileTimestampWatcher\");\n\n\t\twhile (running)\n\t\t{\n\t\t\tscanTimestamps();\n\t\t\tra::Thread::sleep(static_cast<int>(intervalInSeconds * 1000));\n\t\t}\n\t}\n\n\tvoid FileTimestampWatcher::scanTimestamps()\n\t{\n\t\tstd::lock_guard<std::mutex> lock(mutex);\n\n\t\tfor (auto& [path, entry] : entries)\n\t\t{\n\t\t\tif (std::filesystem::exists(path))\n\t\t\t{\n\t\t\t\tconst auto currentTimestamp = std::filesystem::last_write_time(path);\n\t\t\t\tif (currentTimestamp != entry.timestamp)\n\t\t\t\t{\n\t\t\t\t\tentry.timestamp = currentTimestamp;\n\t\t\t\t\tfor (auto& [_, callback] : entry.callbacks)\n\t\t\t\t\t\tcallback(true);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (entry.timestamp)\n\t\t\t{\n\t\t\t\tentry.timestamp.reset();\n\t\t\t\tfor (auto& [_, callback] : entry.callbacks)\n\t\t\t\t\tcallback(false);\n\t\t\t}\n\t\t}\n\t}\n}   // namespace ra\n","uri":"file:///Users/stijn/Development/resolume/resolume_c/resolume%20resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp","version":1}}}

I[12:57:06.978] <-- textDocument/didOpen
V[12:57:07.046] <<< {"id":1,"jsonrpc":"2.0","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///Users/stijn/Development/resolume/resolume_c/resolume%20resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp"}}}

I[12:57:07.046] <-- textDocument/documentSymbol(1)
V[12:57:07.108] <<< {"id":2,"jsonrpc":"2.0","method":"textDocument/documentLink","params":{"textDocument":{"uri":"file:///Users/stijn/Development/resolume/resolume_c/resolume%20resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp"}}}

I[12:57:07.108] <-- textDocument/documentLink(2)
I[12:57:07.110] Loaded compilation database from /Users/stijn/Development/resolume/resolume_c/build/compile_commands.json
V[12:57:07.111] Broadcasting compilation database from /Users/stijn/Development/resolume/resolume_c
V[12:57:07.111] <<< {"id":3,"jsonrpc":"2.0","method":"textDocument/inlayHint","params":{"range":{"end":{"character":0,"line":89},"start":{"character":0,"line":0}},"textDocument":{"uri":"file:///Users/stijn/Development/resolume/resolume_c/resolume%20resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp"}}}

I[12:57:07.111] <-- textDocument/inlayHint(3)
I[12:57:07.111] ASTWorker building file /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp version 1 with command 
[/Users/stijn/Development/resolume/resolume_c/build]
/usr/bin/clang++ --driver-mode=g++ -DAJAMac -DAJASTATIC -DAJA_DEBUG -DAJA_MAC -DAJA_USE_CPLUSPLUS11 "-DCOPYRIGHT_YEAR_END=\"2024\"" -DDEBUG -DDONT_SET_USING_JUCE_NAMESPACE=1 -DGLEW_STATIC=1 -DGL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED -DGL_SILENCE_DEPRECATION -DMEVI_MAX_SUBMISSIONS_PER_BATCH=64 -DMEVI_VI_USE_MANUAL_ALLOCATION=1 -DMEVI_VULKAN_VALIDATION_DISABLED=1 -DNTV2_PREVENT_PLUGIN_LOAD -DNTV2_USE_CPLUSPLUS11 -DTINYXML2_DEBUG -DUNICODE -DWIRE_VERSION_LATEST_AVAILABLE -D_UNICODE "-I/Users/stijn/Development/resolume/resolume_c/build/resolume resapi/resapi/generated" "-I/Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source" -I/Users/stijn/Development/resolume/resolume_c/libs/magma/mevi-gfx/libs/qusdk/api/Include -I/Users/stijn/Development/resolume/resolume_c/libs/stb_dxt -I/Users/stijn/Development/resolume/resolume_c/libs/libjpeg-turbo/include -I/Users/stijn/Development/resolume/resolume_c/libs/libtiff/tiff-4.0.3/libtiff -I/Users/stijn/Development/resolume/resolume_c/libs/snappy-1.1.0 -I/Users/stijn/Development/resolume/resolume_c/libs/dxtr -I/Users/stijn/Development/resolume/resolume_c/libs/lz4 -I/Users/stijn/Development/resolume/resolume_c/libs/lzf -I/Users/stijn/Development/resolume/resolume_c/libs/ycocg -I/Users/stijn/Development/resolume/resolume_c/libs/bmd -I/Users/stijn/Development/resolume/resolume_c/libs/oscpack_1_1_0/osc -I/Users/stijn/Development/resolume/resolume_c/libs/stb_image -I/Users/stijn/Development/resolume/resolume_c/libs/resolume-pnglib -I/Users/stijn/Development/resolume/resolume_c/libs/resolume-zlib -I/Users/stijn/Development/resolume/resolume_c/libs/uvm/v2 -I/Users/stijn/Development/resolume/resolume_c/libs/magma/mevi-gfx/libs/moodycamel-1.0.3 -I/Users/stijn/Development/resolume/resolume_c/libs/wire-sdk/include -I/Users/stijn/Development/resolume/resolume_c/libs/webapi/include -I/Users/stijn/Development/resolume/resolume_c/libs/webapi/cpprouter/include -I/Users/stijn/Development/resolume/resolume_c/libs/magma/mevi-gfx/mevi-core -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks -isystem /Users/stijn/Development/resolume/resolume_c/build/vcpkg_installed/x64-osx/include -isystem /Users/stijn/Development/resolume/resolume_c/libs/rapidxml-1.13 -isystem /Users/stijn/Development/resolume/resolume_c/libs/exprtk -isystem /Users/stijn/Development/resolume/resolume_c/build/vcpkg_installed/x64-osx/include/libajantv2 -isystem /Users/stijn/Development/resolume/resolume_c/build/vcpkg_installed/x64-osx/include/libajantv2/ajantv2/includes -isystem /Users/stijn/Development/resolume/resolume_c/build/vcpkg_installed/x64-osx/include/libajantv2/ajantv2/src/mac -isystem /Users/stijn/Development/resolume/resolume_c/build/vcpkg_installed/x64-osx/share/rapidjson/../../include -isystem /Users/stijn/Development/resolume/resolume_c/libs/magic/include -faligned-allocation -ffp-contract=off -fbracket-depth=512 -Wall -Werror -Wsuggest-override -Wno-overloaded-virtual -Wno-switch -Wno-format-security -Wno-objc-missing-super-calls -Wno-literal-conversion -Wno-shorten-64-to-32 -Wno-delete-non-abstract-non-virtual-dtor -Wno-unused-variable -Wno-error=implicit-const-int-float-conversion -Wno-error=deprecated-anon-enum-enum-conversion -Wno-error=missing-declarations -Wno-error=macro-redefined -Wno-error=availability -Wno-error=unguarded-availability-new -Wno-error=deprecated-declarations -Wno-error=shorten-64-to-32 -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk -mmacosx-version-min=10.15 -fvisibility=hidden -fvisibility-inlines-hidden -c "-resource-dir=/Users/stijn/Library/Application Support/Code/User/globalStorage/llvm-vs-code-extensions.vscode-clangd/install/18.1.3/clangd_18.1.3/lib/clang/18" -- "/Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp"
V[12:57:07.114] Driver produced command: cc1 -cc1 -triple x86_64-apple-macosx10.15.0 -Wundef-prefix=TARGET_OS_ -Werror=undef-prefix -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -fsyntax-only -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name file_timestamp_watcher.cpp -mrelocation-model pic -pic-level 2 -mframe-pointer=all -ffp-contract=off -fno-rounding-math -funwind-tables=2 -target-sdk-version=15.0 -fcompatibility-qualified-id-block-type-checking -fvisibility-inlines-hidden-static-local-var -fbuiltin-headers-in-system-modules -fdefine-target-os-macros -target-cpu penryn -tune-cpu generic -debug-info-kind=standalone -dwarf-version=4 -debugger-tuning=lldb -fdebug-compilation-dir=/Users/stijn/Development/resolume/resolume_c/build -target-linker-version 820.1 -fcoverage-compilation-dir=/Users/stijn/Development/resolume/resolume_c/build -resource-dir "/Users/stijn/Library/Application Support/Code/User/globalStorage/llvm-vs-code-extensions.vscode-clangd/install/18.1.3/clangd_18.1.3/lib/clang/18" -isystem /Users/stijn/Development/resolume/resolume_c/build/vcpkg_installed/x64-osx/include -isystem /Users/stijn/Development/resolume/resolume_c/libs/rapidxml-1.13 -isystem /Users/stijn/Development/resolume/resolume_c/libs/exprtk -isystem /Users/stijn/Development/resolume/resolume_c/build/vcpkg_installed/x64-osx/include/libajantv2 -isystem /Users/stijn/Development/resolume/resolume_c/build/vcpkg_installed/x64-osx/include/libajantv2/ajantv2/includes -isystem /Users/stijn/Development/resolume/resolume_c/build/vcpkg_installed/x64-osx/include/libajantv2/ajantv2/src/mac -isystem /Users/stijn/Development/resolume/resolume_c/build/vcpkg_installed/x64-osx/share/rapidjson/../../include -isystem /Users/stijn/Development/resolume/resolume_c/libs/magic/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk -D AJAMac -D AJASTATIC -D AJA_DEBUG -D AJA_MAC -D AJA_USE_CPLUSPLUS11 -D "COPYRIGHT_YEAR_END=\"2024\"" -D DEBUG -D DONT_SET_USING_JUCE_NAMESPACE=1 -D GLEW_STATIC=1 -D GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED -D GL_SILENCE_DEPRECATION -D MEVI_MAX_SUBMISSIONS_PER_BATCH=64 -D MEVI_VI_USE_MANUAL_ALLOCATION=1 -D MEVI_VULKAN_VALIDATION_DISABLED=1 -D NTV2_PREVENT_PLUGIN_LOAD -D NTV2_USE_CPLUSPLUS11 -D TINYXML2_DEBUG -D UNICODE -D WIRE_VERSION_LATEST_AVAILABLE -D _UNICODE -I "/Users/stijn/Development/resolume/resolume_c/build/resolume resapi/resapi/generated" -I "/Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source" -I /Users/stijn/Development/resolume/resolume_c/libs/magma/mevi-gfx/libs/qusdk/api/Include -I /Users/stijn/Development/resolume/resolume_c/libs/stb_dxt -I /Users/stijn/Development/resolume/resolume_c/libs/libjpeg-turbo/include -I /Users/stijn/Development/resolume/resolume_c/libs/libtiff/tiff-4.0.3/libtiff -I /Users/stijn/Development/resolume/resolume_c/libs/snappy-1.1.0 -I /Users/stijn/Development/resolume/resolume_c/libs/dxtr -I /Users/stijn/Development/resolume/resolume_c/libs/lz4 -I /Users/stijn/Development/resolume/resolume_c/libs/lzf -I /Users/stijn/Development/resolume/resolume_c/libs/ycocg -I /Users/stijn/Development/resolume/resolume_c/libs/bmd -I /Users/stijn/Development/resolume/resolume_c/libs/oscpack_1_1_0/osc -I /Users/stijn/Development/resolume/resolume_c/libs/stb_image -I /Users/stijn/Development/resolume/resolume_c/libs/resolume-pnglib -I /Users/stijn/Development/resolume/resolume_c/libs/resolume-zlib -I /Users/stijn/Development/resolume/resolume_c/libs/uvm/v2 -I /Users/stijn/Development/resolume/resolume_c/libs/magma/mevi-gfx/libs/moodycamel-1.0.3 -I /Users/stijn/Development/resolume/resolume_c/libs/wire-sdk/include -I /Users/stijn/Development/resolume/resolume_c/libs/webapi/include -I /Users/stijn/Development/resolume/resolume_c/libs/webapi/cpprouter/include -I /Users/stijn/Development/resolume/resolume_c/libs/magma/mevi-gfx/mevi-core -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks -internal-isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/c++/v1 -internal-isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/local/include -internal-isystem "/Users/stijn/Library/Application Support/Code/User/globalStorage/llvm-vs-code-extensions.vscode-clangd/install/18.1.3/clangd_18.1.3/lib/clang/18/include" -internal-externc-isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include -Wall -Werror -Wsuggest-override -Wno-overloaded-virtual -Wno-switch -Wno-format-security -Wno-objc-missing-super-calls -Wno-literal-conversion -Wno-shorten-64-to-32 -Wno-delete-non-abstract-non-virtual-dtor -Wno-unused-variable -Wno-error=implicit-const-int-float-conversion -Wno-error=deprecated-anon-enum-enum-conversion -Wno-error=missing-declarations -Wno-error=macro-redefined -Wno-error=availability -Wno-error=unguarded-availability-new -Wno-error=deprecated-declarations -Wno-error=shorten-64-to-32 -fdeprecated-macro -fbracket-depth 512 -ferror-limit 19 -fvisibility=hidden -fvisibility-inlines-hidden -stack-protector 1 -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -faligned-allocation -fmax-type-align=16 -no-round-trip-args -D__GCC_HAVE_DWARF2_CFI_ASM=1 -x c++ "/Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp"
I[12:57:07.114] --> textDocument/clangd.fileStatus
V[12:57:07.114] >>> {"jsonrpc":"2.0","method":"textDocument/clangd.fileStatus","params":{"state":"parsing includes, running Update","uri":"file:///Users/stijn/Development/resolume/resolume_c/resolume%20resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp"}}

V[12:57:07.114] Building first preamble for /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp version 1
V[12:57:07.248] <<< {"id":4,"jsonrpc":"2.0","method":"textDocument/foldingRange","params":{"textDocument":{"uri":"file:///Users/stijn/Development/resolume/resolume_c/resolume%20resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp"}}}

I[12:57:07.248] <-- textDocument/foldingRange(4)
I[12:57:07.249] --> reply:textDocument/foldingRange(4) 0 ms
V[12:57:07.249] >>> {"id":4,"jsonrpc":"2.0","result":[{"endLine":134,"kind":"region","startCharacter":14,"startLine":7},{"endCharacter":1,"endLine":11,"kind":"region","startCharacter":2,"startLine":10},{"endCharacter":1,"endLine":39,"kind":"region","startCharacter":2,"startLine":15},{"endCharacter":2,"endLine":24,"kind":"region","startCharacter":3,"startLine":23},{"endCharacter":2,"endLine":36,"kind":"region","startCharacter":3,"startLine":27},{"endCharacter":1,"endLine":58,"kind":"region","startCharacter":2,"startLine":43},{"endCharacter":2,"endLine":57,"kind":"region","startCharacter":3,"startLine":47},{"endCharacter":3,"endLine":56,"kind":"region","startCharacter":4,"startLine":49},{"endCharacter":1,"endLine":69,"kind":"region","startCharacter":2,"startLine":62},{"endCharacter":1,"endLine":77,"kind":"region","startCharacter":2,"startLine":73},{"endCharacter":1,"endLine":87,"kind":"region","startCharacter":2,"startLine":81},{"endCharacter":1,"endLine":92,"kind":"region","startCharacter":2,"startLine":91},{"endCharacter":1,"endLine":97,"kind":"region","startCharacter":2,"startLine":96},{"endCharacter":1,"endLine":108,"kind":"region","startCharacter":2,"startLine":101},{"endCharacter":2,"endLine":107,"kind":"region","startCharacter":3,"startLine":105},{"endCharacter":1,"endLine":133,"kind":"region","startCharacter":2,"startLine":112},{"endCharacter":2,"endLine":132,"kind":"region","startCharacter":3,"startLine":116},{"endCharacter":3,"endLine":125,"kind":"region","startCharacter":4,"startLine":118},{"endCharacter":4,"endLine":124,"kind":"region","startCharacter":5,"startLine":121},{"endCharacter":3,"endLine":131,"kind":"region","startCharacter":4,"startLine":128}]}

V[12:57:07.270] <<< {"id":5,"jsonrpc":"2.0","method":"textDocument/codeAction","params":{"context":{"diagnostics":[],"triggerKind":2},"range":{"end":{"character":21,"line":3},"start":{"character":21,"line":3}},"textDocument":{"uri":"file:///Users/stijn/Development/resolume/resolume_c/resolume%20resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp"}}}

I[12:57:07.270] <-- textDocument/codeAction(5)
I[12:57:07.366] Loaded compilation database from /Users/stijn/Development/resolume/resolume_c/build/compile_commands.json
I[12:57:07.481] --> window/workDoneProgress/create(0)
V[12:57:07.481] >>> {"id":0,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}

I[12:57:07.482] Enqueueing 4260 commands for indexing
V[12:57:07.484] <<< {"id":0,"jsonrpc":"2.0","result":null}

I[12:57:07.484] <-- reply(0)
I[12:57:07.484] --> $/progress
V[12:57:07.484] >>> {"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}

I[12:57:07.484] --> $/progress
V[12:57:07.484] >>> {"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}

V[12:57:07.603] <<< {"id":6,"jsonrpc":"2.0","method":"textDocument/semanticTokens/full","params":{"textDocument":{"uri":"file:///Users/stijn/Development/resolume/resolume_c/resolume%20resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp"}}}

I[12:57:07.603] <-- textDocument/semanticTokens/full(6)
V[12:57:09.155] Dropped diagnostic: /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp: in included file: expected '(' for function-style cast or type construction
V[12:57:09.155] Dropped diagnostic: /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp: in included file: use of undeclared identifier 'stream'; did you mean 'strcat'?
V[12:57:09.167] Dropped diagnostic: /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp: in included file: 'T' does not refer to a value
V[12:57:09.178] Dropped diagnostic: /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp: in included file: unknown type name 'Streamable'
V[12:57:09.178] Dropped diagnostic: /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp: in included file: unknown type name 'Args'
V[12:57:09.191] Dropped diagnostic: /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp: in included file: type 'const int &' of function parameter pack does not contain any unexpanded parameter packs
V[12:57:09.191] Dropped diagnostic: /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp: in included file: unknown type name 'Streamable'
V[12:57:09.191] Dropped diagnostic: /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp: in included file: variable has incomplete type 'void'
V[12:57:09.191] Dropped diagnostic: /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp: in included file: expected ')'
V[12:57:09.191] Dropped diagnostic: /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp: in included file: expected ';' at end of declaration
V[12:57:09.878] Dropped diagnostic: /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp: in included file: expected unqualified-id
I[12:57:09.886] Built preamble of size 14343704 for file /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp version 1 in 2.77 seconds
I[12:57:09.887] Indexing c++17 standard library in the context of /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp
I[12:57:09.887] --> workspace/semanticTokens/refresh(1)
V[12:57:09.887] >>> {"id":1,"jsonrpc":"2.0","method":"workspace/semanticTokens/refresh","params":null}

V[12:57:09.888] <<< {"id":1,"jsonrpc":"2.0","result":null}

I[12:57:09.888] <-- reply(1)
V[12:57:10.002] indexed file AST for /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp version 1:
  symbol slab: 11 symbols, 6768 bytes
  ref slab: 52 symbols, 122 refs, 5760 bytes
  relations slab: 0 relations, 24 bytes
V[12:57:10.002] Build dynamic index for main-file symbols with estimated memory usage of 23080 bytes
I[12:57:10.003] --> textDocument/publishDiagnostics
V[12:57:10.003] >>> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"no_member","message":"In included file: no member named 'file_clock' in namespace 'std::chrono'","range":{"end":{"character":37,"line":0},"start":{"character":9,"line":0}},"relatedInformation":[{"location":{"range":{"end":{"character":64,"line":44},"start":{"character":54,"line":44}},"uri":"file:///Users/stijn/Development/resolume/resolume_c/resolume%20resapi/resapi/source/core/filewatcher/file_timestamp_watcher.hpp"},"message":"Error occurred here"}],"severity":1,"source":"clang"},{"code":"unknown_typename","message":"In included file: unknown type name 'concept'","range":{"end":{"character":10,"line":5},"start":{"character":9,"line":5}},"relatedInformation":[{"location":{"range":{"end":{"character":8,"line":9},"start":{"character":1,"line":9}},"uri":"file:///Users/stijn/Development/resolume/resolume_c/resolume%20resapi/resapi/source/core/RALogger.h"},"message":"Error occurred here"}],"severity":1,"source":"clang"},{"code":"no_member","message":"No member named 'contains' in 'std::map<std::filesystem::path, ra::FileTimestampWatcher::Entry>'","range":{"end":{"character":25,"line":97},"start":{"character":17,"line":97}},"relatedInformation":[],"severity":1,"source":"clang"}],"uri":"file:///Users/stijn/Development/resolume/resolume_c/resolume%20resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp","version":1}}

I[12:57:10.003] --> textDocument/inactiveRegions
V[12:57:10.003] >>> {"jsonrpc":"2.0","method":"textDocument/inactiveRegions","params":{"regions":[],"textDocument":{"uri":"file:///Users/stijn/Development/resolume/resolume_c/resolume%20resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp"}}}

V[12:57:10.004] ASTWorker running DocumentSymbols on version 1 of /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp
I[12:57:10.004] --> reply:textDocument/documentSymbol(1) 2958 ms
V[12:57:10.004] >>> {"id":1,"jsonrpc":"2.0","result":[{"children":[{"kind":9,"name":"FileTimestampWatcher::~FileTimestampWatcher","range":{"end":{"character":2,"line":12},"start":{"character":1,"line":9}},"selectionRange":{"end":{"character":24,"line":9},"start":{"character":23,"line":9}}},{"detail":"ra::UniqueID (const std::filesystem::path &, std::function<void (bool)>)","kind":6,"name":"FileTimestampWatcher::watchFile","range":{"end":{"character":2,"line":40},"start":{"character":1,"line":14}},"selectionRange":{"end":{"character":45,"line":14},"start":{"character":36,"line":14}}},{"detail":"void (const ra::UniqueID &)","kind":6,"name":"FileTimestampWatcher::unwatchFile","range":{"end":{"character":2,"line":59},"start":{"character":1,"line":42}},"selectionRange":{"end":{"character":39,"line":42},"start":{"character":28,"line":42}}},{"detail":"void (const std::filesystem::path &)","kind":6,"name":"FileTimestampWatcher::unwatchFileAll","range":{"end":{"character":2,"line":70},"start":{"character":1,"line":61}},"selectionRange":{"end":{"character":42,"line":61},"start":{"character":28,"line":61}}},{"detail":"void ()","kind":6,"name":"FileTimestampWatcher::startWatching","range":{"end":{"character":2,"line":78},"start":{"character":1,"line":72}},"selectionRange":{"end":{"character":41,"line":72},"start":{"character":28,"line":72}}},{"detail":"void ()","kind":6,"name":"FileTimestampWatcher::stopWatching","range":{"end":{"character":2,"line":88},"start":{"character":1,"line":80}},"selectionRange":{"end":{"character":40,"line":80},"start":{"character":28,"line":80}}},{"detail":"bool () const","kind":6,"name":"FileTimestampWatcher::isWatching","range":{"end":{"character":2,"line":93},"start":{"character":1,"line":90}},"selectionRange":{"end":{"character":38,"line":90},"start":{"character":28,"line":90}}},{"detail":"bool (const std::filesystem::path &) const","kind":6,"name":"FileTimestampWatcher::isWatchingFile","range":{"end":{"character":2,"line":98},"start":{"character":1,"line":95}},"selectionRange":{"end":{"character":42,"line":95},"start":{"character":28,"line":95}}},{"detail":"void ()","kind":6,"name":"FileTimestampWatcher::run","range":{"end":{"character":2,"line":109},"start":{"character":1,"line":100}},"selectionRange":{"end":{"character":31,"line":100},"start":{"character":28,"line":100}}},{"detail":"void ()","kind":6,"name":"FileTimestampWatcher::scanTimestamps","range":{"end":{"character":2,"line":134},"start":{"character":1,"line":111}},"selectionRange":{"end":{"character":42,"line":111},"start":{"character":28,"line":111}}}],"kind":3,"name":"ra","range":{"end":{"character":1,"line":135},"start":{"character":0,"line":7}},"selectionRange":{"end":{"character":12,"line":7},"start":{"character":10,"line":7}}}]}

V[12:57:10.004] ASTWorker running DocumentLinks on version 1 of /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp
I[12:57:10.004] --> reply:textDocument/documentLink(2) 2895 ms
V[12:57:10.004] >>> {"id":2,"jsonrpc":"2.0","result":[{"range":{"end":{"character":37,"line":0},"start":{"character":9,"line":0}},"target":"file:///Users/stijn/Development/resolume/resolume_c/resolume%20resapi/resapi/source/core/filewatcher/file_timestamp_watcher.hpp"},{"range":{"end":{"character":18,"line":2},"start":{"character":9,"line":2}},"target":"file:///Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c%2B%2B/v1/cassert"},{"range":{"end":{"character":21,"line":3},"start":{"character":9,"line":3}},"target":"file:///Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c%2B%2B/v1/filesystem"},{"range":{"end":{"character":36,"line":5},"start":{"character":9,"line":5}},"target":"file:///Users/stijn/Development/resolume/resolume_c/resolume%20resapi/resapi/source/core/threading/RAThread.h"}]}

V[12:57:10.004] ASTWorker running InlayHints on version 1 of /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp
I[12:57:10.005] --> reply:textDocument/inlayHint(3) 2893 ms
V[12:57:10.005] >>> {"id":3,"jsonrpc":"2.0","result":[{"kind":2,"label":"&m:","paddingLeft":false,"paddingRight":true,"position":{"character":35,"line":16}},{"kind":1,"label":": iterator","paddingLeft":false,"paddingRight":false,"position":{"character":13,"line":22}},{"kind":2,"label":"k:","paddingLeft":false,"paddingRight":true,"position":{"character":29,"line":22}},{"kind":2,"label":"p:","paddingLeft":false,"paddingRight":true,"position":{"character":31,"line":31}},{"kind":2,"label":"p:","paddingLeft":false,"paddingRight":true,"position":{"character":55,"line":32}},{"kind":2,"label":"&m:","paddingLeft":false,"paddingRight":true,"position":{"character":35,"line":44}},{"kind":1,"label":": const path","paddingLeft":false,"paddingRight":false,"position":{"character":18,"line":46}},{"kind":1,"label":": Entry","paddingLeft":false,"paddingRight":false,"position":{"character":25,"line":46}},{"kind":2,"label":"k:","paddingLeft":false,"paddingRight":true,"position":{"character":29,"line":48}},{"kind":2,"label":"k:","paddingLeft":false,"paddingRight":true,"position":{"character":19,"line":51}},{"kind":2,"label":"&m:","paddingLeft":false,"paddingRight":true,"position":{"character":35,"line":63}},{"kind":1,"label":": iterator","paddingLeft":false,"paddingRight":false,"position":{"character":13,"line":65}},{"kind":2,"label":"k:","paddingLeft":false,"paddingRight":true,"position":{"character":29,"line":65}},{"kind":2,"label":"p:","paddingLeft":false,"paddingRight":true,"position":{"character":17,"line":66}},{"kind":2,"label":"f:","paddingLeft":false,"paddingRight":true,"position":{"character":23,"line":77}}]}

V[12:57:10.005] ASTWorker running codeAction on version 1 of /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp
I[12:57:10.005] --> reply:textDocument/codeAction(5) 2735 ms
V[12:57:10.005] >>> {"id":5,"jsonrpc":"2.0","result":[]}

V[12:57:10.005] ASTWorker running SemanticHighlights on version 1 of /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp
I[12:57:10.006] --> reply:textDocument/semanticTokens/full(6) 2402 ms
V[12:57:10.006] >>> {"id":6,"jsonrpc":"2.0","result":{"data":[7,10,2,15,131073,2,1,20,8,131072,0,23,20,8,135171,2,2,12,4,32768,3,1,2,15,131072,0,4,8,18,65536,0,9,20,8,131072,0,22,9,4,32771,0,16,3,15,131584,0,5,10,15,131584,0,12,4,8,131584,0,6,4,2,16403,0,6,3,15,131584,0,5,8,8,131584,0,8,1,22,0,0,11,1,22,0,0,2,8,2,16387,2,2,3,15,131584,0,5,10,8,131584,0,10,1,22,0,0,1,3,15,131584,0,5,5,8,131584,0,5,1,22,0,0,2,4,1,16387,0,5,5,6,33792,2,6,7,6,32768,0,8,5,4,33296,1,3,13,4,32768,2,8,2,15,131072,0,4,8,18,65536,0,9,2,1,16403,0,5,2,15,131072,0,4,16,3,131072,1,6,4,8,131592,0,5,2,1,16387,0,5,7,6,32768,0,8,4,4,33280,0,5,4,2,16400,0,7,2,1,16384,0,3,2,21,8192,0,3,7,6,32768,0,8,3,4,33280,2,3,2,1,16384,0,11,9,14,33024,0,10,7,14,33024,0,8,2,1,16400,0,4,3,15,131584,0,5,4,3,131584,0,5,8,2,17408,4,3,5,8,32768,0,6,5,1,16387,1,3,5,1,16384,0,6,9,6,32768,0,10,7,4,33280,0,8,2,1,16400,0,4,3,15,131584,0,5,4,3,131584,0,5,8,2,17408,2,7,3,15,131584,0,5,10,15,131584,0,12,6,3,131584,0,7,4,2,16400,1,4,5,1,16384,0,16,1,21,8192,0,2,3,15,131584,0,5,10,15,131584,0,12,15,3,131584,0,16,4,2,16400,2,4,5,1,16384,0,16,1,21,8192,0,2,3,15,131584,0,5,7,0,131600,2,3,7,6,32768,0,8,7,4,33280,0,8,4,2,16400,0,6,3,15,131584,0,5,4,3,131584,0,5,5,1,17408,3,9,2,1,16400,3,6,20,8,131072,0,22,11,4,32771,0,18,2,15,131072,0,4,8,18,65536,0,10,2,2,16403,2,2,3,15,131584,0,5,10,8,131584,0,10,1,22,0,0,1,3,15,131584,0,5,5,8,131584,0,5,1,22,0,0,2,4,1,16387,0,5,5,6,33792,2,7,4,8,131592,0,7,4,1,16401,0,6,5,1,16385,0,9,7,6,32768,2,7,5,1,16384,0,6,9,6,32768,0,10,5,4,33280,0,6,2,2,16400,0,4,1,21,0,2,8,5,1,16384,0,6,9,6,32768,0,10,5,4,33296,1,5,7,6,32768,0,8,5,4,33280,0,6,4,1,16400,2,8,7,6,32768,0,8,5,4,33296,1,5,12,4,32768,7,6,20,8,131072,0,22,14,4,32771,0,21,3,15,131584,0,5,10,15,131584,0,12,4,8,131584,0,6,4,2,16403,2,2,3,15,131584,0,5,10,8,131584,0,10,1,22,0,0,1,3,15,131584,0,5,5,8,131584,0,5,1,22,0,0,2,4,1,16387,0,5,5,6,33792,2,6,4,8,131592,0,5,2,1,16387,0,5,7,6,32768,0,8,4,4,33280,0,5,4,2,16400,0,7,2,1,16384,0,3,2,21,8192,0,3,7,6,32768,0,8,3,4,33280,1,3,7,6,32768,0,8,5,4,33280,0,6,2,1,16384,2,6,7,6,32768,0,8,5,4,33296,1,3,12,4,32768,3,6,20,8,131072,0,22,13,4,32771,2,2,6,19,131072,0,7,1,21,0,0,1,10,4,32784,2,2,7,6,32768,0,8,1,21,8192,1,2,6,6,32768,0,7,1,21,8192,0,2,3,15,131584,0,5,6,8,131584,0,7,1,21,0,0,1,20,8,131072,0,22,3,4,32768,3,6,20,8,131072,0,22,12,4,32771,2,6,1,21,0,0,1,7,6,32768,3,2,7,6,32768,0,8,1,21,8192,1,6,6,6,32768,0,7,8,4,33296,1,3,6,6,32768,0,7,4,4,33280,3,6,20,8,131072,0,22,10,4,32787,2,9,7,6,32768,3,6,20,8,131072,0,22,14,4,32787,0,21,3,15,131584,0,5,10,15,131584,0,12,4,8,131584,0,6,4,2,16403,2,9,7,6,32768,0,17,4,2,16400,3,6,20,8,131072,0,22,3,4,32771,4,9,7,6,32768,2,3,14,4,32768,1,3,2,15,131072,0,4,6,8,131136,0,8,5,5,32800,0,17,1,22,0,0,4,1,22,0,0,2,17,6,32768,0,18,1,21,0,4,6,20,8,131072,0,22,14,4,32771,2,2,3,15,131584,0,5,10,8,131584,0,10,1,22,0,0,1,3,15,131584,0,5,5,8,131584,0,5,1,22,0,0,2,4,1,16387,0,5,5,6,33792,2,7,4,8,131592,0,7,4,1,16401,0,6,5,1,16385,0,9,7,6,32768,2,7,3,15,131584,0,5,10,15,131584,0,12,6,3,131584,0,7,4,1,16400,2,10,4,8,131592,0,5,16,1,16403,0,19,3,15,131584,0,5,10,15,131584,0,12,15,3,131584,0,16,4,1,16400,1,8,16,1,16400,0,17,2,21,8192,0,3,5,1,16384,2,5,5,1,16384,0,16,1,21,8192,0,2,16,1,16400,1,10,4,8,131592,0,7,1,1,16401,0,3,8,1,16385,0,12,5,1,16384,0,6,9,6,32768,1,6,8,1,16384,0,8,1,21,8192,0,5,1,21,8192,3,12,5,1,16384,2,4,5,1,16384,0,16,5,14,33024,1,9,4,8,131592,0,7,1,1,16401,0,3,8,1,16385,0,12,5,1,16384,0,6,9,6,32768,1,5,8,1,16384,0,8,1,21,8192,0,6,1,21,8192],"resultId":"1"}}

I[12:57:10.006] --> textDocument/clangd.fileStatus
V[12:57:10.006] >>> {"jsonrpc":"2.0","method":"textDocument/clangd.fileStatus","params":{"state":"idle","uri":"file:///Users/stijn/Development/resolume/resolume_c/resolume%20resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp"}}

V[12:57:10.262] <<< {"id":7,"jsonrpc":"2.0","method":"textDocument/codeAction","params":{"context":{"diagnostics":[],"triggerKind":2},"range":{"end":{"character":21,"line":3},"start":{"character":21,"line":3}},"textDocument":{"uri":"file:///Users/stijn/Development/resolume/resolume_c/resolume%20resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp"}}}

I[12:57:10.262] <-- textDocument/codeAction(7)
V[12:57:10.262] ASTWorker running codeAction on version 1 of /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp
I[12:57:10.262] --> reply:textDocument/codeAction(7) 0 ms
V[12:57:10.262] >>> {"id":7,"jsonrpc":"2.0","result":[]}

I[12:57:10.262] --> textDocument/clangd.fileStatus
V[12:57:10.262] >>> {"jsonrpc":"2.0","method":"textDocument/clangd.fileStatus","params":{"state":"idle","uri":"file:///Users/stijn/Development/resolume/resolume_c/resolume%20resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp"}}

V[12:57:10.306] indexed preamble AST for /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp version 1:
  symbol slab: 15961 symbols, 4866336 bytes
  ref slab: 0 symbols, 0 refs, 128 bytes
  relations slab: 485 relations, 8728 bytes
V[12:57:10.476] Build dynamic index for header symbols with estimated memory usage of 12790284 bytes
V[12:57:12.046] <<< {"id":8,"jsonrpc":"2.0","method":"textDocument/semanticTokens/full/delta","params":{"previousResultId":"1","textDocument":{"uri":"file:///Users/stijn/Development/resolume/resolume_c/resolume%20resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp"}}}

I[12:57:12.046] <-- textDocument/semanticTokens/full/delta(8)
V[12:57:12.047] ASTWorker running SemanticHighlights on version 1 of /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp
I[12:57:12.047] --> reply:textDocument/semanticTokens/full/delta(8) 0 ms
V[12:57:12.047] >>> {"id":8,"jsonrpc":"2.0","result":{"edits":[],"resultId":"2"}}

I[12:57:12.047] --> textDocument/clangd.fileStatus
V[12:57:12.047] >>> {"jsonrpc":"2.0","method":"textDocument/clangd.fileStatus","params":{"state":"idle","uri":"file:///Users/stijn/Development/resolume/resolume_c/resolume%20resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp"}}

I[12:57:14.129] Indexed c++17 standard library: 10672 symbols, 2385 filtered
V[12:57:14.310] Build dynamic index for header symbols with estimated memory usage of 13907780 bytes
V[12:57:14.877] BackgroundIndex: building version 1 after loading index from disk
V[12:57:20.711] BackgroundIndex: serving version 1 (639840750 bytes)
I[12:57:22.543] --> $/progress
V[12:57:22.544] >>> {"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}

I[12:57:22.544] --> $/progress
V[12:57:22.544] >>> {"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}
HighCommander4 commented 1 day ago

I don't think the issue is related to the space in the folder name; the includes containing the space are properly quoted in the log.

I don't see an -std=c++20 flag in your compile_commands.json entry. The default language version in clang (and clangd) 18 is C++17, so -std=c++20 is needed to use C++20 features. Can you try adding it, either via whatever tool generates your compile_commands.json, or using https://clangd.llvm.org/config.html#add, and see if that helps?

stijnfrishert commented 1 day ago

Hmmm, I did some scouring for more data.

First off, here's the entry for the file in compile_commands.json

{
  "directory": "/Users/stijn/Development/resolume/resolume_a/build",
  "command": "/usr/bin/clang++ ... -std=gnu++20 -c \"/Users/stijn/Development/resolume/resolume_a/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp\"",
  "file": "/Users/stijn/Development/resolume/resolume_a/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp",
  "output": "resolume resapi/resapi/CMakeFiles/ResApiCommon.dir/source/core/filewatcher/file_timestamp_watcher.cpp.o"
},

The flag -std=gnu++20 is in there, which clang accepts as a placeholder for -std=c++20. This makes sense, because our root CMakeLists.txt has set(CMAKE_CXX_STANDARD 20) set, which ends up in the compile_commands.json. Apparently CMake in this setup chose to use gnu over c++.

I've added set(CMAKE_CXX_EXTENSIONS OFF) to CMakeLists.txt and now compile_commands.json lists -std=c++20, but the issue persists even then.

I don't think the issue is related to the space in the folder name; the includes containing the space are properly quoted in the log.

Yeah, that's what I would think as well. Still, when I rename the folder (changing the space into an underscore), all issues are gone.

I'm not sure why clangd would start indexing the c++17 std, but it seems it's not matching up the correct entry in the compile commands db? 🤷

Will update when I find more.

HighCommander4 commented 14 hours ago

-std=gnu++20 would be fine as well.

However, the following lines from the log:

I[12:57:07.111] ASTWorker building file /Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp version 1 with command [/Users/stijn/Development/resolume/resolume_c/build] /usr/bin/clang++ --driver-mode=g++ -DAJAMac -DAJASTATIC -DAJA_DEBUG -DAJA_MAC -DAJA_USE_CPLUSPLUS11 "-DCOPYRIGHT_YEAR_END=\"2024\"" -DDEBUG -DDONT_SET_USING_JUCE_NAMESPACE=1 -DGLEW_STATIC=1 -DGL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED -DGL_SILENCE_DEPRECATION -DMEVI_MAX_SUBMISSIONS_PER_BATCH=64 -DMEVI_VI_USE_MANUAL_ALLOCATION=1 -DMEVI_VULKAN_VALIDATION_DISABLED=1 -DNTV2_PREVENT_PLUGIN_LOAD -DNTV2_USE_CPLUSPLUS11 -DTINYXML2_DEBUG -DUNICODE -DWIRE_VERSION_LATEST_AVAILABLE -D_UNICODE "-I/Users/stijn/Development/resolume/resolume_c/build/resolume resapi/resapi/generated" "-I/Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source" -I/Users/stijn/Development/resolume/resolume_c/libs/magma/mevi-gfx/libs/qusdk/api/Include -I/Users/stijn/Development/resolume/resolume_c/libs/stb_dxt -I/Users/stijn/Development/resolume/resolume_c/libs/libjpeg-turbo/include -I/Users/stijn/Development/resolume/resolume_c/libs/libtiff/tiff-4.0.3/libtiff -I/Users/stijn/Development/resolume/resolume_c/libs/snappy-1.1.0 -I/Users/stijn/Development/resolume/resolume_c/libs/dxtr -I/Users/stijn/Development/resolume/resolume_c/libs/lz4 -I/Users/stijn/Development/resolume/resolume_c/libs/lzf -I/Users/stijn/Development/resolume/resolume_c/libs/ycocg -I/Users/stijn/Development/resolume/resolume_c/libs/bmd -I/Users/stijn/Development/resolume/resolume_c/libs/oscpack_1_1_0/osc -I/Users/stijn/Development/resolume/resolume_c/libs/stb_image -I/Users/stijn/Development/resolume/resolume_c/libs/resolume-pnglib -I/Users/stijn/Development/resolume/resolume_c/libs/resolume-zlib -I/Users/stijn/Development/resolume/resolume_c/libs/uvm/v2 -I/Users/stijn/Development/resolume/resolume_c/libs/magma/mevi-gfx/libs/moodycamel-1.0.3 -I/Users/stijn/Development/resolume/resolume_c/libs/wire-sdk/include -I/Users/stijn/Development/resolume/resolume_c/libs/webapi/include -I/Users/stijn/Development/resolume/resolume_c/libs/webapi/cpprouter/include -I/Users/stijn/Development/resolume/resolume_c/libs/magma/mevi-gfx/mevi-core -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks -isystem /Users/stijn/Development/resolume/resolume_c/build/vcpkg_installed/x64-osx/include -isystem /Users/stijn/Development/resolume/resolume_c/libs/rapidxml-1.13 -isystem /Users/stijn/Development/resolume/resolume_c/libs/exprtk -isystem /Users/stijn/Development/resolume/resolume_c/build/vcpkg_installed/x64-osx/include/libajantv2 -isystem /Users/stijn/Development/resolume/resolume_c/build/vcpkg_installed/x64-osx/include/libajantv2/ajantv2/includes -isystem /Users/stijn/Development/resolume/resolume_c/build/vcpkg_installed/x64-osx/include/libajantv2/ajantv2/src/mac -isystem /Users/stijn/Development/resolume/resolume_c/build/vcpkg_installed/x64-osx/share/rapidjson/../../include -isystem /Users/stijn/Development/resolume/resolume_c/libs/magic/include -faligned-allocation -ffp-contract=off -fbracket-depth=512 -Wall -Werror -Wsuggest-override -Wno-overloaded-virtual -Wno-switch -Wno-format-security -Wno-objc-missing-super-calls -Wno-literal-conversion -Wno-shorten-64-to-32 -Wno-delete-non-abstract-non-virtual-dtor -Wno-unused-variable -Wno-error=implicit-const-int-float-conversion -Wno-error=deprecated-anon-enum-enum-conversion -Wno-error=missing-declarations -Wno-error=macro-redefined -Wno-error=availability -Wno-error=unguarded-availability-new -Wno-error=deprecated-declarations -Wno-error=shorten-64-to-32 -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk -mmacosx-version-min=10.15 -fvisibility=hidden -fvisibility-inlines-hidden -c "-resource-dir=/Users/stijn/Library/Application Support/Code/User/globalStorage/llvm-vs-code-extensions.vscode-clangd/install/18.1.3/clangd_18.1.3/lib/clang/18" -- "/Users/stijn/Development/resolume/resolume_c/resolume resapi/resapi/source/core/filewatcher/file_timestamp_watcher.cpp"

tell us that the command clangd is actually using does not have the -std=gnu++20 in it.

A couple of things to check:

  1. Are you sure you're looking at the right compile_commands.json file? The log is showing it located at /Users/stijn/Development/resolume/resolume_c/build/compile_commands.json and it contains paths in resolume_c. The entry you showed in the previous comment, with the -std=c++20, contains paths in resolume_a.
  2. Maybe there is a clangd config file removing the -std=gnu++20 flag using https://clangd.llvm.org/config.html#remove? Check /Users/stijn/Library/Preferences/clangd/config.yaml for anything like that.