1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-15 23:04:09 +02:00

Fixed some issues closing workspace while in comptime

This commit is contained in:
Brian Fiete 2025-02-15 15:03:55 -08:00
parent 856490755e
commit 6d3c660273

View file

@ -2516,9 +2516,16 @@ namespace IDE
{ {
if (mDebugger.mIsRunning) if (mDebugger.mIsRunning)
{ {
if (mDebugger.mIsComptimeDebug)
CancelBuild();
mDebugger.StopDebugging(); mDebugger.StopDebugging();
while (mDebugger.GetRunState() != .Terminated) while (mDebugger.GetRunState() != .Terminated)
{ {
if (mDebugger.mIsComptimeDebug)
{
if (!mBfBuildCompiler.IsPerformingBackgroundOperation())
break;
}
mDebugger.Update(); mDebugger.Update();
} }
mDebugger.mIsRunning = false; mDebugger.mIsRunning = false;
@ -2526,6 +2533,9 @@ namespace IDE
} }
mDebugger.DisposeNativeBreakpoints(); mDebugger.DisposeNativeBreakpoints();
mWantsRehupCallstack = false; mWantsRehupCallstack = false;
if (mDebugger.mIsComptimeDebug)
mDebugger.Detach();
} }
void CloseWorkspace() void CloseWorkspace()
@ -9644,29 +9654,32 @@ namespace IDE
if ((processCompileCmd.mHadBeef) && (mVerbosity >= .Normal)) if ((processCompileCmd.mHadBeef) && (mVerbosity >= .Normal))
OutputLine("Beef compilation time: {0:0.00}s", processCompileCmd.mStopwatch.ElapsedMilliseconds / 1000.0f); OutputLine("Beef compilation time: {0:0.00}s", processCompileCmd.mStopwatch.ElapsedMilliseconds / 1000.0f);
var compileInstance = mWorkspace.mCompileInstanceList.Back; if (!mWorkspace.mCompileInstanceList.IsEmpty)
compileInstance.mCompileResult = .Failure;
if (processCompileCmd.mBfPassInstance.mCompileSucceeded)
{
//foreach (var sourceViewPanel in GetSourceViewPanels())
WithSourceViewPanels(scope (sourceViewPanel) =>
{
sourceViewPanel.mHasChangedSinceLastCompile = false;
});
compileInstance.mCompileResult = .Success;
}
else
{ {
var compileInstance = mWorkspace.mCompileInstanceList.Back;
compileInstance.mCompileResult = .Failure; compileInstance.mCompileResult = .Failure;
} if (processCompileCmd.mBfPassInstance.mCompileSucceeded)
{
//foreach (var sourceViewPanel in GetSourceViewPanels())
WithSourceViewPanels(scope (sourceViewPanel) =>
{
sourceViewPanel.mHasChangedSinceLastCompile = false;
});
compileInstance.mCompileResult = .Success;
}
else
{
compileInstance.mCompileResult = .Failure;
}
ProcessBeefCompileResults(processCompileCmd.mBfPassInstance, processCompileCmd.mCompileKind, processCompileCmd.mHotProject, processCompileCmd.mStopwatch); ProcessBeefCompileResults(processCompileCmd.mBfPassInstance, processCompileCmd.mCompileKind, processCompileCmd.mHotProject, processCompileCmd.mStopwatch);
processCompileCmd.mBfPassInstance = null; processCompileCmd.mBfPassInstance = null;
if (mHotResolveState != .None) if (mHotResolveState != .None)
{ {
if (compileInstance.mCompileResult == .Success) if (compileInstance.mCompileResult == .Success)
compileInstance.mCompileResult = .PendingHotLoad; compileInstance.mCompileResult = .PendingHotLoad;
}
} }
if (processCompileCmd.mProfileCmd != null) if (processCompileCmd.mProfileCmd != null)