feat: adopt VoidLibrary VL-001..VL-013, self-building build.cpp, live logs, and generated CLI help
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 10s
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 10s
This commit is contained in:
1 parent
ab64147f9d
commit
363fb8200e
33 files changed
+1754
-3155
No files matched your search
@@ -4,7 +4,9 @@
|
||||
#include <Void/Build/Platform/ProcessSupervisor.hpp>
|
||||
#include <Void/Build/Snapshot/Snapshot.hpp>
|
||||
#include <Void/Build/Util/Sha256.hpp>
|
||||
#include <Void/Configuration/Env.hpp>
|
||||
#include <Void/Core/Scope.hpp>
|
||||
#include <Void/Log/Log.hpp>
|
||||
#include <Void/System/Types.hpp>
|
||||
#include <Void/Text/Str.hpp>
|
||||
|
||||
@@ -265,6 +267,26 @@ materialize_dependency_source(const DependencyRecord &dep, const FetchOptions &o
|
||||
|
||||
// 3. Exact pinned Git revision source.
|
||||
if (dep.source_kind == DependencySourceKind::Git) {
|
||||
if (dep.name == "VoidLibrary") {
|
||||
if (auto override_dir = Void::Configuration::get_env("VBS_VOID_SOURCE_DIR");
|
||||
override_dir && !override_dir->empty()) {
|
||||
const std::filesystem::path raw{*override_dir};
|
||||
const auto abs = raw.is_absolute() ? raw : (options.project_root / raw);
|
||||
const auto canon = std::filesystem::weakly_canonical(abs, ec);
|
||||
if (!ec && std::filesystem::is_directory(canon)) {
|
||||
Void::Log::info("Fetch",
|
||||
"Using VBS_VOID_SOURCE_DIR override for 'VoidLibrary': {}",
|
||||
canon.string());
|
||||
MaterializedSource out;
|
||||
out.alias = dep.name;
|
||||
out.source_dir = canon;
|
||||
out.content_identity_hash = dep.revision + "-local";
|
||||
out.from_cache = true;
|
||||
return out;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const auto git_dir =
|
||||
options.cache_dir / "git" / (sanitize_key(dep.name) + "_" + dep.revision);
|
||||
const auto marker = git_dir / ".vbs_verified_rev";
|
||||
@@ -275,6 +297,8 @@ materialize_dependency_source(const DependencyRecord &dep, const FetchOptions &o
|
||||
}
|
||||
|
||||
if (std::filesystem::is_regular_file(marker, ec)) {
|
||||
Void::Log::info("Fetch", "Using cached git dependency '{}' @ {}", dep.name,
|
||||
dep.revision.substr(0, 12));
|
||||
MaterializedSource out;
|
||||
out.alias = dep.name;
|
||||
out.source_dir = git_dir;
|
||||
@@ -283,6 +307,9 @@ materialize_dependency_source(const DependencyRecord &dep, const FetchOptions &o
|
||||
return out;
|
||||
}
|
||||
|
||||
Void::Log::info("Fetch", "Fetching git dependency '{}' from {} @ {}...", dep.name,
|
||||
redact_secrets(dep.location), dep.revision.substr(0, 12));
|
||||
|
||||
const bool is_local_repo = dep.location.starts_with("file://") ||
|
||||
dep.location.starts_with("/") ||
|
||||
std::filesystem::is_directory(dep.location, ec);
|
||||
|
||||
Reference in new issue
Block a user