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
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:
1 parent
a12470c072
commit
76f1e2a48c
11 files changed
+1240
-2
No files matched your search
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include <Void/Functional/Error.hpp>
|
||||
#include <Void/Functional/Result.hpp>
|
||||
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
namespace Void::Build::Package {
|
||||
|
||||
// One `[dependencies.<alias>]` entry to add to a TOML manifest. Empty strings are omitted.
|
||||
struct ManifestDependencySpec {
|
||||
std::string alias;
|
||||
std::string package;
|
||||
std::string version;
|
||||
std::string registry;
|
||||
std::string path;
|
||||
std::string git;
|
||||
std::string revision;
|
||||
std::vector<std::string> features;
|
||||
bool build_dependency{false};
|
||||
};
|
||||
|
||||
// Adds (or, with `force`, replaces) a dependency table in `vbs.deps.toml`, preserving the rest of
|
||||
// the file byte-for-byte where possible. The result is re-parsed before it is written.
|
||||
[[nodiscard]] Void::Result::Result<void, Void::Result::Error>
|
||||
add_manifest_dependency(const std::filesystem::path &manifest_path,
|
||||
const ManifestDependencySpec &spec, bool force = false);
|
||||
|
||||
// Removes `[dependencies.<alias>]` (including its `.options` sub-table) and validates the result.
|
||||
[[nodiscard]] Void::Result::Result<void, Void::Result::Error>
|
||||
remove_manifest_dependency(const std::filesystem::path &manifest_path, std::string_view alias);
|
||||
|
||||
// Aliases declared in an existing manifest (empty when the file does not exist).
|
||||
[[nodiscard]] std::vector<std::string>
|
||||
manifest_dependency_aliases(const std::filesystem::path &manifest_path);
|
||||
|
||||
} // namespace Void::Build::Package
|
||||
@@ -55,6 +55,10 @@ struct ToolchainCapabilities {
|
||||
std::filesystem::path slangc; // Slang (and GLSL/HLSL) -> SPIR-V
|
||||
std::filesystem::path dxc; // HLSL -> SPIR-V / DXIL
|
||||
|
||||
// Optional native compiler cache (ccache/sccache) prepended to compile actions. Not part of
|
||||
// the toolchain identity: the wrapper is part of every compile action's command instead.
|
||||
std::string native_cache_executable;
|
||||
|
||||
std::string identity_hash;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user