Issue 126350
Summary [clangd] [modules] adding module imports requires rebuild
Labels new issue
Assignees
Reporter hhhapz
    Example project: https://github.com/hhhapz/openJuice/tree/cmake

Recently, I added support for cmake for a project being worked on by a friend of mine. Once I got the CMakeLists.txt file finally working, support from clangd still seems limited. One of the biggest road blockers I ran into was that any time I imported a new module, I would need to rerun `cmake --build build` (Likely some simpler command would also be sufficient, but this is what I tried and it worked) in order for clangd to properly recognize it. This wasn't needed when removing the statement.

Here is an example, if I newly add the import line for Entity, I would get this error until I would run `cmake --build build` for it to regenerate caches/the sort. 

![Image](https://github.com/user-attachments/assets/4fbfbe05-cc8f-4256-9120-55220ea68e1e)

This should be reproducible with the repository link I posted above. Let me know if this is known to not be supported or if there is way to get this working.

Here's the versions of my tools:
```
$ clang++ --version
clang version 19.1.7
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

$ cmake --version
cmake version 3.31.5
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to