From b0b223e9f2379c5d6622dcc082692aa94235cd96 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Tue, 8 Apr 2025 15:20:02 -0400 Subject: [SharedCache] Fix older BNDBs not updating workflow to use new workflow name --- view/sharedcache/core/SharedCacheView.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'view/sharedcache/core/SharedCacheView.cpp') diff --git a/view/sharedcache/core/SharedCacheView.cpp b/view/sharedcache/core/SharedCacheView.cpp index 2fe32daf..478ce2d6 100644 --- a/view/sharedcache/core/SharedCacheView.cpp +++ b/view/sharedcache/core/SharedCacheView.cpp @@ -218,12 +218,16 @@ bool SharedCacheView::Init() Ref settings = GetLoadSettings(GetTypeName()); - // If we are a new file (not a database) lets go ahead and set the function workflow. - // We do not set the workflow on database as the user might have changed it in load options prior. - if (!settings && !GetFile()->IsBackedByDatabase()) + if (!settings) { Ref programSettings = Settings::Instance(); - programSettings->Set("analysis.workflows.functionWorkflow", "core.function.sharedCache", this); + auto previousWorkflow = programSettings->Get("analysis.workflows.functionWorkflow", this); + + // If we are a new file (not a database) lets go ahead and set the function workflow. + // We do not set the workflow on database as the user might have changed it in load options prior. + // We also need to update usages of `core.function.dsc` to `core.function.sharedCache` + if (!GetFile()->IsBackedByDatabase() || previousWorkflow == "core.function.dsc") + programSettings->Set("analysis.workflows.functionWorkflow", "core.function.sharedCache", this); } if (m_parseOnly) -- cgit v1.3.1