From 7c52fd526e08c098cc929b21538d6c3b4d30bc59 Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Fri, 15 Jan 2021 15:53:52 -0500 Subject: [PATCH 1/2] Stops logging MSBuild errors when AOT compiler writes to stderr The MonoAotCompiler task will just write to the MSBuild log as info rather than error. Prevents AOT compilation from failing when no real failure occurred --- eng/testing/tests.mobile.targets | 3 ++- src/tasks/Common/Utils.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/eng/testing/tests.mobile.targets b/eng/testing/tests.mobile.targets index ae231929cafce1..fa81b3c07c49d5 100644 --- a/eng/testing/tests.mobile.targets +++ b/eng/testing/tests.mobile.targets @@ -105,6 +105,8 @@ + + - Date: Tue, 19 Jan 2021 12:05:53 -0500 Subject: [PATCH 2/2] Write warnings for stderr --- src/tasks/Common/Utils.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/tasks/Common/Utils.cs b/src/tasks/Common/Utils.cs index bc80df0f42a214..97b8e5cf0e5cf3 100644 --- a/src/tasks/Common/Utils.cs +++ b/src/tasks/Common/Utils.cs @@ -68,7 +68,7 @@ public static string RunProcess( { if (!silent) { - LogInfo(e.Data, outputMessageImportance); + LogWarning(e.Data); outputBuilder.AppendLine(e.Data); } errorBuilder.AppendLine(e.Data); @@ -124,6 +124,12 @@ public static void LogInfo(string? msg, MessageImportance importance=MessageImpo Logger?.LogMessage(importance, msg); } + public static void LogWarning(string? msg) + { + if (msg != null) + Logger?.LogWarning(msg); + } + public static void LogError(string? msg) { if (msg != null)