From 4bf79ef7cd2d8217098c0ce3b757b70647defaeb Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 4 Oct 2023 08:16:00 +0800 Subject: [PATCH 1/2] Filter out DVTCoreDeviceEnabledState warnings from Xcode builds. --- src/briefcase/platforms/macOS/filters.py | 13 +++++++++++++ tests/platforms/macOS/test_XcodeBuildFilter.py | 12 ++++++++++++ 2 files changed, 25 insertions(+) diff --git a/src/briefcase/platforms/macOS/filters.py b/src/briefcase/platforms/macOS/filters.py index f6352201d..14f307ebe 100644 --- a/src/briefcase/platforms/macOS/filters.py +++ b/src/briefcase/platforms/macOS/filters.py @@ -43,6 +43,16 @@ class XcodeBuildFilter: r"\d{4}-\d{2}-\d{2} +\d+:\d{2}:\d{2}\.\d{3} xcodebuild\[\d+:\d+\] +" ) + # Xcode 14 generates the following warning on x86_64 hardware + # 2023-10-04 08:05:21.757 xcodebuild[46899:11335453] DVTCoreDeviceEnabledState: + # DVTCoreDeviceEnabledState_Disabled set via user default + # (DVTEnableCoreDevice=disabled) + DEVICE_ENABLED_STATE_RE = re.compile( + XCODEBUILD_PREFIX + + r"DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled " + r"set via user default \(DVTEnableCoreDevice=disabled\)" + ) + # Xcode 14 generates the following warning when there is a passcode protected device # attached to your computer, even if you're not doing anything to target that device: # --------------------------------------------------------------------- @@ -126,6 +136,9 @@ def __call__(self, line): elif self.LOCKED_DEVICE_ADDITIONAL_RE.match(line): # Ignore the additional 1-line warning about failing to start the service. pass + elif self.DEVICE_ENABLED_STATE_RE.match(line): + # Ignore the DVTCoreDeviceEnabledState warning + pass elif self.DVT_ASSERTIONS_RE.match(line): # Ignore the 4 lines after the DVTAssertions message self.dvt_ignore_count = 4 diff --git a/tests/platforms/macOS/test_XcodeBuildFilter.py b/tests/platforms/macOS/test_XcodeBuildFilter.py index b9425e95f..9b4cbd27f 100644 --- a/tests/platforms/macOS/test_XcodeBuildFilter.py +++ b/tests/platforms/macOS/test_XcodeBuildFilter.py @@ -71,6 +71,18 @@ "Did gyre and gimble in the wabe;", ], ), + # XCode 14: x86_64 "device enabled state" warning. + ( + [ + "'Twas brillig, and the slithy toves", + "2023-10-04 08:05:21.757 xcodebuild[46899:11335453] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)", + "Did gyre and gimble in the wabe;", + ], + [ + "'Twas brillig, and the slithy toves", + "Did gyre and gimble in the wabe;", + ], + ), # Xcode 15: DVTAssertions warning about createItemModels ( [ From 1874722a5781ceab4a13bd06a268c52f20abdc13 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 4 Oct 2023 09:02:27 +0800 Subject: [PATCH 2/2] Add changenote. --- changes/1477.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/1477.misc.rst diff --git a/changes/1477.misc.rst b/changes/1477.misc.rst new file mode 100644 index 000000000..f5d5bb010 --- /dev/null +++ b/changes/1477.misc.rst @@ -0,0 +1 @@ +The DVTCoreDeviceEnabledState warning produced by Xcode 14 on x86_64 is now suppressed.