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
[SR-11328] Xcode fails to compile a project with SPM package and build configuration other than Debug/Release. #4674
Comments
Comment by Randy R (JIRA) We attempted various workarounds for this issue, all resulted in the module not being found:
|
Comment by Karl Shea (JIRA) I'm having exactly the same issue. I use different build configurations to set variables for dev, stage, & prod API URLs. Can't there be a way to set Swift Package Manager's configuration to Debug/Release inside the build configuration? |
Comment by Michael Lenaghan (JIRA) I just ran into this and discovered that my schemes referenced old configurations, configurations that no longer existed. Once I updated them to the correct configurations the build succeeded. (I'm leaving this comment about a year later. It's possible that what I ran into is completely different from what was originally reported. Still, it took me quite a while to track the problem down, so I wanted to leave a note that might save others time.) |
Comment by Denys Telezhkin (JIRA) This issue seems to be resolved in Xcode 12 beta 4, attached project no longer reproduces the problem, which is fantastic! Closing. |
ProjectSpec states that Swift Packages don't work in projects with configurations other than `Debug` and `Release`. It provides a link to Swift bugtracker to issue marked as duplicate. Original issue that it points to is closed and fixed since 2020 with Xcode 12. Let's remove misleading note from ProjectSpec. apple/swift-package-manager#4674
ProjectSpec states that Swift Packages don't work in projects with configurations other than `Debug` and `Release`. It provides a link to Swift bugtracker to issue marked as duplicate. Original issue that it points to is closed and fixed since 2020 with Xcode 12. Let's remove misleading note from ProjectSpec. apple/swift-package-manager#4674
Attachment: Download
Additional Detail from JIRA
md5: a49f78cbddbcebdf98552b59d8ca328f
Issue Description:
When dealing with multiple server environments, it's useful to have additional build configurations other than Debug/Release to match them with actual server environment build is running on.
For example, we use following environments:
When trying to integrate SwiftPM package into a project that uses those build configurations, Xcode fails to compile a project, and throws following error:
Observations
This might be related to a fact, that Xcode seems to ignore DebugDevelop configuration name, and continues to build for Debug configuration instead. If you go into DerivedData folders, specifically Build/Products folder, you can see that there are two folders present : `DebugDevelop-iphonesimulator`, in which app build products are located, and `Debug-iphonesimulator` folder, in which package build products are located. Product -> Archive also fails, because ReleaseProduction configuration is ignored as well. This leads me to believe that DebugDevelop build configuration is ignored when building dependencies using SwiftPM.
Attaching sample project that reproduces the problem.
The text was updated successfully, but these errors were encountered: