[server] support getting compile commands for header files
github-actions opened this issue · 1 comments
github-actions commented
Line 48 in 26ffb32
#[cfg(feature = "server")]
impl State {
/// Get [`CompilationDatabase`] for a .compile file path.
/// TODO(server): support getting compile commands for header files
pub fn compile_commands(&mut self, compile_filepath: &Path) -> Result<&XCCompilationDatabase> {
tracing::debug!("Getting compile commands");
if self.compile_commands.contains_key(compile_filepath) {
tracing::debug!("Using Cached compile database");
self.compile_commands.get(compile_filepath)
} else {
tracing::debug!("Reading from {compile_filepath:?}");
XCCompilationDatabase::try_from_filepath(compile_filepath)?
.pipe(|cmds| self.compile_commands.insert(compile_filepath.into(), cmds))
.pipe(|_| self.compile_commands.get(compile_filepath))
}
github-actions commented
Closed in 3c53d44