Hi @0xTim back in Dec '21 you posted an invite to the #vscode-swift Slack channel that "shouldn't expire". Guess what, it expired If the Slack channel is still active in any meaningful sense, could you post another invite? Cheers!
On the subject if the VSCode Swift extension, does anyone know if it is still in full working order? I am finding that while it displays the syntax highlighted Swift code very prettily, it doesn't seem to be highlighting any syntax errors at all. The same code in Xcode is showing more than a few, currently
Yep here you go, Slack claims this should work!
Join me on Slack -- it’s a faster, simpler way to work. Sign up here, from any device: Slack
Yes it should be working well. There have been lots of updates so 5.9 is more stable and the next version should pull in some fixes as well. The debug output should show any source kit errors
SourceKit may not be active yet. VS Code also has syntax highlighting based on TextMate grammars, so that may be what you're seeing.
Once you build the project (either from VS Code, or from the command line), you should notice improved (semantic) syntax highlighting, and see syntax errors highlighted.
Yep! That worked fine, Thanks!
Accessing Slack, that is...
However, an attempted build in
Xcode reveals ~ 50 errors (to be expected - it's a large number of lines, originally in Java!) but
VSCode clone) + the
Swift plugin nonchalantly says "No problems have been detected in the workspace", while attempting to build from the command line with
swift build just results in
error: terminated(1): /usr/bin/xcrun --sdk macosx --show-sdk-platform-path output: xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation xcrun: error: unable to lookup item 'PlatformPath' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
I can just work through the errors in Xcode but it's a bit of a cumbersome job, and I feel that if I could just get the VSCode Swift extension working properly, life would be a bit simpler...
If anyone could shed some light on all this, I'd be really grateful
Can you run
sudo xcode-select -s /Applications/Xcode.app (or whatever path Xcode is installed in)?
I tried that and then ran
swift build again. I got a different response this time...
error: Could not find Package.swift in this directory or any of its parent directories.
It gives me a bit more to investigate, so progress I guess!