Skip to content

Commit 3b804f1

Browse files
authored
[macOS] Suppress Xcode 15 createItemModels warning (flutter#138243) (flutter#139782)
As of Xcode 15 on macOS Sonoma, the following message is (repeatedly) output to stderr during builds (repros on non-Flutter apps). It is supppressed in xcode itself, but not when run from the command-line. ``` 2023-11-10 10:44:58.031 xcodebuild[61115:1017566] [MT] DVTAssertions: Warning in /System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot11/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-22267/IDEFoundation/Provisioning/Capabilities Infrastructure/IDECapabilityQuerySelection.swift:103 Details: createItemModels creation requirements should not create capability item model for a capability item model that already exists. Function: createItemModels(for:itemModelSource:) Thread: <_NSMainThread: 0x6000027c0280>{number = 1, name = main} Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide. ``` This suppresses this message from stderr in our macOS build logs. Issue: flutter#135277 Cherry-pick: flutter#139284 https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat *Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.* *List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.* *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
1 parent 54f1b88 commit 3b804f1

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

packages/flutter_tools/lib/src/macos/build_macos.dart

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,27 @@ import 'migrations/remove_macos_framework_link_and_embedding_migration.dart';
2727
/// Filter out xcodebuild logging unrelated to macOS builds:
2828
/// ```
2929
/// xcodebuild[2096:1927385] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
30+
///
3031
/// note: Using new build system
32+
///
33+
/// xcodebuild[61115:1017566] [MT] DVTAssertions: Warning in /System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot11/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-22267/IDEFoundation/Provisioning/Capabilities Infrastructure/IDECapabilityQuerySelection.swift:103
34+
/// Details: createItemModels creation requirements should not create capability item model for a capability item model that already exists.
35+
/// Function: createItemModels(for:itemModelSource:)
36+
/// Thread: <_NSMainThread: 0x6000027c0280>{number = 1, name = main}
37+
/// Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
38+
3139
/// ```
32-
final RegExp _filteredOutput = RegExp(r'^((?!Requested but did not find extension point with identifier|note\:).)*$');
40+
final RegExp _filteredOutput = RegExp(
41+
r'^((?!'
42+
r'Requested but did not find extension point with identifier|'
43+
r'note\:|'
44+
r'\[MT\] DVTAssertions: Warning in /System/Volumes/Data/SWE/|'
45+
r'Details\: createItemModels|'
46+
r'Function\: createItemModels|'
47+
r'Thread\: <_NSMainThread\:|'
48+
r'Please file a bug at https\://feedbackassistant\.apple\.'
49+
r').)*$'
50+
);
3351

3452
/// Builds the macOS project through xcodebuild.
3553
// TODO(zanderso): refactor to share code with the existing iOS code.

packages/flutter_tools/test/commands.shard/hermetic/build_macos_test.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ note: Building targets in dependency order
124124
stderr: '''
125125
2022-03-24 10:07:21.954 xcodebuild[2096:1927385] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
126126
2022-03-24 10:07:21.954 xcodebuild[2096:1927385] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
127+
2023-11-10 10:44:58.030 xcodebuild[61115:1017566] [MT] DVTAssertions: Warning in /System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot11/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-22267/IDEFoundation/Provisioning/Capabilities Infrastructure/IDECapabilityQuerySelection.swift:103
128+
Details: createItemModels creation requirements should not create capability item model for a capability item model that already exists.
129+
Function: createItemModels(for:itemModelSource:)
130+
Thread: <_NSMainThread: 0x6000027c0280>{number = 1, name = main}
131+
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
127132
STDERR STUFF
128133
''',
129134
onRun: () {
@@ -247,6 +252,10 @@ STDERR STUFF
247252
expect(testLogger.errorText, isNot(contains('xcodebuild[2096:1927385]')));
248253
expect(testLogger.errorText, isNot(contains('Using new build system')));
249254
expect(testLogger.errorText, isNot(contains('Building targets in dependency order')));
255+
expect(testLogger.errorText, isNot(contains('DVTAssertions: Warning in')));
256+
expect(testLogger.errorText, isNot(contains('createItemModels')));
257+
expect(testLogger.errorText, isNot(contains('_NSMainThread:')));
258+
expect(testLogger.errorText, isNot(contains('Please file a bug at https://feedbackassistant')));
250259
}, overrides: <Type, Generator>{
251260
FileSystem: () => fileSystem,
252261
ProcessManager: () => FakeProcessManager.list(<FakeCommand>[

0 commit comments

Comments
 (0)