feat(daemon): materialize project dependencies for daemon build requests
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 3s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 58s

This commit is contained in:
faumaray committed 2026-12-03 19:32:06 +03:00
1 parent 42172a24f8
commit f5c0c9f09d
12 files changed
+580 -287

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
#pragma once
#include <Void/Build.hpp>
#include <Void/Build/Package/Fetch.hpp>
#include <Void/Build/Package/Lockfile.hpp>
#include <Void/Build/Package/RegistryClient.hpp>
#include <Void/Build/Package/Solver.hpp>
#include <Void/Build/Package/Toml.hpp>
#include <Void/Functional/Error.hpp>
#include <Void/Functional/Result.hpp>
#include <filesystem>
#include <optional>
#include <string>
#include <utility>
#include <vector>
namespace Void::Build::Package {
struct ResolvedDepMaterialization {
LockContextRecord lock_context;
std::vector<std::pair<DependencyRecord, MaterializedSource>> materialized;
};
struct ResolveOptions {
std::filesystem::path project_root;
std::filesystem::path build_root;
std::optional<PinnedLock> pinned_lock;
bool offline{false};
bool allow_upgrade{false};
std::vector<std::string> trusted_public_keys;
std::string default_registry_url; // Fallback when a dependency has no .registry()
RegistryAuth registry_auth;
};
// Shared dependency resolution + live registry fetching + safe archive extraction + lock context
// builder for `vbs deps resolve|update`, `vbs build`, `vbs test`, and the daemon.
[[nodiscard]] Void::Result::Result<ResolvedDepMaterialization, Void::Result::Error>
resolve_and_materialize_dependencies(const ProfileContext &ctx,
const std::vector<NormalizedDependency> &merged_deps,
const ResolveOptions &options);
} // namespace Void::Build::Package