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
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 3s
This commit is contained in:
1 parent
5e1916dc5c
commit
6c225c2dff
27 files changed
+3443
-331
No files matched your search
@@ -6,16 +6,16 @@ profile definitions live in ordinary `build.cpp`, `build.profiles.cpp`, and
|
||||
`build-support/**/*.cpp`/`.hpp` files; declarative package manifests also support
|
||||
`vbs.deps.toml` normalized to the exact same dependency model.
|
||||
|
||||
**Implemented scope (Plans 01–19, Plan 20 Slices 1 & 2A, Track A Self-Hosting):**
|
||||
- **Declaration SDK (`Void::Build`, `<Void/Build.hpp>`)**: `VoidBuild_Sdk` / `Void::BuildSdk` with version-1 deterministic UTF-8 JSON schema, profile inheritance and cycle detection, all seven `TargetKind`s, scoped options/defines/links, modern C++ flags, install rules, and symbolic TOML manifest references.
|
||||
- **Native Core Engine (`VoidBuild_Core` / `Void::BuildCore`)**: out-of-process host descriptor compilation, graph lowering and transitive visibility resolution, GCC 16 & Clang 23 toolchain discovery/capability probing, content-verified immutable snapshots (`FICLONE`/isolated copies, lookup guards), deterministic path prefix mapping + `-frandom-seed`, transactional CAS store (`StateStore`), bounded-parallel DAG execution (`ProcessSupervisor` with `-pgid` `SIGTERM -> SIGKILL` cleanup), and live `Void::Log` progress logging (`--verbose`/`-v`, `--quiet`/`-q`).
|
||||
**Implemented scope (Plans 01–19, Plan 20 Slices 1–2C / Track B, Track A Self-Hosting, & `vbs ide` Tooling):**
|
||||
- **Declaration SDK (`Void::Build`, `<Void/Build.hpp>`)**: `VoidBuild_Sdk` / `Void::BuildSdk` with version-1 deterministic UTF-8 JSON schema, profile inheritance and cycle detection, all seven `TargetKind`s, scoped options/defines/links, C (`c_standard(CStandard)`) and modern C++ (`cxx_standard(CxxStandard)`) controls, install rules, and symbolic TOML manifest references.
|
||||
- **Native Core Engine (`VoidBuild_Core` / `Void::BuildCore`)**: out-of-process host descriptor compilation, graph lowering and transitive visibility resolution, GCC 16 & Clang 23 C (`gcc`/`clang`) and C++ (`g++`/`clang++`) toolchain discovery/capability probing (including default system include dirs for `clang-scan-deps`), content-verified immutable snapshots (`FICLONE`/isolated copies, lookup guards), deterministic path prefix mapping + `-frandom-seed`, transactional CAS store (`StateStore`), bounded-parallel DAG execution (`ProcessSupervisor` with `-pgid` `SIGTERM -> SIGKILL` cleanup), and live `Void::Log` progress logging (`--verbose`/`-v`, `--quiet`/`-q`).
|
||||
- **Zero-CMake Self-Building & Self-Testing `build.cpp` (Track A)**: Root [build.cpp](build.cpp) builds `VoidLibrary` via `.native_builder(...)` (first-class `builder == "native"` in [Provider.cpp](src/Provider/Provider.cpp), zero CMake invocation) and declares all 13 targets (`VoidBuildSdk`, `VoidBuildCore`, `GenerateBootstrapConfig`, `vbs`, `VoidBuildRegistry`, `vbs-registry`, `vbs_self_smoke`, `vbs_benchmarks`, and all 5 `Void::Testing` `VOID_TEST` suites `vbs_sdk_tests`, `vbs_core_tests`, `vbs_v1_tests`, `vbs_registry_tests`, `vbs_selfhost_tests`). Stage 2 and Stage 3 `vbs` builds match bit-for-bit by SHA-256 across distinct build directories with `cmake` trapped on `PATH`.
|
||||
- **Plan 20 Slices 1 & 2A — Bounded Native CMake & Meson Graph Translation**: [Translator.hpp](include/Void/Build/Provider/Translator.hpp) / [Translator.cpp](src/Provider/Translator.cpp) audits configured CMake File API `codemodel-v2` and Meson `meson-info/intro-targets.json` + `build.ninja` graphs, executes supported single-config C++ targets natively through VBS's toolchain driver, CAS cache, and depfile tracker (zero `cmake --build` / `meson compile`), exposes unified `resolve_foreign_with_translation` and opt-in `vbs build|test --native-foreign`, and explicitly diagnoses or falls back on unsupported constructs (`UTILITY`/`custom_target`, generated sources, non-C++ languages, foreign `CXX_MODULES`, precompiled headers, untracked link fragments).
|
||||
- **Modern C++, Editor Metadata & Watchers**: Full graph-integrated P1689r5 named modules & module partitions (GCC `-fmodule-mapper` and Clang two-step `--precompile` `.pcm` -> `.o` + transitive `-fmodule-file=`), explicit `SourceKind::HeaderUnit` compilation, unity batches (excluding modules and per-file overrides), incompatible sanitizer rejection, per-profile `compile_commands.json` with monotonic selection tickets and user-file preservation, and Linux `inotify` build/metadata watching via `Void::FileSystem::DirectoryWatcher` (`MetadataOnly` never triggers builds or foreign configures).
|
||||
- **Plan 20 Slices 1–2C / Track B — Bounded Native CMake & Meson Graph Translation**: [Translator.hpp](include/Void/Build/Provider/Translator.hpp) / [Translator.cpp](src/Provider/Translator.cpp) configures CMake/Meson ONLY (zero `cmake --build` / `meson compile`), translates single- and multi-compile-group C/C++ targets (`PerFileOption`), bounded hermetic `build.ninja` `CUSTOM_COMMAND` / `UTILITY` / `custom_target` code generators (`TargetKind::CustomAction`), and foreign CMake C++20 `CXX_MODULES` `fileSets` (lowering onto VBS's P1689 scanner + `ModuleBmi` + cross-target `module_bmis` propagation on GCC 16 & Clang 23), exposes `resolve_foreign_with_translation` / `vbs build|test --native-foreign`, and explicitly diagnoses or falls back on unsafe/unbounded constructs (`console` pools, `.util`-only side-effects, out-of-tree writes, `run` targets, PCH, non-C/C++ languages, untracked link fragments).
|
||||
- **Modern C++, Editor Metadata, Watchers & `vbs ide`**: Full graph-integrated P1689r5 named modules & module partitions (with cross-target and imported `module_bmis` propagation on GCC `-fmodule-mapper` and Clang `--precompile` `.pcm` -> `-fmodule-file=`), explicit `SourceKind::HeaderUnit`, unity batches (excluding `.c`, modules, and per-file overrides), per-profile `compile_commands.json` (including `build.cpp`/`build.profiles.cpp`/`build-support/` SDK entries for `clangd`), non-destructive IDE config generation (`vbs ide generate` for `.clangd`, `.vscode/`, `.zed/`, `.idea/customTargets.xml`), machine-readable workspace JSON (`vbs ide query`), and Linux `inotify` build/metadata watching via `Void::FileSystem::DirectoryWatcher` (`MetadataOnly` never triggers builds or foreign configures).
|
||||
- **Native Package Manager, Foreign Providers, Bridge & Install**: `Void::Data::Toml` 1.0 parser/merger, PubGrub-style SemVer solver (`Void::Semver::parse_range`), context-aware CAS `vbs.lock`, live registry HTTP/1.1 client (`vbs publish`, `vbs deps resolve|update`, `vbs build --locked` against `vbs-registry`), deterministic PAX/USTAR `.tar` packaging & staged safe extraction (`Void::Archive`), native/CMake/Meson providers (plus explicit-error Conan2 adapter), `cmake/bridge/VbsDeps.cmake`, and staged relocatable install/export/uninstall.
|
||||
- **Registry Service, Web Admin UI & Native Self-Hosting**: `vbs-registry` HTTP/1.1 service (`VoidBuild_Registry` / `Void::BuildRegistry`) with RBAC, salted password hashes, CSRF/HttpOnly session auth, immutable releases, backup/restore, XSS-safe DOM-only web UI (`registry/web/`), native `VoidLibrary` & full `VbsSelfHostRecipe` recipes (`recipes/VoidLibrary/`, `recipes/SelfHost/`) compiling the full Stage 1 `vbs` binary without CMake to build & test Stage 2/3 projects, and native `VOID_TEST` (`VL-009`) registration eliminating external CMake test scanning.
|
||||
- **Maximal VoidLibrary Reuse (`3e254055...`)**: Built directly on VoidLibrary `Configuration` (`Void::Argparse::Parser` with nested subcommands, `option_many`, and 100% auto-generated `--help` across `vbs`, `vbs-registry`, `vbs_describe`, and `vbs_benchmarks`; `Void::Configuration::get_env`/`get_env_or`), `Crypto` (`Void::Crypto::Hasher` zero-dep SHA-256), `Archive` (`Void::Archive::create` & `extract_staged`), `Data` (`Void::Data::Toml`, `Void::Json::Strict`), `System` (`Void::Process::spawn`/`communicate_blocking`/`enable_subreaper`, `Void::FileSystem::DirectoryWatcher`/`FileLock`/`reflink_copy_file`/`set_canonical_mtime`/`atomic_symlink_swap`, `Void::Process::SignalWatcher`), `Algorithms` (`Void::Algorithms::topological_order`), `Async` (`Void::Concurrency::ThreadPool`), `Unicode` (`Void::Unicode::validate_utf8`), `Text` (`Void::Str`, `Void::Encoding::Hex`, `Void::Encoding::Url`, `Void::Semver::parse_range`), `Log` (`Void::Log`), `Core` (`Void::Scope::on_exit`), `Time` (`Void::Time::Stopwatch`), and `Testing` (`VOID_TEST`).
|
||||
- **Remaining future design scope**: [Plan 20 Slices 2B/2C & 3](docs/roadmap/20-future-translation-platforms.md) and [Post-v1 Expansion Roadmap](docs/roadmap/21-expansion-roadmap.md) Tracks B–E2/E4 (Track B C driver / Ninja custom-command / foreign module translation, Track C macOS/Windows/cross-compilation, Track D shared HTTP CAS & supply-chain provenance, Track E2–E4 workspaces & daemon) remain planned architectural scope.
|
||||
- **Remaining future design scope**: [Plan 20 Slice 3](docs/roadmap/20-future-translation-platforms.md) and [Post-v1 Expansion Roadmap](docs/roadmap/21-expansion-roadmap.md) Tracks C–D and E2/E3 daemon/E4 (Track C macOS/Windows/cross-compilation, Track D shared HTTP CAS & supply-chain provenance, Track E2 `workspace.cpp`, Track E3 `vbs daemon`, Track E4 `Void::Net`/`Void::Sqlite`, and live `conan` CLI verification) remain planned architectural scope.
|
||||
|
||||
Start with the [roadmap plans](docs/roadmap/README.md), [expansion roadmap](docs/roadmap/21-expansion-roadmap.md),
|
||||
[architecture](docs/roadmap/ARCHITECTURE.md),
|
||||
@@ -80,6 +80,7 @@ All CLI help text (`vbs --help`, `vbs <command> --help`, `vbs compdb --help`, `v
|
||||
- `vbs graph [--project DIR] [--build-dir DIR] [--profile NAME] [--compiler gcc|clang] [--format dot|json]`
|
||||
- `vbs describe [--project DIR] [--build-dir DIR] [--profile NAME] [--compiler gcc|clang]`
|
||||
- `vbs compdb use|show|export|watch ...`
|
||||
- `vbs ide generate|query [--project DIR] [--build-dir DIR] [--profile NAME] [--compiler gcc|clang] [--editor all|clangd|vscode|clion|zed] [--force]`
|
||||
- `vbs watch [--project DIR] [--build-dir DIR] [--profile NAME] [--target NAME]...`
|
||||
- `vbs deps resolve|update [--project DIR] [--build-dir DIR] [--profile NAME] [--offline]`
|
||||
- `vbs install --prefix DIR [--project DIR] [--build-dir DIR] [--profile NAME] [--compiler gcc|clang] [--package-name NAME] [--package-version VER] [--component NAME] [--no-cmake-export] [--no-native-export]`
|
||||
|
||||
Reference in new issue
Block a user