-
Notifications
You must be signed in to change notification settings - Fork 57
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
Windows VSCode do not show error UI. Im new to swift #1226
Comments
Hi, are you building your code from the command line or from within VS Code? You may have to try and build your code once first from within VS Code using either If that doesn't work and you're still not seeing any problems in the Problems tab could you run |
When I modify the code, the error will not disappear. |
In your VS Code User |
YES. I try it. Does not work. By the way, it can show Inline Hint but not error |
@wolonge95 that output view you pictured is from sourcekit-lsp, if you run the |
Also although "swift.diagnosticsStyle" can be set to "swift" or "llvm", the "llvm" one is better so we can capture related issues |
yes, task outputs problems. And inline hint works, code completion works, api doc works. Just not show error. |
@wolonge95 nothing is jumping out. It seems like you should be able to get diagnostics from the language server or tasks. Can you double check you haven't modified settings like |
Yeah, I do not change anything. My VSCode works for other languages. settings relate swift:
|
Have the same problem here on Windows 11. The editor inline error can be shown after manually running the build all task, but they are not updated in real time. Even after fixing the error, the inline error messages are still there and I have to manually run the build task again After manually running build all task After fixing the error Using the background compilation can be a workaround, but I don't really like it. |
@wolonge95 @Star-Lord-PHB I was able to reproduce. Debugging on windows, the extension was not getting diagnostics from the language server, raised swiftlang/sourcekit-lsp#1855 |
Seems like swiftlang/sourcekit-lsp#1855 has been fixed, so possibly things are working now. I can look into this again. |
Confirmed that this issue has been fixed in recent versions of the toolchain. Checked with the main branch version of
For now (as of release 6.0.3) a development snapshot from https://www.swift.org/install/windows/#development-snapshots would be needed to have diagnostic error and warning messages. You may have to uninstall the existing version first to install the new version. Future release versions should work out of the box. |
Great! Thanks for checking this out @rbenegal. |
error code like below, vscode editor do not show error annotations, seems like nothing wrong, and not show in Problems view.
But have this in Output view :
Im new to swift. Want to try it. So I install swift follow the instructions on swift.org . Im on windows 11.
I can run "Hello world" in terminal, so I think everything is ok. But vscode spent a lot of time, it does not work as expected.
Expected behavior
Error shows in editor UI, and Problems view.
Environment
Swift version 6.0.2 (swift-6.0.2-RELEASE)
Target: x86_64-unknown-windows-msvc
Additional context
A few hours ago, I installed everything.
The text was updated successfully, but these errors were encountered: