feat(daemon): materialize project dependencies for daemon build requests
This commit is contained in:
1 parent
42172a24f8
commit
f5c0c9f09d
12 files changed
+580
-287
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user