Coder Social home page Coder Social logo

Comments (24)

ktoso avatar ktoso commented on June 11, 2024 3

We're looking into this, thanks for reporting

from swift-log.

sebsto avatar sebsto commented on June 11, 2024 2

@neonichu @tomerd confirming that xcodebuild -scheme <name> works for me. The Docc error messages are not preventing the build to complete.

2022-10-20 05:42:51.642 xcodebuild[81571:6167958] [MT] IDEFileReferenceDebug: [Load] <IDESwiftPackageCore.IDESwiftPackageSpecialFolderFileReference, 0x60000074f200: name:Docs.docc path:group:Docs.docc> Failed to load container at path: /Users/ec2-user/Library/Developer/Xcode/DerivedData/xcodeinstall-gcrbebvtaghxhtcomuvtejtakvio/SourcePackages/checkouts/swift-nio-ssl/Sources/NIOSSL/Docs.docc, Error: Error Domain=com.apple.dt.IDEContainerErrorDomain Code=6 "Cannot open "Docs.docc" as a "Swift Package Folder" because it is already open as a "Folder"." UserInfo={NSLocalizedDescription=Cannot open "Docs.docc" as a "Swift Package Folder" because it is already open as a "Folder".}

from swift-log.

sebsto avatar sebsto commented on June 11, 2024 1

@tomerd here are steps to reproduce on my project

ec2-user@ip-172-31-5-66 ~ % uname -a 
Darwin ip-172-31-5-66.ec2.internal 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:35 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T8101 arm64

ec2-user@ip-172-31-5-66 ~ % xcodebuild -version 
Xcode 14.0.1
Build version 14A400

ec2-user@ip-172-31-5-66 ~ % swift --version 
swift-driver version: 1.62.8 Apple Swift version 5.7 (swiftlang-5.7.0.127.4 clang-1400.0.29.50)
Target: arm64-apple-macosx12.0

ec2-user@ip-172-31-5-66 ~ % ls -al /Applications 
total 0
drwxrwxr-x   8 root      admin  256 Oct 19 09:24 .
drwxr-xr-x  20 root      wheel  640 Aug 11 06:44 ..
-rw-r--r--   1 root      wheel    0 Aug 11 06:44 .localized
drwxr-xr-x@  3 root      wheel   96 Oct 12 18:36 Safari.app
drwxr-xr-x   3 root      wheel   96 Aug 11 06:44 Utilities
drwxr-xr-x   3 ec2-user  staff   96 May 18 04:10 Xcode-13.4.1.app
drwxr-xr-x   3 ec2-user  staff   96 Sep 14 13:01 Xcode-14.0.1.app
lrwxr-xr-x   1 ec2-user  admin   16 Oct 19 09:24 Xcode.app -> Xcode-14.0.1.app
  1. Clone project
ec2-user@ip-172-31-5-66 ~ % git clone https://github.com/sebsto/xcodeinstall.git 
Cloning into 'xcodeinstall'...
remote: Enumerating objects: 1123, done.
remote: Counting objects: 100% (496/496), done.
remote: Compressing objects: 100% (260/260), done.
remote: Total 1123 (delta 281), reused 389 (delta 210), pack-reused 627
Receiving objects: 100% (1123/1123), 50.01 MiB | 59.27 MiB/s, done.
Resolving deltas: 100% (579/579), done.

ec2-user@ip-172-31-5-66 ~ % cd xcodeinstall 
  1. Build using SPM - works
(redacted)
Compiling plugin GenerateManualPlugin...
Building for debugging...
[993/993] Linking xcodeinstall
(redacted)
Compiling plugin GenerateManualPlugin...
Building for debugging...
[993/993] Linking xcodeinstall
Build complete! (50.29s)
  1. Building using xcodebuild - do not work
ec2-user@ip-172-31-5-66 xcodeinstall % xcodebuild -quiet 
2022-10-19 09:52:42.245 xcodebuild[62352:6001462] [MT] IDEFileReferenceDebug: [Load] <IDESwiftPackageCore.IDESwiftPackageSpecialFolderFileReference, 0x600000487b00: name:Documentation.docc path:group:Documentation.docc> Failed to load container at path: /Users/ec2-user/Library/Developer/Xcode/DerivedData/xcodeinstall-gcrbebvtaghxhtcomuvtejtakvio/SourcePackages/checkouts/swift-argument-parser/Sources/ArgumentParser/Documentation.docc, Error: Error Domain=com.apple.dt.IDEContainerErrorDomain Code=6 "Cannot open "Documentation.docc" as a "Swift Package Folder" because it is already open as a "Folder"." UserInfo={NSLocalizedDescription=Cannot open "Documentation.docc" as a "Swift Package Folder" because it is already open as a "Folder".}
2022-10-19 09:52:42.254 xcodebuild[62352:6001462] [MT] IDEFileReferenceDebug: [Load] <IDESwiftPackageCore.IDESwiftPackageSpecialFolderFileReference, 0x6000004f3900: name:Docs.docc path:group:Docs.docc> Failed to load container at path: /Users/ec2-user/Library/Developer/Xcode/DerivedData/xcodeinstall-gcrbebvtaghxhtcomuvtejtakvio/SourcePackages/checkouts/async-http-client/Sources/AsyncHTTPClient/Docs.docc, Error: Error Domain=com.apple.dt.IDEContainerErrorDomain Code=6 "Cannot open "Docs.docc" as a "Swift Package Folder" because it is already open as a "Folder"." UserInfo={NSLocalizedDescription=Cannot open "Docs.docc" as a "Swift Package Folder" because it is already open as a "Folder".}
2022-10-19 09:52:42.280 xcodebuild[62352:6001462] [MT] IDEFileReferenceDebug: [Load] <IDESwiftPackageCore.IDESwiftPackageSpecialFolderFileReference, 0x6000004a1900: name:Docs.docc path:group:Docs.docc> Failed to load container at path: /Users/ec2-user/Library/Developer/Xcode/DerivedData/xcodeinstall-gcrbebvtaghxhtcomuvtejtakvio/SourcePackages/checkouts/swift-nio-ssl/Sources/NIOSSL/Docs.docc, Error: Error Domain=com.apple.dt.IDEContainerErrorDomain Code=6 "Cannot open "Docs.docc" as a "Swift Package Folder" because it is already open as a "Folder"." UserInfo={NSLocalizedDescription=Cannot open "Docs.docc" as a "Swift Package Folder" because it is already open as a "Folder".}
2022-10-19 09:52:42.287 xcodebuild[62352:6001462] [MT] IDEFileReferenceDebug: [Load] <IDESwiftPackageCore.IDESwiftPackageSpecialFolderFileReference, 0x6000004a4e00: name:Docs.docc path:group:Docs.docc> Failed to load container at path: /Users/ec2-user/Library/Developer/Xcode/DerivedData/xcodeinstall-gcrbebvtaghxhtcomuvtejtakvio/SourcePackages/checkouts/swift-nio-extras/Sources/NIOHTTPCompression/Docs.docc, Error: Error Domain=com.apple.dt.IDEContainerErrorDomain Code=6 "Cannot open "Docs.docc" as a "Swift Package Folder" because it is already open as a "Folder"." UserInfo={NSLocalizedDescription=Cannot open "Docs.docc" as a "Swift Package Folder" because it is already open as a "Folder".}
2022-10-19 09:52:42.288 xcodebuild[62352:6001462] [MT] IDEFileReferenceDebug: [Load] <IDESwiftPackageCore.IDESwiftPackageSpecialFolderFileReference, 0x6000004a5700: name:Docs.docc path:group:Docs.docc> Failed to load container at path: /Users/ec2-user/Library/Developer/Xcode/DerivedData/xcodeinstall-gcrbebvtaghxhtcomuvtejtakvio/SourcePackages/checkouts/swift-nio-extras/Sources/NIOExtras/Docs.docc, Error: Error Domain=com.apple.dt.IDEContainerErrorDomain Code=6 "Cannot open "Docs.docc" as a "Swift Package Folder" because it is already open as a "Folder"." UserInfo={NSLocalizedDescription=Cannot open "Docs.docc" as a "Swift Package Folder" because it is already open as a "Folder".}
2022-10-19 09:52:42.289 xcodebuild[62352:6001462] [MT] IDEFileReferenceDebug: [Load] <IDESwiftPackageCore.IDESwiftPackageSpecialFolderFileReference, 0x6000004a6200: name:Docs.docc path:group:Docs.docc> Failed to load container at path: /Users/ec2-user/Library/Developer/Xcode/DerivedData/xcodeinstall-gcrbebvtaghxhtcomuvtejtakvio/SourcePackages/checkouts/swift-nio-extras/Sources/NIOSOCKS/Docs.docc, Error: Error Domain=com.apple.dt.IDEContainerErrorDomain Code=6 "Cannot open "Docs.docc" as a "Swift Package Folder" because it is already open as a "Folder"." UserInfo={NSLocalizedDescription=Cannot open "Docs.docc" as a "Swift Package Folder" because it is already open as a "Folder".}
2022-10-19 09:52:42.347 xcodebuild[62352:6001462] [MT] IDEFileReferenceDebug: [Load] <IDESwiftPackageCore.IDESwiftPackageSpecialFolderFileReference, 0x60000045ff00: name:Docs.docc path:group:Docs.docc> Failed to load container at path: /Users/ec2-user/Library/Developer/Xcode/DerivedData/xcodeinstall-gcrbebvtaghxhtcomuvtejtakvio/SourcePackages/checkouts/swift-nio-transport-services/Sources/NIOTransportServices/Docs.docc, Error: Error Domain=com.apple.dt.IDEContainerErrorDomain Code=6 "Cannot open "Docs.docc" as a "Swift Package Folder" because it is already open as a "Folder"." UserInfo={NSLocalizedDescription=Cannot open "Docs.docc" as a "Swift Package Folder" because it is already open as a "Folder".}
/Users/ec2-user/Library/Developer/Xcode/DerivedData/xcodeinstall-gcrbebvtaghxhtcomuvtejtakvio/SourcePackages/checkouts/swift-nio/Sources/NIOEmbedded/AsyncTestingEventLoop.swift:15:8: error: no such module 'Atomics'
import Atomics
       ^
/Users/ec2-user/Library/Developer/Xcode/DerivedData/xcodeinstall-gcrbebvtaghxhtcomuvtejtakvio/SourcePackages/checkouts/swift-nio/Sources/NIOEmbedded/AsyncTestingEventLoop.swift:15:8: error: no such module 'Atomics'
import Atomics
       ^
warning: Building targets in manual order is deprecated - check "Parallelize build for command-line builds" in the project editor, or set DISABLE_MANUAL_TARGET_ORDER_BUILD_WARNING in any of the targets in the current build to suppress this warning
note: Run script build phase 'Run Script' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'xcodeinstall' from project 'xcodeinstall')
** BUILD FAILED **

Building from Xcode GUI works.

from swift-log.

geertbleyen avatar geertbleyen commented on June 11, 2024 1

I'm a bit confused. What is this 'less / not supported path' or legacy-style builds for building projects with packages?
We use xcodebuild in our CI system, and don't know any other way to build Xcode workspaces (which uses SPM packages). We are passing the sdk to use, which scheme to use, etc... Is there another way to do this?

for example:
/usr/bin/xcodebuild -sdk iphoneos -configuration Release -workspace /Users/agent/azagent-A3/_work/3/s/app.xcworkspace -scheme MyScheme build ENABLE_BITCODE=NO CODE_SIGN_STYLE=Automatic | /usr/local/bin/xcpretty -r junit --no-color
If there are other ways to do this better, I gladly hear it.

from swift-log.

fraune avatar fraune commented on June 11, 2024

I have created a repository with the minimum code required to see the error:
https://github.com/fraune/xcodebuild-swiftlog-error

from swift-log.

EmDee avatar EmDee commented on June 11, 2024

@fraune Have you found any solution so far? We've seen this error showing up in another project: malcommac/SwiftDate#799

But according to the date of the Swift forums thread, this issue should be unrelated to Xcode 14.

from swift-log.

fraune avatar fraune commented on June 11, 2024

Haven’t found a solution yet. I am guessing the guys on the Swift forums were getting the same error but unrelated to this package. Downgrading to Xcode 13.4.1 is my current workaround.

from swift-log.

ktoso avatar ktoso commented on June 11, 2024

Is that error preventing editing/opening of the package? I'm told it should be harmless hm...

from swift-log.

JeanAzzopardi avatar JeanAzzopardi commented on June 11, 2024

I also experienced this issue and had to downgrade to 1.3

from swift-log.

fraune avatar fraune commented on June 11, 2024

Yea, I didn't have trouble importing or using this package when programming or running the app on a device through Xcode. Just having trouble building my app with xcodebuild when this dependency is in my project.

from swift-log.

javichaques avatar javichaques commented on June 11, 2024

Hi, any news on this? i have same problem

from swift-log.

sebsto avatar sebsto commented on June 11, 2024

Hello, same problem here. Downgrading to Xcode 13.4.1 solved the problem. (temporarily, until I will really need Xcode 14)

To clarify : issue only appear on command line build (using xcodebuild). Building from Xcode is OK

from swift-log.

kalinjul avatar kalinjul commented on June 11, 2024

This seems fixed for me after renaming the "Docs.docc" folder.
Can you check my fork: https://github.com/kalinjul/swift-log

.package(url: "https://github.com/kalinjul/swift-log.git", exact: "1.4.4-fix"),

from swift-log.

geertbleyen avatar geertbleyen commented on June 11, 2024

@kalinjul , that would break the doc generation with SPM's docc plugin, no?

from swift-log.

kalinjul avatar kalinjul commented on June 11, 2024

Quite possible, but i did want a working library more than documentation.
Is the .docc suffix for documentation folders mandatory?

from swift-log.

neonichu avatar neonichu commented on June 11, 2024

I'm unable to reproduce any actual build issue myself, but I do see the .docc related error. Could someone please post a full build log where we can see any further errors?

from swift-log.

tomerd avatar tomerd commented on June 11, 2024

@neonichu iiuc you are saying the .docc message is not preventing a successful build, so may be a "red herring"?

@sebsto @javichaques @geertbleyen or others that reported broken builds - could you provide more information on what prevented the build from succeeding?

from swift-log.

geertbleyen avatar geertbleyen commented on June 11, 2024

@tomerd, hmmm, for some reason I can't get it to fail the build on that error, it seems to just pass it by in my smaller repro environment. But it still shows this error:
2022-10-19 09:16:05.365 xcodebuild[38506:3571385] [MT] IDEFileReferenceDebug: [Load] <IDESwiftPackageCore.IDESwiftPackageSpecialFolderFileReference, 0x6000039eb400: name:Documentation.docc path:group:Documentation.docc> Failed to load container at path: /Users/geertbleyen/Library/Developer/Xcode/DerivedData/AppDemo-gzhzregmfuinbmephwjeyzxmqkoz/SourcePackages/checkouts/swift-log/Sources/Logging/Documentation.docc, Error: Error Domain=com.apple.dt.IDEContainerErrorDomain Code=6 "Cannot open "Documentation.docc" as a "Swift Package Folder" because it is already open as a "Folder"." UserInfo={NSLocalizedDescription=Cannot open "Documentation.docc" as a "Swift Package Folder" because it is already open as a "Folder".}

from swift-log.

tomerd avatar tomerd commented on June 11, 2024

thanks @sebsto the actual build error is

/Users/ec2-user/Library/Developer/Xcode/DerivedData/xcodeinstall-gcrbebvtaghxhtcomuvtejtakvio/SourcePackages/checkouts/swift-nio/Sources/NIOEmbedded/AsyncTestingEventLoop.swift:15:8: error: no such module 'Atomics'
import Atomics
       ^
/Users/ec2-user/Library/Developer/Xcode/DerivedData/xcodeinstall-gcrbebvtaghxhtcomuvtejtakvio/SourcePackages/checkouts/swift-nio/Sources/NIOEmbedded/AsyncTestingEventLoop.swift:15:8: error: no such module 'Atomics'
import Atomics
       ^

the docc output here is a red herring afaict. of course there is still the questions of why this is failing only with xcodebuild -quiet, but should probably be tracked separately. cc @neonichu

from swift-log.

neonichu avatar neonichu commented on June 11, 2024

Packages aren't really supported in legacy-style builds, the project builds for me when passing -scheme xcodeinstall.

from swift-log.

sebsto avatar sebsto commented on June 11, 2024

@tomer agreed but I though the Atomic lib build failed to build because of the error in the preceding steps.
Building on Xcode 13 worked (not anymore with this project because I now use swift 5.7 language features)

from swift-log.

tomerd avatar tomerd commented on June 11, 2024

@sebsto I am not are the atomic failure is related. something must have changed in Xcode 14 to that, but as @neonichu it may be because this is a less / not supported path for building projects with packages.

from swift-log.

neonichu avatar neonichu commented on June 11, 2024

As said above, packages aren't supported in legacy-style builds (building without a scheme, which is only possible through xcodebuild), scheme-style builds are of course fine, whether through the IDE or xcodebuild.

from swift-log.

fraune avatar fraune commented on June 11, 2024

As of Xcode 14.0.1, this issue is not blocking me. I still get the warning message that I listed in my OP, but it no longer prevents me from running my builds.

from swift-log.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.