#pragma once #include #include #include #include #include #include #include #include #include #include #include namespace vls::modules { struct ScanCommand { std::filesystem::path working_directory; // Absolute compiler first. Must contain exactly one absolute -fdeps-file=. std::vector arguments; ExpectedOutput output; }; using ScanCommandLookup = std::function(const Build::ContextKey &)>; struct ScanProduct { std::string p1689; std::optional rule; }; struct ScanOptions { std::filesystem::path directory; // private output directory std::chrono::milliseconds deadline{60000}; std::size_t max_bytes{max_scan_bytes}; }; // Runs one checked P1689 scan command and decodes its dependency file. The // product is filled only on success; a failure throws so the scheduler records // a failed task. No compiler option comes from project metadata here. [[nodiscard]] std::function gcc_module_scan_work(ScanCommandLookup lookup, Build::ContextKey context, std::shared_ptr product, ScanOptions options = ScanOptions{}); } // namespace vls::modules