diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-12-03 10:17:46 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-12-04 18:03:44 +0100 |
commit | 240d3eb488947e57d690caf245e43eeef0cc7f1f (patch) | |
tree | 600eafaed2deb89f8aca70a75967001faa5a7f42 /src/buildtool/computed_roots/artifacts_root.hpp | |
parent | f2c7776e00d6a0ed9f601fbfbf082cab0393d640 (diff) | |
download | justbuild-240d3eb488947e57d690caf245e43eeef0cc7f1f.tar.gz |
ArtifactsRoot: support rehash-function
When constructing a git tree out of an artifact stage, support
rehashing the artifact digests on the fly, so that artifact stages
not based on GitSHA1 can be supported as well.
Diffstat (limited to 'src/buildtool/computed_roots/artifacts_root.hpp')
-rw-r--r-- | src/buildtool/computed_roots/artifacts_root.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/buildtool/computed_roots/artifacts_root.hpp b/src/buildtool/computed_roots/artifacts_root.hpp index 6ed727fa..95b72877 100644 --- a/src/buildtool/computed_roots/artifacts_root.hpp +++ b/src/buildtool/computed_roots/artifacts_root.hpp @@ -19,6 +19,7 @@ #include <string> #include "src/buildtool/build_engine/expression/expression_ptr.hpp" +#include "src/buildtool/execution_api/utils/rehash_utils.hpp" #include "src/buildtool/multithreading/async_map_consumer.hpp" /// \brief Compute to the git tree identifier, as hex string, corresponding to @@ -28,7 +29,8 @@ /// \param logger Logger to report problems; will be called with the fatal /// property in case of error auto ArtifactsRoot(ExpressionPtr const& stage, - AsyncMapConsumerLoggerPtr const& logger) - -> std::optional<std::string>; + AsyncMapConsumerLoggerPtr const& logger, + std::optional<RehashUtils::Rehasher> const& rehash = + std::nullopt) -> std::optional<std::string>; #endif |