Implement the VLS roadmap on the native VBS build

Native VBS and CMake builds of the server and every registered suite:
protocol and document sync, VBS/compdb providers, stock GCC diagnostics
(including in-process default profile preparation), the stock occurrence
observer and hover/definition, the bounded Scheduler, C++ module graph,
scan and artifact cache with real CMI production, the context-aware
symbol index with schema-2 snapshot migration, navigation and guarded
rename, reflection provenance with splice-origin extraction, index-backed
completion and signature help, live GCC worker control with a registered
DAP suite, and the Neovim and VS Code clients.

VoidLibrary follows main. The private GCC 16.2.0 frontend is reproduced
from the versioned patches and verified stepping reflection/template code
with projected values 17/34 and 41/82.
This commit is contained in:
faumaray committed 2026-12-05 14:06:50 +03:00
1 parent ca04975d54
commit da8003f6d4
310 files changed
+47552 -480

No files matched your search

+66
View File
@@ -0,0 +1,66 @@
#pragma once
#include <Void/LanguageServer/Protocol/Json.hpp>
#include <chrono>
#include <cstddef>
#include <cstdint>
#include <expected>
#include <filesystem>
#include <memory>
#include <optional>
#include <string>
namespace vls::debug::live {
enum class State { idle, running, stopped, completed, failed, cancelled };
struct Stop {
std::uint64_t generation{};
std::uint32_t sequence{};
};
struct Options {
std::filesystem::path worker; // vls_gcc_probe
std::filesystem::path compiler;
std::string compiler_sha256;
std::filesystem::path source;
std::filesystem::path trace;
bool stepping{true};
std::chrono::milliseconds deadline{60000};
std::size_t max_notice_bytes{64 * 1024};
};
// One live private-compiler session speaking the supervisor notice protocol.
// Control actions are serialized; an inspection snapshot belongs to the stop
// generation that requested it and is not reused after the session moves.
class LiveSession {
public:
explicit LiveSession(Options);
~LiveSession();
LiveSession(const LiveSession &) = delete;
LiveSession &operator=(const LiveSession &) = delete;
LiveSession(LiveSession &&) = delete;
LiveSession &operator=(LiveSession &&) = delete;
// Spawns the worker and waits for the first stop.
[[nodiscard]] std::expected<Stop, std::string> start();
// At a stop: single-step. Returns the next stop or nullopt when finished.
[[nodiscard]] std::expected<std::optional<Stop>, std::string> step();
[[nodiscard]] std::expected<std::optional<Stop>, std::string> continue_run();
// Requests cancellation and reaps the worker.
[[nodiscard]] std::expected<void, std::string> cancel();
// Read-only bounded snapshot at the current stop.
[[nodiscard]] std::expected<Void::LanguageServer::Protocol::Json, std::string> inspect();
[[nodiscard]] State state() const;
[[nodiscard]] std::optional<Stop> stop() const;
[[nodiscard]] std::string outcome() const;
[[nodiscard]] std::string reason() const;
private:
struct State_;
std::unique_ptr<State_> state_;
};
} // namespace vls::debug::live