Partitions include graphs in auto-index so that each shards contains
only part of the include graph related to itself.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
clangd/index/Background.cpp | ||
---|---|---|
184 ↗ | (On Diff #175892) | We should make the function static or put it into the anonymous namespace. |
187 ↗ | (On Diff #175892) | NIT: Maybe accept a URI directly? E.g. if we ever have clients that already store a URI they won't need to do double conversions. |
194 ↗ | (On Diff #175892) | Maybe add a comment mentioning we do this merely to intern the strings? |
384 ↗ | (On Diff #175892) | Maybe also log the stats from the include graph? |
387 ↗ | (On Diff #175892) | Same here, maybe also attach some stats from the include graph? |
unittests/clangd/BackgroundIndexTests.cpp | ||
192 ↗ | (On Diff #175892) | This sets a compile command for a directory. Should it be "root/A.cc" or am I missing something? |
unittests/clangd/BackgroundIndexTests.cpp | ||
---|---|---|
192 ↗ | (On Diff #175892) | WOW! Thanks for noticing it :D It was working correctly before because we were deducing the file's absolute path from the compile command itself rather than what we've received by watching the CDB. Changed all references in the file. |
clangd/index/Background.cpp | ||
---|---|---|
70 ↗ | (On Diff #176090) | Naming: technically the variable name should be URI, but to avoid clashing with the type name we could use U |
259 ↗ | (On Diff #176090) | Maybe use auto? The type is spelled explicitly in the rhs |
260 ↗ | (On Diff #176090) | What are the cases when it happens in practice? Do we ever run the indexer without producing the include graph? |
388 ↗ | (On Diff #176090) | add a comma before {3} sources? |
- Address comments
clangd/index/Background.cpp | ||
---|---|---|
260 ↗ | (On Diff #176090) | You are right that's not the case any more. |
Everything looks good, just a single important request about testing the included files do not have any edges in the resulting graph
clangd/index/Background.cpp | ||
---|---|---|
79 ↗ | (On Diff #176356) | NIT: the comment could probably be simplified to something like URIs inside nodes must point into the keys of the same IncludeGraph |
386 ↗ | (On Diff #176356) | "sources" might be a bit confusing. I'd probably use "files" instead, but that doesn't look ideal too. |
unittests/clangd/BackgroundIndexTests.cpp | ||
197 ↗ | (On Diff #176356) | Maybe check the full shape of the graph? E.g. also add a check that A.h does not have any includes and its digest is populated. |