From f389c03970b0b48b3300340d2cd54a0af6f44fa8 Mon Sep 17 00:00:00 2001 From: Vincent Dondain Date: Thu, 1 Nov 2018 14:08:31 -0400 Subject: [PATCH] [msbuild] Don't log notices as errors (#5067) - Fixes #5065: [Xcode10.1]Could not get traitsetID for iPhone11,6 error while building with Xcode10.1 and new iOS device (https://github.com/xamarin/xamarin-macios/issues/5065). - `actool` in Xcode 10.1 now outputs some `com.apple.actool.notices` (we might not have hit that before) and those make the task fail because we log them as errors (we shouldn't). * Lower notice to LogMessage Update other LogMessage to output "tool notice :" --- .../Tasks/XcodeCompilerToolTask.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/XcodeCompilerToolTask.cs b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/XcodeCompilerToolTask.cs index 1fd816354d..2fd23ed228 100644 --- a/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/XcodeCompilerToolTask.cs +++ b/msbuild/Xamarin.MacDev.Tasks.Core/Tasks/XcodeCompilerToolTask.cs @@ -211,7 +211,7 @@ namespace Xamarin.MacDev.Tasks if (plist.TryGetValue (string.Format ("com.apple.{0}.document.notices", ToolName), out array)) { foreach (var item in array.OfType ()) { if (item.TryGetValue ("message", out message)) - Log.LogMessage (MessageImportance.Low, "{0}", message.Value); + Log.LogMessage (MessageImportance.Low, "{0} notice : {1}", ToolName, message.Value); } } @@ -235,7 +235,7 @@ namespace Xamarin.MacDev.Tasks array = valuePair.Value as PArray; foreach (var item in array.OfType ()) { if (item.TryGetValue ("message", out message)) - Log.LogMessage (MessageImportance.Low, "{0}", message.Value); + Log.LogMessage (MessageImportance.Low, "{0} notice : {1}", ToolName, message.Value); } } } @@ -270,7 +270,7 @@ namespace Xamarin.MacDev.Tasks if (plist.TryGetValue (string.Format ("com.apple.{0}.notices", ToolName), out array)) { foreach (var item in array.OfType ()) { if (item.TryGetValue ("description", out message)) - Log.LogError (ToolName, null, null, file.ItemSpec, 0, 0, 0, 0, "{0}", message.Value); + Log.LogMessage (MessageImportance.Low, "{0} notice : {1}", ToolName, message.Value); } } }