Files
serena/test/solidlsp/cpp
mesa3 d650f30c7e Fix clangd cache invalidation and capability checks (#1359)
Summary
relax clangd initialize capability checks to tolerate valid response shape differences
add a clangd-specific document-symbol cache fingerprint so stale C++ symbol caches are invalidated when backend/config state changes
add a regression test covering C++ document-symbol cache invalidation
Problem
For C++ projects, Serena's symbol tools could keep returning malformed cached document symbols even after clangd / compile commands / backend state had been repaired. The cache key was effectively stable as long as file contents did not change, so previously bad symbol trees could survive later LS recovery.

In addition, clangd capability checks were too strict and assumed a single exact initialize-response shape.

What this changes
accepts both integer and object-style textDocumentSync responses
validates completionProvider more conservatively by checking required trigger characters instead of exact equality
fingerprints clangd document-symbol caches using:
clangd_version
ls_path
compile_commands_dir
compile_commands.json content hash
adds a C++ regression test similar to the existing Go cache invalidation coverage
2026-04-16 12:19:29 +02:00
..
2026-02-01 20:01:51 +07:00