Skip to content

Smarter decisions on if user should be prompted for Xcode change #1640

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

Merged
merged 3 commits into from
Jun 23, 2025

Conversation

award999
Copy link
Contributor

If you use a swiftly path then you are prompted everytime VSCode opens
even if the xcode-select -p is the same. Example settings:

"swift.path": "${userHome}/.swiftly/bin",
"swift.swiftEnvironmentVariables": {
    "DEVELOPER_DIR": "/Applications/Xcode.app/Contents/Developer"
},

So consider the DEVELOPER_DIR as well to know if this changed.

Issue: #1472

If you use a swiftly path then you are prompted everytime VSCode opens
even if the xcode-select -p is the same. Example settings:
```
"swift.path": "${userHome}/.swiftly/bin",
"swift.swiftEnvironmentVariables": {
    "DEVELOPER_DIR": "/Applications/Xcode.app/Contents/Developer"
},
```

So consider the DEVELOPER_DIR as well to know if this changed.

Issue: swiftlang#1472
@award999 award999 requested a review from plemarquand June 23, 2025 18:23
} else if (developerDir() && !matchesDeveloperDir(this.xcodePath)) {
const selected = await vscode.window.showWarningMessage(
'The Swift Extension has detected a change in the selected Xcode which does not match the value of your DEVELOPER_DIR in the "swift.swiftEnvironmentVariables" setting. Would you like to update your configured "swift.swiftEnvironmentVariables" setting?',
"Remove From Settings",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, thinking a bit more about Remove From Settings and I'm not sure if I could figure out what this actually does if I just saw the pop-up directly. I think this is fine for now, but maybe in the future it could something like Clear swiftEnvironmentVariables settings (or maybe "reset")?

@award999 award999 merged commit 0190644 into swiftlang:main Jun 23, 2025
16 of 18 checks passed
@award999 award999 deleted the selected-xcode branch June 23, 2025 19:50
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