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

[SR-2718] Xcode generated projects in custom locations have incorrect path to project in scheme file; causes broken refs to buildables #5211

Closed
swift-ci opened this issue Sep 21, 2016 · 7 comments
Assignees
Labels

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-2718
Radar rdar://problem/28998147
Original Reporter paulofaria (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug, GeneratedXcodeProject
Assignee @abertelrud
Priority Medium

md5: b941fcc64fbbb37af9fd4d16dfc71f51

Issue Description:

Using DEVELOPMENT-SNAPSHOT-2016-09-20-a if I create a directory called Xcode on the root of a Swift package and run:

swift package generate-xcodeproj --output Xcode

SwiftPM generates the Xcode project, but the package scheme is not configured correctly. See screenshot attachment for reference.

@abertelrud
Copy link
Contributor

Yes, this is clearly wrong. Also, is it expected that there should be schemes for each of the modules, independently, or should there just be the one Zewo scheme? It looks like the old project generator generated just the one scheme.

@abertelrud
Copy link
Contributor

Related to https://bugs.swift.org/browse/SR-2719, most likely.

@abertelrud
Copy link
Contributor

In the case of not passing `--output`, the project is found correctly. But it's possible that the `ReferencedContainer` key needs to have the relative path of the project in the custom-output location case.

@abertelrud
Copy link
Contributor

So I don't think this is the same as https://bugs.swift.org/browse/SR-2719, though it's related.

@abertelrud
Copy link
Contributor

BTW, the scheme is always being created at the right location; it's a question of a problem with the paths in it so it can still find the project container even when it's in a custom location.

@abertelrud
Copy link
Contributor

Changing `ReferencedContainer` to be a relative or an absolute path from the source directory to the project path fixes the top-level entry so that it's not showing up as broken (just a gear) any more. But for some reason Xcode is still autogenerating additional schemes (one for each framework) when the generated Xcode project lives somewhere else (it doesn't do that when the project is in the default location). There's nothing different about the generated scheme file, just how Xcode reacts to it.

@abertelrud
Copy link
Contributor

This was fixed here: a23ddbc

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants