From 5f6ff55e97104e46c1b5c2c94b39ea0fca35ca7c Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Thu, 7 Mar 2024 15:44:28 +0100 Subject: just: Replace singletons for progress tracking and statistics... ...with regular instances that have controlled life-times. This avoids race conditions in tracking and reporting the results of analysis and build, as the serve endpoint can orchestrate multiple builds at the same time asynchronously. As a bonus side-effect this also ensures the correctness of the progress reporting per orchestrated build. --- src/buildtool/build_engine/target_map/export.hpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/buildtool/build_engine/target_map/export.hpp') diff --git a/src/buildtool/build_engine/target_map/export.hpp b/src/buildtool/build_engine/target_map/export.hpp index 7f470706..3f43796b 100644 --- a/src/buildtool/build_engine/target_map/export.hpp +++ b/src/buildtool/build_engine/target_map/export.hpp @@ -21,12 +21,14 @@ #include "src/buildtool/build_engine/target_map/result_map.hpp" #include "src/buildtool/build_engine/target_map/target_map.hpp" #include "src/buildtool/common/repository_config.hpp" +#include "src/buildtool/common/statistics.hpp" #include "src/buildtool/storage/target_cache.hpp" void ExportRule(const nlohmann::json& desc_json, const BuildMaps::Target::ConfiguredTarget& key, const gsl::not_null& repo_config, const ActiveTargetCache& target_cache, + const gsl::not_null& stats, const BuildMaps::Target::TargetMap::SubCallerPtr& subcaller, const BuildMaps::Target::TargetMap::SetterPtr& setter, const BuildMaps::Target::TargetMap::LoggerPtr& logger, -- cgit v1.2.3