Nuke: xcodebuild show issues: Cannot open "*.docc" as a "Swift Package Folder" because it is already open as a "Folder".}
Xcode Version 14.0.1 (14A400) Nuke version: 11.3.0
2022-10-05 00:09:10.089 xcodebuild[13166:8526635] [MT] IDEFileReferenceDebug: [Load] <IDESwiftPackageCore.IDESwiftPackageSpecialFolderFileReference, 0x60000bae4d00: name:NukeExtensions.docc path:group:NukeExtensions.docc> Failed to load container at path: /SourcePackages/checkouts/Nuke/Sources/NukeExtensions/NukeExtensions.docc, Error: Error Domain=com.apple.dt.IDEContainerErrorDomain Code=6 "Cannot open "NukeExtensions.docc" as a "Swift Package Folder" because it is already open as a "Folder"." UserInfo={NSLocalizedDescription=Cannot open "NukeExtensions.docc" as a "Swift Package Folder" because it is already open as a "Folder".}
2022-10-05 00:09:10.092 xcodebuild[13166:8526635] [MT] IDEFileReferenceDebug: [Load] <IDESwiftPackageCore.IDESwiftPackageSpecialFolderFileReference, 0x60000baeee00: name:Nuke.docc path:group:Nuke.docc> Failed to load container at path: /SourcePackages/checkouts/Nuke/Sources/Nuke/Nuke.docc, Error: Error Domain=com.apple.dt.IDEContainerErrorDomain Code=6 "Cannot open "Nuke.docc" as a "Swift Package Folder" because it is already open as a "Folder"." UserInfo={NSLocalizedDescription=Cannot open "Nuke.docc" as a "Swift Package Folder" because it is already open as a "Folder".}
2022-10-05 00:09:10.094 xcodebuild[13166:8526635] [MT] IDEFileReferenceDebug: [Load] <IDESwiftPackageCore.IDESwiftPackageSpecialFolderFileReference, 0x60000baefa00: name:NukeUI.docc path:group:NukeUI.docc> Failed to load container at path: /SourcePackages/checkouts/Nuke/Sources/NukeUI/NukeUI.docc, Error: Error Domain=com.apple.dt.IDEContainerErrorDomain Code=6 "Cannot open "NukeUI.docc" as a "Swift Package Folder" because it is already open as a "Folder"." UserInfo={NSLocalizedDescription=Cannot open "NukeUI.docc" as a "Swift Package Folder" because it is already open as a "Folder".}
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 29 (11 by maintainers)
Downgrading to Xcode 13.4.1 worked for me as well 👍
I had a similar error on our CI with another project. Downgrading Xcode from 14.0.1 to 13.4.1 fixed the issue
~I really one to add one a solution here (for anyone with the same experience) which is really weird and crazy:~ ~In my case the signing certificate has been expired and then this issue came up.~ ~I renewed my distribution certificate and everything is back up again!~
~Cheers.~
The real cause was NOT the .docc warnings for the build to fail, to make that clear.
Please check out the raw xcodebuild log, remove any log prettifier, like
xcpretty, because they might swallow some error info.I totally agree. This is just a warning when using
xcodebuild, but it is not the real reason a build fails. It just looks like that, but you need to check the raw build log and will find the real build failure reason.Regarding
xcpretty: It should be replaced by xcbeautify.Update: it appears to be a non-blocking issue. I tested it in the following project:
test-nuke-docc.zip
There are also other reports, for example in swift-log that confirm that it’s non-blocking.
Tools like
xcprettyoften hide the real build failure reason. For example, when I was testing it, I forgot to set-up signing and the output withxcprettywas the following:If you remove
xcpretty, it shows the real reason of the build failure:@Sam-Spencer
I tried Xcode 14.1 RC and it’s not fixed. Please upgrade to Nuke 11.3.1 that has a workaround for this issue.
I’m able to reproduce it. There seems to be an issue with xcodebuild and
.doccfolders in package Sources/. It is the Apple recommended way to setup DocC for Swift packages. I fixed it in 11.3.1 by temporarily removing.doccfolders from Swift packages.Just a heads up, our team at work is also experiencing this issue with other Swift Packages (e.g.
Swift Protobuf) after upgrading our Azure CI pipelines to Xcode 14.0.1 and iOS 16 SDK. Can’t say for certain, but it seems to be a bug on Apple’s side of things. And, for what it’s worth, from what we’ve been able to tell in our diagnosis of the issue you should be able to build and archive successfully regardless of the warning.Our resolution was similar after a lot of back and forth with the folks at Azure. Seems like something undocumented changed in Xcode 14 with
xcodebuild. We’ll be trying again when Xcode 14.1 rolls out.