You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on Xcode 13.3/StaticInternalSwiftSyntaxParser support, I noticed that the .swifttemplate generation started to become a lot more flakey than before and the errors weren't always obvious.. For example:
This is confusing, because it's reported "Build complete! (1.22s)", but for some reason it failed and it wasn't really clear until I realised that the warning about collections.json is something that swift build is printing out to stderr and SwiftTemplate will see that as a failure based on this logic:
This time it appears to be different messages in stderr:
2022-03-23 13:58:54.153 xcodebuild[27208:59773] 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
2022-03-23 13:58:54.153 xcodebuild[27208:59773] 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
2022-03-23 13:58:55.276 xcodebuild[27209:59780] 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
2022-03-23 13:58:55.277 xcodebuild[27209:59780] 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
Since SwiftTemplate uses xcrun swift build, this means that anybody who has Xcode 13.3 set via Xcode-select will start seeing these issues more frequently.
Fixing the Issue
I guess there are two ways we can go about fixing this:
Only fail if the exit code is something other than 0 (ignore stderr in the check)
Whitelist some messages
I imagine that option 1 would be the easiest solution, but I'm not sure if there was a specific scenario where the exit code might be 0 but a genuine error was printed?
The text was updated successfully, but these errors were encountered:
Background
While working on Xcode 13.3/StaticInternalSwiftSyntaxParser support, I noticed that the .swifttemplate generation started to become a lot more flakey than before and the errors weren't always obvious.. For example:
This is confusing, because it's reported "Build complete! (1.22s)", but for some reason it failed and it wasn't really clear until I realised that the warning about collections.json is something that
swift build
is printing out to stderr andSwiftTemplate
will see that as a failure based on this logic:Sourcery/SourcerySwift/Sources/SwiftTemplate.swift
Lines 243 to 247 in 75e91b5
Now that I've also switched CI to use 13.3, I'm seeing some tests fail there too. For example: https://app.circleci.com/pipelines/github/krzysztofzablocki/Sourcery/467/workflows/8ac497af-d2fa-4963-bf8d-c9f5ecf865ce/jobs/2123
This time it appears to be different messages in stderr:
Since
SwiftTemplate
usesxcrun swift build
, this means that anybody who has Xcode 13.3 set viaXcode-select
will start seeing these issues more frequently.Fixing the Issue
I guess there are two ways we can go about fixing this:
I imagine that option 1 would be the easiest solution, but I'm not sure if there was a specific scenario where the exit code might be 0 but a genuine error was printed?
The text was updated successfully, but these errors were encountered: