File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -218,12 +218,16 @@ bool SharedCacheView::Init()
218218
219219 Ref<Settings> settings = GetLoadSettings (GetTypeName ());
220220
221- // If we are a new file (not a database) lets go ahead and set the function workflow.
222- // We do not set the workflow on database as the user might have changed it in load options prior.
223- if (!settings && !GetFile ()->IsBackedByDatabase ())
221+ if (!settings)
224222 {
225223 Ref<Settings> programSettings = Settings::Instance ();
226- programSettings->Set (" analysis.workflows.functionWorkflow" , " core.function.sharedCache" , this );
224+ auto previousWorkflow = programSettings->Get <std::string>(" analysis.workflows.functionWorkflow" , this );
225+
226+ // If we are a new file (not a database) lets go ahead and set the function workflow.
227+ // We do not set the workflow on database as the user might have changed it in load options prior.
228+ // We also need to update usages of `core.function.dsc` to `core.function.sharedCache`
229+ if (!GetFile ()->IsBackedByDatabase () || previousWorkflow == " core.function.dsc" )
230+ programSettings->Set (" analysis.workflows.functionWorkflow" , " core.function.sharedCache" , this );
227231 }
228232
229233 if (m_parseOnly)
You can’t perform that action at this time.
0 commit comments