Enable configuration of remote and static indexes through config files
in addition to command line arguments.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LG (comment nits) thanks!
(Meta-point: not sure how useful splitting this patch out from the compile step is...)
clang-tools-extra/clangd/ConfigFragment.h | ||
---|---|---|
165 | I'd move the file-take-precedence-over-server part to server. Or even just say only one source (file/server) should be configured, leave the behavior unspecified, and report an error when compiling the fragment. | |
165 | "Configuration information for" is redundant here. maybe just / An external index uses data source outside of clangd itself. | |
170 | nit: I'm not sure "monolithic" is a useful qualifier to the audience here. | |
171 | Generalize this as "Relative paths may be used, if the config fragment is associated with a directory."? | |
173 | Should we mention slashes here too? :-\ Maybe we should just lift "all paths use forward-slashes" to a top-level comment. | |
174 | nit: for a clangd-index-server | |
176 | Again: "Default is the directory associated with the config frament". (Repeating this makes me wonder if we should have defined a more specific name like "Home"...) | |
clang-tools-extra/clangd/ConfigYAML.cpp | ||
127 | nit: this sort of validation would normally live in ConfigCompile, since it's not to do with serialization |
(Meta-point: not sure how useful splitting this patch out from the compile step is...)
I wanted to keep them separate especially to ensure testing isn't mixed up. As these things tend to get big easily :/
clang-tools-extra/clangd/ConfigFragment.h | ||
---|---|---|
173 | This is literally used for pointing at a file on disk though. So it doesn't really matter if this is forward or back slashes? | |
176 | not sure where else we repeated this ? | |
clang-tools-extra/clangd/ConfigYAML.cpp | ||
127 | moving into compile logic. |
I'd move the file-take-precedence-over-server part to server.
Or even just say only one source (file/server) should be configured, leave the behavior unspecified, and report an error when compiling the fragment.