For reference, here is my bug report to Apple. To be fair, they did get back to me requesting further information (the build log), which I provided. But that was over a month ago (not only is Xcode 11 out of beta now, but 11.1 is released and still exhibiting the same issue).
Please provide a descriptive title for your feedback:
Xcode 11 beta-5 with SPM dependencies produces errors with Archive build
Which area are you seeing an issue with?
Swift Compiler
What type of feedback are you reporting?
Incorrect/Unexpected Behavior
Please describe the issue:
I have a Swift 5 project using Swift Package Manager dependencies in Xcode beta-5. This project could Archive build without errors in Xcode 10.X, but in Xcode 11, I get compilation or linking errors and the archive is not built. Specifically, each dependency generates one of 2 errors: "No such module" or "Command CompileSwift failed with a nonzero exit code".
These errors are NOT generated using Run (Debug build), they only appear when attempting a non-Debug build, such as Archive or Profile. Again, this same project compiled, linked, and exported fine in Xcode 10.
Please list the steps you took to reproduce the issue:
1. Cleaned project (Option-Clean Build Folder).
2. Delete all in DerivedData folder.
3. Restart Xcode.
4. Restart computer.
5. Try same project on different computers also running Xcode 11 beta-5 (same result seen both with macOS 10.14.4 and macOS 10.15 beta-5).
6. Select File > Swift Packages > Reset Package Caches.
7. Delete project and workspace files, re-create those files fresh using Xcode 11 beta-5, re-add source files and dependencies.
What did you expect to happen?
Expected Archive command to produce an archive build.
What actually happened?
Build fails with error listed above.