-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Unexpected Activation of rust-analyzer in a Swift Project #17018
Comments
Can you check the extension host logs? It should tell you what the activation event is that triggered rust-analyzer. Also please check if this also happens with only rust-analyzer and your swift extension enabled and nothing else. There are certain VSCode APIs that some extensions use that activate all extensions registering task providers iirc (something we cant do anything about) |
I tried on Windows (an environment that has detached from the Swift language) and removed all extensions.
|
It seems to be working fine for me on macOS. Could you create a new project for testing? What debugging extension are you using (CodeLLDB or others)? Could you share your configuration? |
Something in your setup is kicking off all |
CC #14231 |
{
"configurations": [
{
"type": "lldb",
"request": "launch",
"sourceLanguages": [
"swift"
],
"args": [],
"cwd": "${workspaceFolder:SwiftLearning}",
"name": "Debug SwiftLearning",
"program": "${workspaceFolder:SwiftLearning}/.build/debug/SwiftLearning",
"preLaunchTask": "swift: Build Debug SwiftLearning"
},
{
"type": "lldb",
"request": "launch",
"sourceLanguages": [
"swift"
],
"args": [],
"cwd": "${workspaceFolder:SwiftLearning}",
"name": "Release SwiftLearning",
"program": "${workspaceFolder:SwiftLearning}/.build/release/SwiftLearning",
"preLaunchTask": "swift: Build Release SwiftLearning"
}
]
} This is the launch.json, it seems the problem lies with the "preLaunchTask". |
Hello,
I am currently working on a Swift project in Visual Studio Code and have encountered an unexpected behavior with the rust-analyzer extension.
When I press the F5 key to debug my Swift project, the rust-analyzer extension is being triggered. This is unexpected as the rust-analyzer extension should ideally only respond to Rust projects.
Here are the steps to reproduce the issue:
Minimum Reproduction Code: https://github.com/mole828/SwiftLearning/tree/02435b6a83b9c09d936cae252cd5821a74ffcd4c
Clone the Swift project from this repository.
Open the project in Visual Studio Code.
Press F5 to start debugging.
Expected Behavior: The Swift debugger should start.
Actual Behavior: The rust-analyzer extension is triggered.
I have checked my workspace settings and confirmed that they are correctly set up for a Swift project. I have also verified that the launch.json file in the .vscode directory is correctly configured for Swift debugging.
I would appreciate any guidance on how to prevent rust-analyzer from being activated when working on a Swift project.
Thank you for your time and assistance.
The text was updated successfully, but these errors were encountered: