1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Fixed issue where "Compile failed" message caused tests to fail

This commit is contained in:
Brian Fiete 2025-02-02 06:42:48 -08:00
parent 94f02b724d
commit eecc6540a2
2 changed files with 9 additions and 2 deletions

View file

@ -11460,7 +11460,7 @@ namespace IDE
if (mTestManager != null) if (mTestManager != null)
mTestManager.BuildFailed(); mTestManager.BuildFailed();
if (mVerbosity > .Quiet) if (mVerbosity > .Quiet)
OutputLineSmart("ERROR: Compile failed. Total build time: {0:0.00}s", stopwatch.ElapsedMilliseconds / 1000.0f); OutputLineSmart("ERROR-SOFT: Compile failed. Total build time: {0:0.00}s", stopwatch.ElapsedMilliseconds / 1000.0f);
mLastCompileFailed = true; mLastCompileFailed = true;
if (mRunningTestScript) if (mRunningTestScript)

View file

@ -287,7 +287,7 @@ namespace IDE.ui
public void WriteSmart(StringView text) public void WriteSmart(StringView text)
{ {
for (var line in text.Split('\n')) LineLoop: for (var line in text.Split('\n'))
{ {
if (@line.Pos != 0) if (@line.Pos != 0)
Write("\n"); Write("\n");
@ -302,6 +302,13 @@ namespace IDE.ui
mQueuedDisplayChanges.Add(QueuedDisplayChange(mQueuedText.Length, "ERROR".Length, (.)SourceElementType.BuildError)); mQueuedDisplayChanges.Add(QueuedDisplayChange(mQueuedText.Length, "ERROR".Length, (.)SourceElementType.BuildError));
} }
if (line.StartsWith("ERROR-SOFT:"))
{
var str = scope:LineLoop String(line);
str.Replace("ERROR-SOFT", "ERROR");
line = str;
mQueuedDisplayChanges.Add(QueuedDisplayChange(mQueuedText.Length, "ERROR".Length, (.)SourceElementType.BuildError));
}
if ((line.StartsWith("WARNING:")) || (line.StartsWith("WARNING("))) if ((line.StartsWith("WARNING:")) || (line.StartsWith("WARNING(")))
{ {
mQueuedDisplayChanges.Add(QueuedDisplayChange(mQueuedText.Length, "WARNING".Length, (.)SourceElementType.BuildWarning)); mQueuedDisplayChanges.Add(QueuedDisplayChange(mQueuedText.Length, "WARNING".Length, (.)SourceElementType.BuildWarning));