feat(translation,ide): add native C driver, Ninja custom commands, CMake CXX_MODULES, and vbs ide integration
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 3s

This commit is contained in:
faumaray committed 2026-11-27 07:50:54 +03:00
1 parent 5e1916dc5c
commit 6c225c2dff
27 files changed
+3443 -331

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
# 09 — Compilation databases and editor selection
Implementation status: IMPLEMENTED & VERIFIED (2026-11-26). See
Implementation status: IMPLEMENTED & VERIFIED (2026-11-26; extended in Wave 10 on 2026-11-27 with `build.cpp`/`build.profiles.cpp`/`build-support/` SDK CompDB entries, C standard flags, and `vbs ide generate|query` for `.clangd`, `.vscode/`, `.zed/`, & `.idea/`). See
[STATE](../agent-workflow/STATE.md) and [VERIFICATION](../agent-workflow/VERIFICATION.md)
for implemented files and observed checks.
@@ -1,6 +1,6 @@
# 20 — Later native foreign execution and platform ports
Implementation status: **Slices 1 & 2A implemented & verified** (bounded single-config C++ CMake File API codemodel and Meson `intro-targets.json` + `build.ninja` audits, native `Graph::BuildGraph` translation, unified `resolve_foreign_with_translation`, CLI `vbs build|test --native-foreign`, equivalence & restored-mtime mutation tests, and explicit `RequireNative` / `FallbackToForeignBuild` policy in [Translator.hpp](../../include/Void/Build/Provider/Translator.hpp) and [Translator.cpp](../../src/Provider/Translator.cpp)); **Slices 2B/2C (C driver, custom-command translation, foreign C++20 module fileSets), Slice 3 (Windows/MSVC & macOS/Apple Clang ports), and remote execution remain planned scope** — see [21-expansion-roadmap.md](21-expansion-roadmap.md), [STATE](../agent-workflow/STATE.md), and [VERIFICATION](../agent-workflow/VERIFICATION.md).
Implementation status: **Slices 1, 2A, 2B, & 2C implemented & verified** (bounded single-config C & C++ / multi-compile-group CMake File API `codemodel-v2` and Meson `intro-targets.json` + `build.ninja` audits, bounded hermetic `build.ninja` `CUSTOM_COMMAND` / `UTILITY` / `custom_target` lowering with strict rejection of `console` pools / `.util`-only side-effects / out-of-tree writes, foreign CMake C++20 `CXX_MODULES` `fileSets` lowering onto P1689 + cross-target `module_bmis`, native `Graph::BuildGraph` execution, unified `resolve_foreign_with_translation`, CLI `vbs build|test --native-foreign`, equivalence & restored-mtime mutation tests, and explicit `RequireNative` / `FallbackToForeignBuild` policy in [Translator.hpp](../../include/Void/Build/Provider/Translator.hpp) and [Translator.cpp](../../src/Provider/Translator.cpp)); **Slice 3 (Windows/MSVC & macOS/Apple Clang ports, remote execution workers, plus live `conan` CLI verification) remains planned scope** — see [21-expansion-roadmap.md](21-expansion-roadmap.md), [STATE](../agent-workflow/STATE.md), and [VERIFICATION](../agent-workflow/VERIFICATION.md).
## Requirements and ownership
+11 -12
View File
@@ -1,6 +1,6 @@
# 21 — Post-v1 Expansion Roadmap
Status: Active execution guide (Plans **01–19**, **Plan 20 Slices 1 & 2A**, **Track A [A1–A3]**, and **Track E1** are implemented and verified; **Tracks B–D & E2–E4** remain planned; see [STATE](../agent-workflow/STATE.md) and [VERIFICATION](../agent-workflow/VERIFICATION.md)).
Status: Active execution guide (Plans **01–19**, **Plan 20 Slices 1–2C**, **Track A [A1–A3]**, **Track B [B1–B3, except live `conan` CLI container]**, **Track E1**, and **Track E3 IDE config/query tooling** are implemented and verified; **Track C**, **Track D**, **Track E2 (`workspace.cpp`)**, **Track E3 (`vbs daemon`)**, **Track E4**, and live `conan` CLI verification remain planned; see [STATE](../agent-workflow/STATE.md) and [VERIFICATION](../agent-workflow/VERIFICATION.md)).
This roadmap defines five orthogonal expansion tracks for taking VoidBuildSystem from a verified self-hosting Linux C++26 build system into a multi-platform, distributed, daily-driver ecosystem. Each track preserves core architectural invariants: ordinary C++ descriptions, hermetic content-verified snapshots, isolated profiles, immutable CAS publication, and explicit diagnostics over silent approximation.
@@ -28,15 +28,15 @@ flowchart LR
---
## Track B — Foreign Build Translation Expansion (Plan 20 Slices 2B & 2C)
## Track B — Foreign Build Translation Expansion (Plan 20 Slices 2B & 2C) *(Implemented & Verified in Wave 10; live `conan` container pending)*
**Goal**: Expand bounded native translation beyond single-config C++ libraries/executables while never silently dropping unsupported rules.
| Phase | Concrete Scope | Acceptance Gate |
| Phase | Concrete Scope | Acceptance Gate / Status |
| --- | --- | --- |
| **B1 — Native C Compiler Driver (`C` + Mixed `C`/`C++`)** | Extend `ToolchainCapabilities` with `c_compiler` (`gcc`/`clang`), C standard flags (`c11`/`c17`/`c23`), and multi-compile-group lowering in `Graph.cpp` + `Translator.cpp`. | Mixed C/C++ CMake and Meson projects (e.g., zlib/sqlite3-style fixtures) translate natively and match official tool outputs. |
| **B2 — Bounded `build.ninja` Custom-Command Translation** | Parse configured Ninja `rule` / `build` edges for hermetic `add_custom_command` / `custom_target` code generators into VBS `ActionKind::Custom` nodes, strictly rejecting unverified side-effecting rules. | Generated-header CMake/Meson fixtures execute natively under VBS CAS caching and rebuild correctly under generator-input mutations. |
| **B3 — Foreign C++20 `CXX_MODULES` Translation & Conan2 Binary Adapter** | Lower CMake `CXX_MODULES` `fileSets` onto VBS's P1689 scanner + `ModuleBmi` pipeline; implement live Conan2 `conan install --format=json` consumer adapter when `conan` is available. | Foreign CMake C++20 module fixture builds natively under GCC 16 and Clang 23; Conan2 fixture verified in a container with `conan` installed. |
| **B1 — Native C Compiler Driver (`C` + Mixed `C`/`C++`)** | Extended `ToolchainCapabilities` with `c_compiler` (`gcc`/`clang`), C standard flags (`c11`/`c17`/`c23`), `PerFileOption` CompDB projection, and multi-compile-group lowering in `Graph.cpp` + `Translator.cpp`. | **Verified**: Pure VBS C17+C++23, CMake C11+C++20, and Meson C17+C++20 mixed fixtures translate and execute natively (`FullV1Tests.cpp`). |
| **B2 — Bounded `build.ninja` Custom-Command Translation** | Shared `build.ninja` `CUSTOM_COMMAND` / `phony` parser lowering hermetic `add_custom_command`, `UTILITY`, and Meson `custom_target`/`generated_sources` into VBS `ActionKind::Custom` nodes, strictly rejecting `console` pools, `.util`-only side-effects, out-of-tree writes, and `run` targets. | **Verified**: Generated-header + generated-source CMake and Meson fixtures execute natively under `RequireNative`, while unsafe constructs reject cleanly (`FullV1Tests.cpp`). |
| **B3 — Foreign C++20 `CXX_MODULES` Translation & Conan2 Binary Adapter** | Lowered CMake `CXX_MODULES` `fileSets` onto VBS's P1689 scanner + `ModuleBmi` pipeline (with `default_include_dirs` NixOS `clang-scan-deps` support) plus cross-target/imported `module_bmis` propagation; Conan2 adapter enforces explicit prerequisite checks. | **Verified on GCC 16 & Clang 23**: Foreign CMake C++20 module library + consumer VBS cross-target `import` pass on both toolchains; live `conan` container verification remains pending. |
---
@@ -73,15 +73,14 @@ flowchart LR
| --- | --- | --- |
| **E1 — Everyday CLI Ergonomics (Implemented in Wave 8)** | `vbs init` project scaffolding, `vbs clean`, `vbs doctor` environment diagnostics, `vbs graph --format dot|json`, and `vbs build --native-foreign`. | End-to-end CLI & integration tests passing in `vbs_cli_contract` and `vbs_v1_tests`. |
| **E2 — Multi-Package Workspaces (`workspace.cpp`)** | Shared `vbs.lock`, shared CAS, cross-member local target linking, and affected-target graph selection (`vbs build --member <pkg>` / `--changed-since <ref>`). | 3-package workspace fixture building shared library + app + tests with unified lockfile. |
| **E3 — Background Build/Metadata Daemon & IDE Integration** | Optional local Unix-socket daemon (`vbs daemon`) holding warm `StateStore`, `RunDigestCache`, and `DirectoryWatcher` so editor `compile_commands.json` refreshes and incremental `vbs build` respond in <50ms. | Daemon auto-restarts on binary upgrade, honors `SignalWatcher` graceful shutdown, and preserves ticket ordering. |
| **E3 — IDE Config/Query & Background Daemon** | `build.cpp`/`build.profiles.cpp`/`build-support/` SDK entries in `compile_commands.json` + `vbs ide generate` (`.clangd`, `.vscode/`, `.zed/`, `.idea/customTargets.xml`) & `vbs ide query` (**Implemented & Verified in Wave 10**); optional Unix-socket `vbs daemon` holding warm `StateStore`/`RunDigestCache`/`DirectoryWatcher` (**Planned**). | `vbs ide` & `build.cpp` syntax-check verified in `FullV1Tests.cpp`; `vbs daemon` & dedicated editor extensions pending. |
| **E4 — Transport & Storage Upstream Alignment** | Adopt `Void::Net` (`VL-004`/`VL-005`) and `Void::Sqlite` (`VL-011b`) when lightweight/bundled builds become available in minimal Nix toolchains, reducing VBS transport code further. | All `vbs_registry_tests` and `vbs_core_tests` pass on both minimal and full toolchains. |
---
## Recommended Next Execution Order
1. **Track B1 + B2** (highest leverage next): C compiler driver + bounded Ninja custom-command translation so real-world C/C++ CMake/Meson dependencies execute natively.
2. **Track D1 + D2**: shared HTTP CAS cache on `vbs-registry` + parallel snapshot hashing for large repos.
3. **Track E2**: multi-package `workspace.cpp` support.
4. **Track B3**: foreign C++20 `CXX_MODULES` `fileSets` lowering + live Conan2 adapter.
5. **Track C1–C4**: macOS / Windows platform ports + dual-profile cross-compilation once host CI runners are provisioned.
1. **Track D1 + D2** (highest leverage next): shared HTTP CAS cache on `vbs-registry` + parallel snapshot hashing for large repos.
2. **Track E2**: multi-package `workspace.cpp` support with shared lockfile and CAS.
3. **Track E3 (`vbs daemon`) + Track E4**: persistent local background daemon and `Void::Net`/`Void::Sqlite` alignment once optional system deps are bundled.
4. **Track C1–C4 + live `conan` container**: macOS / Windows platform ports + dual-profile cross-compilation once host CI runners are provisioned.
+4 -4
View File
@@ -1,7 +1,7 @@
# Roadmap and delivery graph
Plans **01–19** and **Plan 20 Slices 1 & 2A** (bounded native CMake & Meson graph translation on Linux) are implemented and verified in the native codebase and CTest
suites; **Plan 20 Slices 2B/2C & 3** and the five post-v1 expansion tracks in [21 — Post-v1 expansion roadmap](21-expansion-roadmap.md) define the next phases. For implemented
Plans **01–19**, **Plan 20 Slices 1, 2A, 2B, & 2C** (bounded native C/C++ CMake & Meson translation, hermetic `build.ninja` `CUSTOM_COMMAND` rules, and CMake C++20 `CXX_MODULES` `fileSets`), **Track A**, **Track B**, **Track E1**, and **Track E3 IDE config/query tooling** are implemented and verified in the native codebase and CTest
suites; **Plan 20 Slice 3** (Windows/MSVC, macOS/Apple Clang, remote execution, plus live `conan` CLI verification) and the remaining post-v1 tracks (**C, D, E2 `workspace.cpp`, E3 `vbs daemon`, & E4**) in [21 — Post-v1 expansion roadmap](21-expansion-roadmap.md) define the next phases. For implemented
commands, targets, and workflow usage, see the [project README](../../README.md) and
[verification record](../agent-workflow/VERIFICATION.md).
@@ -31,8 +31,8 @@ Authority: [requirements](REQUIREMENTS.md), [architecture](ARCHITECTURE.md),
| [17 — Registry web administration](17-registry-ui.md) | Implemented & Verified | [registry/web/](../../registry/web/index.html) |
| [18 — Native self-hosting and VoidLibrary migration](18-self-host-voidlibrary.md) | Implemented & Verified | [VoidLibraryRecipe.cpp](../../recipes/VoidLibrary/VoidLibraryRecipe.cpp), [TestRegistryGen.cpp](../../src/SelfHost/TestRegistryGen.cpp) |
| [19 — Quality, performance and CI](19-quality-performance-ci.md) | Implemented & Verified | [tests/](../../tests/CMakeLists.txt), [EngineBenchmarks.cpp](../../benchmarks/EngineBenchmarks.cpp), [.github/workflows/ci.yml](../../.github/workflows/ci.yml) |
| [20 — Later native foreign execution and platform ports](20-future-translation-platforms.md) | Slices 1 & 2A Implemented & Verified; 2B/2C & OS ports planned | [Translator.hpp](../../include/Void/Build/Provider/Translator.hpp), [Translator.cpp](../../src/Provider/Translator.cpp) (bounded CMake & Meson native translation + unified fallback + `--native-foreign`); C driver, custom commands, Windows/macOS ports planned |
| [21 — Post-v1 expansion roadmap](21-expansion-roadmap.md) | Track A (A1–A3) & Track E1 Implemented; Tracks B–D, E2–E4 Planned | Five-track expansion roadmap (**Track A** zero-CMake `.native_builder()` self-host, full `VOID_TEST` suite in `build.cpp`, & bit-identical Stage 2 == Stage 3 bootstrap verified; Tracks B–E2/E4 planned) |
| [20 — Later native foreign execution and platform ports](20-future-translation-platforms.md) | Slices 1, 2A, 2B, & 2C Implemented & Verified; Slice 3 OS/remote ports planned | [Translator.hpp](../../include/Void/Build/Provider/Translator.hpp), [Translator.cpp](../../src/Provider/Translator.cpp) (C/C++ CMake & Meson translation, Ninja `CUSTOM_COMMAND`, foreign C++20 `CXX_MODULES`, unified fallback & `--native-foreign`); Windows/macOS/remote execution planned |
| [21 — Post-v1 expansion roadmap](21-expansion-roadmap.md) | Track A, Track B (B1–B3, except live `conan` CLI), Track E1 & Track E3 IDE configs/query Implemented; Tracks C, D, E2, E3 daemon & E4 Planned | Five-track expansion roadmap (**Track A** zero-CMake self-host, **Track B** C driver / Ninja custom commands / CMake `CXX_MODULES`, **Track E1**, & **Track E3** `build.cpp` CompDB + `vbs ide` verified; Tracks C, D, E2, `vbs daemon`, & E4 planned) |
## Dependency graph