feat: lifecycle commands and native compiler caching (G1, G7)
VoidBuildSystem CI / 1 · Requirements (push) Successful in 3s
VoidBuildSystem CI / 2B · Windows Wine build (debug) (push) Successful in 2m30s
VoidBuildSystem CI / 2A · Linux build (debug) (push) Successful in 2m40s
VoidBuildSystem CI / 2A · Linux build (coverage) (push) Successful in 3m4s
VoidBuildSystem CI / 2A · Linux build (sanitizers) (push) Successful in 4m16s
VoidBuildSystem CI / 2A · Linux build (relwithdebinfo) (push) Successful in 5m48s
VoidBuildSystem CI / 2B · Windows Wine build (relwithdebinfo) (push) Successful in 4m18s
VoidBuildSystem CI / 3A · Linux test (coverage) (push) Failing after 1m20s
VoidBuildSystem CI / 3A · Linux test (sanitizers) (push) Successful in 29s
VoidBuildSystem CI / 3B · Windows Wine test (debug) (push) Successful in 16s
VoidBuildSystem CI / 3B · Windows Wine test (relwithdebinfo) (push) Successful in 18s
VoidBuildSystem CI / 3A · Linux test (debug) (push) Failing after 6m4s
VoidBuildSystem CI / 3A · Linux test (relwithdebinfo) (push) Failing after 6m28s
VoidBuildSystem CI / 4A2 · VBS installers (linux target) (push) Skipped
VoidBuildSystem CI / 4A2 · VBS installers (windows target) (push) Skipped
VoidBuildSystem CI / 5 · Release (push) Skipped

G1 (start):
- vbs run builds an executable target, passes program args through `--`,
  inherits stdio via Void::Process (interactive programs keep the terminal)
  and returns the program's exit code; Windows targets run under Wine.
- vbs metadata emits a schema-versioned workspace document built with
  Void::Json::Strict: roots, profile/compiler, targets (sources, includes,
  links, labels, install rules), dependencies and the lockfile revision.
- vbs why walks the target graph root -> target, or explains a dependency
  and the targets linking it.
- vbs add NAME[@RANGE] / vbs remove NAME edit vbs.deps.toml (canonical,
  comment-preserving block editing), validate ranges with
  Void::Semver::parse_range and refresh vbs.lock via the resolver.
- --frozen implies --locked --offline for build/test/run.

G7 (native caching):
- --native-cache off|auto|ccache|sccache (or VBS_NATIVE_CACHE) prepends
  ccache/sccache to compile actions only; the wrapper and real compiler are
  part of the action key, archive/link actions are untouched, and
  vbs doctor reports availability.

VoidLibrary reuse: Void::Process (spawn with inherited stdio),
Void::Json::Strict (metadata document), Void::Str (trim/split/prefix),
Void::Semver (range validation), plus the existing SDK helpers
(target_kind_name/visibility_name) instead of local duplicates.

Verified: lifecycle_run_metadata_why_and_manifest_editing,
native_cache_wrapper_is_lowered_into_compile_commands and
native_cache_wraps_compile_actions pass; CLI contracts pass; clang-format
clean.
This commit is contained in:
faumaray committed 2026-12-06 19:20:39 +03:00
1 parent a12470c072
commit 76f1e2a48c
11 files changed
+1240 -2

No files matched your search

+8
View File
@@ -401,6 +401,14 @@ Stage: VERIFIED — Plans 01–19 + Plan 20 Slices 1–2C + Track A + Track B (B
## Remaining future scope
- **Wave 147 (Lifecycle CLI and native compiler caching, G1/G7 start)**:
- `vbs run` builds and executes an executable target with program arguments and passes the exit code through; it uses Void::Process with inherited stdio so interactive programs keep the terminal, and runs Windows targets under Wine.
- `vbs metadata` emits a schema-versioned workspace document (roots, profile, compiler, targets with sources/includes/links/labels/install rules, dependencies, lockfile revision) built with `Void::Json::Strict` instead of hand-written JSON.
- `vbs why NAME` explains a target's dependents (root -> target paths) or a dependency's declaring record and linked targets.
- `vbs add NAME[@RANGE]` and `vbs remove NAME` edit `vbs.deps.toml` (canonical, comment-preserving block append/removal), validate version ranges through `Void::Semver::parse_range`, and refresh `vbs.lock` through the existing resolver (`--no-lock` skips it).
- `--frozen` on `build`/`test`/`run` implies `--locked --offline`.
- **Native compiler caching**: `--native-cache off|auto|ccache|sccache` (or `VBS_NATIVE_CACHE`) prepends ccache/sccache to compile actions only; the wrapper and real compiler are part of the action key, archives/links are untouched, and `vbs doctor` reports availability. Verified deterministically by `FullV1Tests.native_cache_wrapper_is_lowered_into_compile_commands` and end to end when the tool is installed (`native_cache_wraps_compile_actions`).
- **Superiority plan ([22-superiority-and-gaps.md](../roadmap/22-superiority-and-gaps.md), 2026-12-05)**: revised platform strategy - **macOS deferred**, **Windows via MinGW-w64 cross-compilation + Wine execution** (`dev cpp-gcc -p pkgsCross.mingwW64.stdenv.cc`, `dev cpp-gcc -p wine64`), native MSVC deferred; plus packaging parity (ZIP/DEB/RPM), IDE ecosystem, migration tooling, test-runner parity, benchmarks, CI runners, and remote execution in prioritized order.
- **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.
+1
View File
@@ -146,4 +146,5 @@ Base HEAD: `fe0d1a6`
| Wave 144 (NuGet generator) | `--archive-format nuget`: `.nupkg` with nuspec, OPC parts and `runtimes/<rid>/native` assets | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; Python validates the package, install test passes, full CTest 8/8) | `src/Install/Installer.cpp`, `src/Main.cpp`, `tests/FullV1Tests.cpp`, docs |
| Wave 145 (Coverage reporting) | `vbs test --coverage DIR`; gcov JSON -> lcov + summary | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; E2E passes, full CTest 8/8) | `include/Void/Build/Report/Coverage.hpp`, `src/Report/Coverage.cpp`, `src/Main.cpp`, `tests/FullV1Tests.cpp`, docs |
| Wave 146 (CI hardening, explainability, shared caches, CLI surface, migration breadth) | CI image tool upgrades + coverage lane; test `--repeat/--retry/--shuffle/--stop-on-failure`; `vbs explain`; `--trace` Chrome traces; shared descriptor/probe caches; `vbs completions`/`vbs man`; `vbs migrate --from meson`; `vbs init --template`; `vbs presets --export`; MSI installer | COMPLETE & VERIFIED (GCC 16.2; new FullV1Tests cases for every feature pass, CLI contract suite passes; cold build 3897 -> 755 ms measured) | `src/Main.cpp`, `src/Execution/Scheduler.{hpp,cpp}`, `src/Cli/CommandModel.{hpp,cpp}`, `src/Config/{Frontend,Scaffold,CmakeImport}.cpp`, `src/Toolchain/Driver.cpp`, `include/Void/Build/Util/UserCache.hpp`, `.gitea/workflows/ci.yml`, [Void/CI-Images](https://git.faumaray.com/Void/CI-Images), `tests/{FullV1Tests,CliContracts}`, docs |
| Wave 147 (Lifecycle CLI + native caching) | `vbs run` (Void::Process inherited stdio, exit-code passthrough, Wine), `vbs metadata` (StrictJson schema v1), `vbs why`, `vbs add`/`vbs remove` (Semver-validated manifest editing + lock refresh), `--frozen`, `--native-cache off/auto/ccache/sccache` with doctor reporting | COMPLETE & VERIFIED for the implemented commands (GCC 16.2; `lifecycle_run_metadata_why_and_manifest_editing`, `native_cache_wrapper_is_lowered_into_compile_commands`, `native_cache_wraps_compile_actions` pass; CLI contracts pass) | `src/Main.cpp`, `src/Toolchain/Driver.{hpp,cpp}`, `src/Package/Manifest.{hpp,cpp}`, `include/Void/Build/Package/Manifest.hpp`, `tests/{FullV1Tests,CliContracts}`, docs |
| Future (Plans 23–24) | Gap closure and superiority tracks | PLANNED (see the plans for per-track acceptance gates) | [23-remaining-upgrade-plan.md](../roadmap/23-remaining-upgrade-plan.md), [24-superiority-tracks.md](../roadmap/24-superiority-tracks.md) |
+9 -1
View File
@@ -1,6 +1,6 @@
# 24 — Superiority tracks: beyond CMake, Meson, build2 and Cargo
Status: **planned (2026-12-06)**. Nothing here is implemented unless it is listed in
Status: **partially implemented (2026-12-06)**. Tracks G1 (run/metadata/why/add/remove/--frozen) and G7's native compiler-cache slice are implemented (Wave 147); everything else is planned. Nothing else is implemented unless it is listed in
[Plan 23 §1](23-remaining-upgrade-plan.md#1-verified-baseline). Interfaces are proposals.
Plan 23 closes the remaining *gaps*. This plan is different: it lists what would make VBS
@@ -109,6 +109,10 @@ the concrete acceptance gate.
### G1 — Cargo-grade lifecycle CLI *(S–M per command)*
**Status: partially implemented (Wave 147).** Done: `run`, `metadata`, `why`, `add`, `remove`,
`--frozen`. Pending: `new`, `bench`, `doc`, `fmt`, `lint`, `tree`, `outdated`, `update -p`,
`audit`, `deny`, `vendor`, `install-binary`.
**Beats:** Cargo (parity), CMake/Meson/build2 (they have no unified lifecycle).
| Planned command | Behaviour |
@@ -327,6 +331,10 @@ a minimal DAP client and reads a breakpoint hit; a sample plugin provider builds
### G7 — Speed and CI economics *(M–L)*
**Status: partially implemented (Wave 147).** Done: native compiler caching
(`--native-cache off|auto|ccache|sccache`, wrapper part of the action key, `vbs doctor`
reporting). Pending: `--affected`, daemon watch loop, build scans, cache analytics.
**Beats:** all four on CI cost; Cargo/Ninja are fast locally but have no affected-test selection
or build scans.