mirror of
https://github.com/flutter/packages.git
synced 2025-08-24 11:39:26 +08:00
Clean Xcode project before analyzing and testing (#6842)
On macOS 14, caching seems to be more aggressive with swiftmodules and can cause conflicts between tests. To mitigate this, use `xcodebuild clean` (cleans Derived Data for the project) as part of `xcodebuild analyze` and `xcodebuild test`. Fixes https://github.com/flutter/flutter/issues/149270. Fixes https://github.com/flutter/flutter/issues/149266.
This commit is contained in:

committed by
GitHub

parent
bb8c7b2bfd
commit
5e88f948b8
@ -111,7 +111,9 @@ class XcodeAnalyzeCommand extends PackageLoopingCommand {
|
||||
print('Running $platform tests and analyzer for $examplePath...');
|
||||
final int exitCode = await _xcode.runXcodeBuild(
|
||||
example.directory,
|
||||
actions: <String>['analyze'],
|
||||
// Clean before analyzing to remove cached swiftmodules from previous
|
||||
// runs, which can cause conflicts.
|
||||
actions: <String>['clean', 'analyze'],
|
||||
workspace: '${platform.toLowerCase()}/Runner.xcworkspace',
|
||||
scheme: 'Runner',
|
||||
configuration: 'Debug',
|
||||
|
Reference in New Issue
Block a user