#pragma once #include #include #include #include #include #include namespace vls::features { // What the caller currently knows about one source path. Content identity is // the same opaque value the index stored; an empty identity means the caller // cannot prove the file's current content, so its facts stay non-editable. struct IndexedSource { std::string path; std::string content; bool editable{}; }; // Merges one published index generation into a navigation fact set. // // Contexts the set does not know yet are added with the index's completeness. // Each record's use location and every proven reference become facts whose // binding joins on name and definition. Facts are deduplicated by binding, // source and use; an existing fact always wins, so compiler-derived content // identities are never replaced by weaker index data. A record whose source // is unknown stays in the set as a non-editable fact: rename then refuses // instead of editing an unverified file. Returns the number of added facts. std::size_t ingest_index_facts(navigation::FactSet &, const index::Generation &, std::span, std::size_t limit = 65536); } // namespace vls::features