refactor: simplify CompilationDatabase, extract ArgumentParser, remove pimpl (#371)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ykiko
2026-03-27 13:15:49 +08:00
committed by GitHub
parent 498c975042
commit 46ba1e4db6
19 changed files with 1724 additions and 1824 deletions

View File

@@ -192,14 +192,15 @@ et::task<> MasterServer::load_workspace() {
co_return;
}
auto updates = cdb.load_compile_database(cdb_path);
LOG_INFO("Loaded CDB from {} with {} entries", cdb_path, updates.size());
auto count = cdb.load(cdb_path);
LOG_INFO("Loaded CDB from {} with {} entries", cdb_path, count);
}
void MasterServer::fill_compile_args(llvm::StringRef path,
std::string& directory,
std::vector<std::string>& arguments) {
auto ctx = cdb.lookup(path, {.query_toolchain = true});
auto results = cdb.lookup(path, {.query_toolchain = true});
auto& ctx = results.front();
directory = ctx.directory.str();
arguments.clear();
for(auto* arg: ctx.arguments) {