refactor: build from conventions, adopt ConsoleLogger, and colorize TTY output
This commit is contained in:
1 parent
ea6ac852e7
commit
83ec08390f
23 files changed
+172
-151
No files matched your search
@@ -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.
|
||||
@@ -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) |
|
||||
@@ -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).
|
||||
|
||||
Reference in new issue
Block a user