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

Infer active Xcode for testing #183

Merged
merged 1 commit into from
Feb 20, 2025
Merged

Conversation

neonichu
Copy link
Collaborator

Historically, we have been relying on XCODE_DEVELOPER_DIR_PATH being set to DEVELOPER_DIR in our schemes to find the active Xcode, but with auto-generated package schemes, this doesn't really work anymore. Try to infer the path from PATH instead which should be set when running in the context of Xcode.

@neonichu
Copy link
Collaborator Author

@swift-ci please test

@neonichu
Copy link
Collaborator Author

Ah I guess this breaks things outside of Xcode, so it needs to be a little more clever.

@neonichu neonichu force-pushed the bbuegling/infer-active-xcode branch from 9d9523a to 01da188 Compare February 17, 2025 23:48
@neonichu
Copy link
Collaborator Author

@swift-ci please test

@neonichu
Copy link
Collaborator Author

neonichu commented Feb 17, 2025

Ah, of course that NSString API doesn't exist like this on non-Darwin :/

@jakepetroules
Copy link
Collaborator

Ah, of course that NSString API doesn't exist like this on non-Darwin :/

how about:

if let versionInfo = versionInfo, (try? PropertyList.fromPath(versionInfo, fs: localFS))?.dictValue?["ProjectName"] == "IDEApplication" {

Historically, we have been relying on `XCODE_DEVELOPER_DIR_PATH` being set to `DEVELOPER_DIR` in our schemes to find the active Xcode, but with auto-generated package schemes, this doesn't really work anymore. Try to infer the path from `PATH` instead which should be set when running in the context of Xcode.
@neonichu neonichu force-pushed the bbuegling/infer-active-xcode branch from 01da188 to 98972d6 Compare February 18, 2025 18:06
@neonichu
Copy link
Collaborator Author

@swift-ci please test

@neonichu
Copy link
Collaborator Author

@swift-ci please test

@neonichu neonichu merged commit 0660812 into main Feb 20, 2025
2 of 3 checks passed
@neonichu neonichu deleted the bbuegling/infer-active-xcode branch February 20, 2025 00:03
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

Successfully merging this pull request may close these issues.

3 participants