<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/126350>126350</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clangd] [modules] adding module imports requires rebuild
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
hhhapz
</td>
</tr>
</table>
<pre>
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.

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
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8lc-PqzYQx_8a5zICERNIOOSQffuiptqqUtV7ZfAA0xib2mazeX99NSZZ7Wml1WKMPT8-852JCoEGi3gU1YuoXjdqiaPzx3Ec1fxr0zp9P_78UNNsEGbv_sUuivIEY4xzEOVJyLOQ54HiuLR55yYhz-tNIc9uRvv7Qh0KeY4e-dFN6oqiOIni9Bd2aKO5C_kDLqC0Rg1hmWfnI_TOQzqaVurpGFokO8DN-StqcBbaOyjoPaHV4HqYyGIOf9oO4QKDixBHhB9_qCu-UYghjx8RejIIPVllzD1ZIjtwCJ-uvZugM8oOGkIkYyAgTgEMTRRRs3lkX2y6pWHAEME7paE1rruiD3ABryyQjQ5uKkAcVQRl7xBp4rhoYj-oQYHFG0xOLwZXCDe3GA0W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