Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwiftMessages_SwiftMessages.bundle: No such file or directory building from command line #453

Open
Dario-GoldenSpear opened this issue Feb 9, 2021 · 2 comments

Comments

@Dario-GoldenSpear
Copy link

Dario-GoldenSpear commented Feb 9, 2021

Hi,

We are trying to use jazzy to generate the project's documentation but we are getting the following error:

PBXCp /Users/dario/Documents/Trabajo/Company/GitHub/ios-project-name-app/TargetName/build/Release-iphoneos/SwiftMessages_SwiftMessages.bundle /Users/dario/Documents/Trabajo/Company/GitHub/ios-project-name-app/TargetName/build/Release-iphoneos/AppName.app/SwiftMessages_SwiftMessages.bundle (in target 'TargetName' from project 'TargetName')
    cd /Users/dario/Documents/Trabajo/Company/GitHub/ios-project-name-app/TargetName
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/dario/Documents/Trabajo/Company/GitHub/ios-project-name-app/TargetName/build/Release-iphoneos/SwiftMessages_SwiftMessages.bundle /Users/dario/Documents/Trabajo/Company/GitHub/ios-project-name-app/TargetName/build/Release-iphoneos/AppName.app
error: /Users/dario/Documents/Trabajo/Company/GitHub/ios-project-name-app/TargetName/build/Release-iphoneos/SwiftMessages_SwiftMessages.bundle: No such file or directory (in target 'TargetName' from project 'TargetName')

And this is the full log:
xcodebuild-swift-messages-error.log

This only happens when running xcodebuild, through jazzy, from the command line.

I can compile and run the application from Xcode, where the SwiftMessages_SwiftMessages.bundle is copied from a different path:

PBXCp /Users/dario/Library/Developer/Xcode/DerivedData/TargetName-btnplbbkwgnzpyaisjrbkqxzoqon/Build/Products/Debug-iphoneos/SwiftMessages_SwiftMessages.bundle /Users/dario/Library/Developer/Xcode/DerivedData/TargetName-btnplbbkwgnzpyaisjrbkqxzoqon/Build/Products/Debug-iphoneos/AppName.app/SwiftMessages_SwiftMessages.bundle (in target 'TargetName' from project 'TargetName')
    cd /Users/dario/Documents/Trabajo/GoldenSpear/GitHub/ios-project-name-app/TargetName
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/dario/Library/Developer/Xcode/DerivedData/TargetName-btnplbbkwgnzpyaisjrbkqxzoqon/Build/Products/Debug-iphoneos/SwiftMessages_SwiftMessages.bundle /Users/dario/Library/Developer/Xcode/DerivedData/TargetName-btnplbbkwgnzpyaisjrbkqxzoqon/Build/Products/Debug-iphoneos/AppName.app\

Any idea on how to solve the error? I am looking for a way to tell xcodebuild to use the same path that is used from Xcode.

Thanks in advance

@wtmoose
Copy link
Member

wtmoose commented Feb 12, 2021

I'm not sure when I would have time to try to replicate this. Do you have a sample project?

@Dario-GoldenSpear
Copy link
Author

Dario-GoldenSpear commented Feb 16, 2021

Hi @wtmoose

I have attached 2 zip files containing the same sample project, one version including SwiftMessages and the other not. In both cases I tried to generate the documentation executing the following command:

jazzy --min-acl private

You'll see a docs directory in the version not including SwiftMessages with the resulting generated documentation.
The issue should be reproducible with any new empty project actually, just adding SwiftMessages using SPM should do the trick.

ObjectsDetector-NoSwiftMessages.zip
ObjectsDetector-WithSwiftMessages.zip

log file for this project (the error is the same one already reported as far as I can see):
xcodebuild-error.log

I think there is a problem with the source directory passed to PBXCp, when compiled from the Xcode it uses /DerivedData:

PBXCp /Users/dario/Library/Developer/Xcode/DerivedData/ObjectsDetector-dkjbmixbxfkluzbqwyiwnswjyjme/Build/Products/Debug-iphoneos/SwiftMessages_SwiftMessages.bundle /Users/dario/Library/Developer/Xcode/DerivedData/ObjectsDetector-dkjbmixbxfkluzbqwyiwnswjyjme/Build/Products/Debug-iphoneos/ObjectsDetector.app/SwiftMessages_SwiftMessages.bundle (in target 'ObjectsDetector' from project 'ObjectsDetector')
    cd /Users/dario/Desktop/ObjectsDetector-WithSwiftMessages
    builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/dario/Library/Developer/Xcode/DerivedData/ObjectsDetector-dkjbmixbxfkluzbqwyiwnswjyjme/Build/Products/Debug-iphoneos/SwiftMessages_SwiftMessages.bundle /Users/dario/Library/Developer/Xcode/DerivedData/ObjectsDetector-dkjbmixbxfkluzbqwyiwnswjyjme/Build/Products/Debug-iphoneos/ObjectsDetector.app

While from the command line it tries to get it from build/Release-...:

PBXCp /Users/dario/Desktop/ObjectsDetector-WithSwiftMessages/build/Release-iphoneos/SwiftMessages_SwiftMessages.bundle /Users/dario/Desktop/ObjectsDetector-WithSwiftMessages/build/Release-iphoneos/ObjectsDetector.app/SwiftMessages_SwiftMessages.bundle (in target 'ObjectsDetector' from project 'ObjectsDetector')
   cd /Users/dario/Desktop/ObjectsDetector-WithSwiftMessages
   builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/dario/Desktop/ObjectsDetector-WithSwiftMessages/build/Release-iphoneos/SwiftMessages_SwiftMessages.bundle /Users/dario/Desktop/ObjectsDetector-WithSwiftMessages/build/Release-iphoneos/ObjectsDetector.app
error: /Users/dario/Desktop/ObjectsDetector-WithSwiftMessages/build/Release-iphoneos/SwiftMessages_SwiftMessages.bundle: No such file or directory (in target 'ObjectsDetector' from project 'ObjectsDetector')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants