refactor: build from conventions, adopt ConsoleLogger, and colorize TTY output
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 4s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 10s

This commit is contained in:
faumaray committed 2026-12-04 23:42:50 +03:00
1 parent ea6ac852e7
commit 83ec08390f
23 files changed
+172 -151

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
# Declaration SDK (`Void::Build`)
Status: Full v1 declaration SDK, JSON `schema_version: 1`.
Documents [include/Void/Build.hpp](file:///home/faumaray/Projects/VoidBuildSystem/include/Void/Build.hpp) and [src/Build.cpp](file:///home/faumaray/Projects/VoidBuildSystem/src/Build.cpp).
Documents [include/Void/Build.hpp](file:///home/faumaray/Projects/VoidBuildSystem/include/Void/Build.hpp) and [sdk/Build.cpp](file:///home/faumaray/Projects/VoidBuildSystem/sdk/Build.cpp).
The SDK uses namespace `Void::Build`, `PascalCase` types/enum constants, and `snake_case` functions/methods. Future incompatible schema changes increment `schema_version`.
+3 -3
View File
@@ -13,10 +13,10 @@ Pinned VoidLibrary revision: `0002e74a7da94a756f55a4a5574d20b77736c185` (upstrea
| `VL-005` | Streaming HTTP client & TLS default (`Void::Net::HttpClient`) | Implemented (requires Boost + OpenSSL) | Local loopback POSIX + `curl` adapter retained for minimal `dev cpp-gcc` (no Boost/OpenSSL) |
| `VL-006` | Deterministic archive creation & safe staged extraction (`Void::Archive::create`, `extract_staged`) | Implemented (zero external deps for `.tar`) | **Adopted** (`src/Package/Archive.cpp`, always linked via `Void::Archive`) |
| `VL-007` | Zero-dependency built-in SHA-256 / BLAKE2b (`Void::Crypto::Hasher`) | Implemented (zero external deps when OpenSSL absent) | **Adopted** (`include/Void/Build/Util/Sha256.hpp`, `src/Util/Sha256.cpp`, always linked via `Void::Crypto`) |
| `VL-008` | Strict UTF-8 validation (`Void::Json::Strict`, `Void::Unicode::validate_utf8`) | Implemented | **Adopted** (`src/Util/Json.cpp`, `Void::Json::Strict` throughout) |
| `VL-008` | Strict UTF-8 validation (`Void::Json::Strict`, `Void::Unicode::validate_utf8`) | Implemented | **Adopted** (`sdk/Json.cpp`, `Void::Json::Strict` throughout) |
| `VL-009` | Native non-CMake `Void::Testing` registration API | Implemented | **Adopted** (supported alongside `vbs gen-tests` in `src/SelfHost/TestRegistryGen.cpp`) |
| `VL-010` | Advisory `FileLock`, `reflink_copy_file`, `set_canonical_mtime`, `atomic_symlink_swap` (`Void::FileSystem`) | Implemented | **Adopted** (`include/Void/Build/Platform/FileOps.hpp`, `src/Platform/Linux/FileOps.cpp`) |
| `VL-011a` | Subcommands, `option_many`, `positional_many`, `ParseOutcome::Help` (`Void::Argparse::Parser`) | Implemented | **Adopted** (`src/Main.cpp`, `src/Describe.cpp`, `registry/service/Main.cpp`, `benchmarks/EngineBenchmarks.cpp` — 100% auto-generated help) |
| `VL-011a` | Subcommands, `option_many`, `positional_many`, `ParseOutcome::Help` (`Void::Argparse::Parser`) | Implemented | **Adopted** (`src/Main.cpp`, `src/Describe.cpp`, `registry/cli/Main.cpp`, `benchmarks/EngineBenchmarks.cpp` — 100% auto-generated help) |
| `VL-011b` | Optional SQLite3 FetchContent (`Void::Sqlite`) | Implemented (`VOID_FETCH_SQLITE3`) | Opportunistic when system `SQLite3` is installed (`VOID_FETCH_SQLITE3=OFF` to keep offline configures fast); journaled atomic CAS store retained |
| `VL-012` | Naming consistency observation | Noted | VBS strictly uses `Void::Build`, `PascalCase` types/enums/paths, `snake_case` functions/methods |
| `VL-013` | Shorthand SemVer ranges (`^1.0`, `~1.2`, `>=1.2 <2`) in `Void::Semver::parse_range` | Implemented | **Adopted** (`src/Package/Solver.cpp` delegates directly to `Void::Semver::parse_range`) |
@@ -33,7 +33,7 @@ Pinned VoidLibrary revision: `0002e74a7da94a756f55a4a5574d20b77736c185` (upstrea
- **`VL-003` (`Void::FileSystem::DirectoryWatcher`)**: `src/Watch/Linux/Watcher.cpp` wraps `Void::FileSystem::DirectoryWatcher` for recursive Linux `inotify` observation, ignore predicates, and `RescanRequired` overflow handling.
- **`VL-006` (`Void::Archive`)**: `CMakeLists.txt`, `cmake/VoidDependency.cmake`, `recipes/VoidLibrary/VoidLibraryRecipe.cpp`, and `recipes/SelfHost/VbsSelfHostRecipe.cpp` unconditionally enable `Void::Archive` (`VOID_ARCHIVE_HAS_LIBARCHIVE=0` built-in USTAR/PAX tar), and `src/Package/Archive.cpp` delegates archive creation and staged security-checked extraction to `Void::Archive::create` and `Void::Archive::extract_staged` + `StagedTree::publish`.
- **`VL-007` (`Void::Crypto`)**: `Void::Crypto` (`VOID_CRYPTO_HAS_OPENSSL=0` built-in FIPS 180-4 SHA-256) is unconditionally linked, and `src/Util/Sha256.cpp` delegates directly to `Void::Crypto::Hasher`, `Void::Crypto::sha256`, and `Void::Crypto::sha256_file`.
- **`VL-008` (`Void::Json::Strict` / `Void::Unicode`)**: Strict UTF-8 validation is active across `Void::Json::Strict` and `src/Util/Json.cpp`.
- **`VL-008` (`Void::Json::Strict` / `Void::Unicode`)**: Strict UTF-8 validation is active across `Void::Json::Strict` and `sdk/Json.cpp`.
- **`VL-010` (`Void::FileSystem`)**: `src/Platform/Linux/FileOps.cpp` delegates `FileLock`, `copy_isolated`, `set_canonical_mtime`, and `atomic_swap_symlink` directly to `Void::FileSystem::FileLock`, `reflink_copy_file`, `set_canonical_mtime`, and `atomic_symlink_swap`.
- **`VL-011a` (`Void::Argparse::Parser`)**: Every VBS executable (`vbs`, `vbs-registry`, `vbs_describe`, `vbs_benchmarks`) uses `Void::Argparse::Parser::parse_detailed()` with native `subcommand()`, `option_many()`, `positional_many()`, and `require_subcommand()` — eliminating all custom help strings, manual `--help` checks, and manual repeatable-argument slicing.
- **`VL-013` (`Void::Semver::parse_range`)**: `src/Package/Solver.cpp` calls `Void::Semver::parse_range()` directly without local range normalization.
+7
View File
@@ -273,6 +273,13 @@ Stage: VERIFIED — Plans 01–19 + Plan 20 Slices 1–2C + Track A + Track B (B
- **Wave 90 (`vbs verify --trusted-public-key` & RFC 7232 If-None-Match)**: `vbs verify` accepts trusted key sources and rejects untrusted signer keys before verifying. A swarm worker (6/6 tasks) added ETag/304 support to the binary-variant detail endpoint and hardened `If-None-Match` handling per RFC 7232 (weak `W/` prefixes, comma lists, `*`) for all ETag-validated responses.
- **Wave 91 (Convention-Based Self-Build & VoidLibrary Console Logging)**:
- Source membership no longer enumerates files: the SDK lives in `sdk/` (`Build.cpp`, `Json.cpp`), the registry CLI entry in `registry/cli/Main.cpp`, and `build.cpp` plus the self-host recipe use `project.glob("src/**/*.cpp")`, `recipes/**`, `sdk/*.cpp`, and `registry/service/*.cpp`. `Bootstrap::sdk_source_dir` now points at `sdk/`, and `sdk/` joins the snapshot root discovery.
- A real bug was found and fixed: cached dependency paths are now absolute, so a relative `--build-dir` no longer breaks the self-host build (`std::filesystem::absolute` in `materialize_dependency_source`).
- Logging now uses VoidLibrary's `Void::Logging::ConsoleLogger` through `Void::Log::make_sink`, removing the hand-written sink and the `vbs` prefix (`[Info] [Deps] ...`); the `Log` module is enabled in every configuration.
- **Wave 92 (TTY-Aware CLI Help & Log Colors)**: `ConsoleLogger` now installs a `PatternFormatter` with `ColorPolicy::defaults()` when stderr is a terminal, so log levels are colored (previously the default policy was disabled); CLI help is colorized (bold section headers/usage, cyan commands and options) when stdout is a terminal. `NO_COLOR` and the new global `--no-color` flag disable both.
## Remaining future scope
- **Post-v1 Expansion Roadmap ([21-expansion-roadmap.md](../roadmap/21-expansion-roadmap.md) & [20-future-translation-platforms.md](../roadmap/20-future-translation-platforms.md))**: Track C (macOS/Windows ports + dual-profile cross-compilation) and dedicated external editor plugins remain planned; Track D3 signing (SBOM, Ed25519 primitives, trusted-key enforcement/distribution, binary-variant signing/distribution) and Track E3 daemon capabilities are implemented, and Track E4 now uses `Void::Net` for the registry client/server and remote cache plus `Void::Sqlite` for the StateStore when available.
+2
View File
@@ -94,4 +94,6 @@ Base HEAD: `fe0d1a6`
| Wave 88 (Track C1 boundaries) | Windows compile-time boundaries for the daemon socket and registry POSIX HTTP; `_putenv_s` branches for workspace env vars | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; full CTest 8/8) | `src/Daemon/Daemon.cpp`, `src/Main.cpp`, `registry/service/HttpServer.cpp`, docs |
| Wave 89 (Binaries show + install file list) | `fetch_binary_detail`/`vbs binaries show`; swarm added bounded sorted `installed_files` to daemon install | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; Registry and Daemon tests pass, full CTest 8/8) | `include/Void/Build/Package/RegistryClient.hpp`, `src/Package/RegistryClient.cpp`, `src/Daemon/Daemon.cpp`, `src/Main.cpp`, `tests/{RegistryTests,DaemonTests}.cpp`, `tests/CliContracts.cmake`, docs |
| Wave 90 (Verify trust + RFC 7232) | `vbs verify --trusted-public-key/--trusted-key-file`; swarm added binary-detail ETag and RFC 7232 If-None-Match matching | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; CLI contract and Registry suite pass, full CTest 8/8) | `src/Main.cpp`, `registry/service/RegistryService.cpp`, `tests/{RegistryTests,CliContracts}.cmake`, docs |
| Wave 91 (Convention-based self-build + ConsoleLogger) | globs/conventions in `build.cpp` and the self-host recipe; `sdk/` and `registry/cli/` layout; absolute dependency cache paths; `Void::Logging::ConsoleLogger` without the `vbs` prefix | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; bootstrap build, self-build with absolute AND relative build dirs, SDK 17/17, full CTest 8/8) | `build.cpp`, `recipes/SelfHost/VbsSelfHostRecipe.cpp`, `sdk/`, `registry/cli/`, `src/Main.cpp`, `src/Package/Fetch.cpp`, `src/Config/Frontend.cpp`, `cmake/`, docs |
| Wave 92 (CLI/log colors) | Colored `ConsoleLogger` levels and colorized help on TTYs; `NO_COLOR` + `--no-color` | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; PTY checks show ANSI codes for help and logs) | `src/Main.cpp`, docs |
| Future (Plan 20 Slice 3 / Tracks C, E3 editor extensions) |"}] Live `conan` CLI verification; macOS/Windows/cross-compile; binary-variant signing and key distribution; daemon-side dependency materialization and editor plugins; `Void::Net`/`Void::Sqlite` alignment | PLANNED (unimplemented) | [21-expansion-roadmap.md](../roadmap/21-expansion-roadmap.md), [20-future-translation-platforms.md](../roadmap/20-future-translation-platforms.md) |
+20
View File
@@ -1319,6 +1319,26 @@ dev cpp-gcc -c build/pinned/bin/vbs_v1_tests --suite Daemon --no-color
absolute paths under the prefix) by the prior swarm's queued edits.
- Full CTest on the final tree: **8 / 8 passed** in 267.99 s.
## Convention-Based Self-Build, ConsoleLogger & Colors (GCC 16.2, pin `0002e74`)
- Source membership now comes from `project.glob(...)` in `build.cpp` and the self-host recipe
(`sdk/*.cpp`, `src/**/*.cpp`, `recipes/**/*.cpp`, `registry/service/*.cpp`), with the SDK in
`sdk/` and the registry CLI entry in `registry/cli/Main.cpp`.
- Bootstrap build (CMake): exit 0. `vbs_sdk_tests`: **17 / 17 passed**.
- Real `vbs` self-build (root `build.cpp`): **success** with an absolute build dir (43 actions,
linked `vbs`) and, after making dependency cache paths absolute, with a **relative** build dir
(43 actions). The self-built binary reports `vbs 0.1.0`.
- Self-host suite (stage builds through `VbsSelfHostRecipe`) passes after fixing absolute glob
patterns (`expand_glob` now anchors absolute patterns at the project root) and linking
`Void::Log`.
- Logging uses `Void::Logging::ConsoleLogger`; the `vbs` prefix is gone (`[Info] [Deps] ...`).
Under a PTY (`script -qec ...`), help shows ANSI bold/cyan and log levels show ANSI color
(`[<96mInfo<0m]`); `NO_COLOR`/`--no-color` disable both.
- Full CTest on a fresh build: **8 / 8 passed** in 290.25 s.
- Note: one intermediate CTest run had its shared build directory deleted mid-run by an
unidentified external actor; a fresh configure/build/CTest is fully green, and the anomaly is
not attributable to VBS code.
## Limits and Unrun Checks
1. **HTTPS git fetch**: the host shell is proxy-restricted, but the Docker container could clone `https://git.faumaray.com/Void/VoidLibrary.git`; the pinned commit `3e254055e081a104f08df68dde39711bc7813518` was fetched directly for the verification above. A separate configure against the local `/home/faumaray/Projects/Library` checkout via `VBS_VOID_SOURCE_DIR` also succeeded (development-only override, checkout unmodified).
+1 -1
View File
@@ -12,7 +12,7 @@ Authority: [requirements](REQUIREMENTS.md), [architecture](ARCHITECTURE.md),
| Part | Status | Primary Implementation |
| --- | --- | --- |
| [01 — Bootstrap and declaration SDK](01-bootstrap-sdk.md) | Implemented & Verified | [Build.hpp](../../include/Void/Build.hpp), [Build.cpp](../../src/Build.cpp) |
| [01 — Bootstrap and declaration SDK](01-bootstrap-sdk.md) | Implemented & Verified | [Build.hpp](../../include/Void/Build.hpp), [Build.cpp](../../sdk/Build.cpp) |
| [02 — Native C++ configuration frontend](02-configuration-frontend.md) | Implemented & Verified | [Frontend.cpp](../../src/Config/Frontend.cpp) |
| [03 — Targets, usage requirements and action graph](03-targets-action-graph.md) | Implemented & Verified | [Graph.cpp](../../src/Graph/Graph.cpp) |
| [04 — Profiles, target selection and toolchains](04-profiles-toolchains.md) | Implemented & Verified | [Driver.cpp](../../src/Toolchain/Driver.cpp) |