You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Smarter decisions on if user should be prompted for Xcode change (#1640)
* Smarter decisions on if user should be prompted for Xcode change
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
* Re-fetch DEVELOPER_DIR each time
* Fix formatting issues
'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?',
'The Swift Extension has detected a change in the selected Xcode which does not match the value of your "swift.path" setting. Would you like to update your configured "swift.path" setting?',
'The Swift Extension has detected a change in the selected Xcode which does not match the value of your "swift.path" setting. Would you like to update your configured "swift.path" setting?',
'The Swift Extension has detected a change in the selected Xcode which does not match the value of your "swift.path" setting. Would you like to update your configured "swift.path" setting?',
108
+
"Remove From Settings",
109
+
"Select Toolchain"
110
+
);
111
+
});
108
112
109
-
test("Warns that setting is out of date on startup",async()=>{
110
-
pathConfig.setValue("/path/to/swift/bin");
113
+
test("Remove setting",async()=>{
114
+
mockedVSCodeWindow.showWarningMessage.resolves("Remove From Settings"asany);
'The Swift Extension has detected a change in the selected Xcode which does not match the value of your "swift.path" setting. Would you like to update your configured "swift.path" setting?',
'The Swift Extension has detected a change in the selected Xcode which does not match the value of your "swift.path" setting. Would you like to update your configured "swift.path" setting?',
'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?',
159
+
"Remove From Settings",
160
+
"Select Toolchain"
161
+
);
162
+
});
163
+
164
+
test("Remove setting",async()=>{
165
+
mockedVSCodeWindow.showWarningMessage.resolves("Remove From Settings"asany);
'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?',
0 commit comments