diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-03-06 17:17:16 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-03-11 15:59:05 +0100 |
commit | b885deebf9fc02b9f1e849d91de93fadcfb71a73 (patch) | |
tree | a26b4f9ad05e479b51b97a1a4c489525243c241a /src/buildtool/build_engine/target_map/export.cpp | |
parent | 1bba42d5168a13dbebda8820fc5e28df1d401669 (diff) | |
download | justbuild-b885deebf9fc02b9f1e849d91de93fadcfb71a73.tar.gz |
just analyse: Use explicit target cache instance
The serve endpoint always has to access the correctly sharded
target cache, including during analysis. For this purpose, the
target cache instance interrogated during analysis has to be
explicitly provided.
Diffstat (limited to 'src/buildtool/build_engine/target_map/export.cpp')
-rw-r--r-- | src/buildtool/build_engine/target_map/export.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buildtool/build_engine/target_map/export.cpp b/src/buildtool/build_engine/target_map/export.cpp index 25e78d32..c9aed0e3 100644 --- a/src/buildtool/build_engine/target_map/export.cpp +++ b/src/buildtool/build_engine/target_map/export.cpp @@ -97,6 +97,7 @@ void ExportRule( const nlohmann::json& desc_json, const BuildMaps::Target::ConfiguredTarget& key, const gsl::not_null<RepositoryConfig*>& repo_config, + const ActiveTargetCache& target_cache, const BuildMaps::Target::TargetMap::SubCallerPtr& subcaller, const BuildMaps::Target::TargetMap::SetterPtr& setter, const BuildMaps::Target::TargetMap::LoggerPtr& logger, @@ -117,8 +118,7 @@ void ExportRule( if (target_cache_key) { // first try to get value from local target cache - auto target_cache_value = - Storage::Instance().TargetCache().Read(*target_cache_key); + auto target_cache_value = target_cache.Read(*target_cache_key); bool from_just_serve{false}; #ifndef BOOTSTRAP_BUILD_TOOL |