-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
There is no task provider registered for tasks of type "cargo" for VSCode workspace, again #16949
Comments
Same here. Using VSCodium on Linux. I didn't change anything in my project configuration, today it does not build using Ctrl+Shift+B or explicitly entering "Run: Tasks" -> "rust: cargo build" and the error is shown for me as well. However, clicking the "Run", "Debug" and "Run Tests" hyperlinks shown inside the code editor above main and tests does still work and also F5 to start debugging (which I have configured to launch with LLDB) works as always. So it seems quite specifically related to the cargo build task. |
Same too. |
Likewise, experiencing this issue :( |
Are you sure? I get the same error in v0.3.1868 and v0.3.1885. |
Same issue, vscode with RA 0.3.1896 (on Linux 6.5.0-26), no issue on 0.3.1885 |
Can anyone bisect this? |
Hmmm … now I've built a binary to check, but how do I use it with my VSCode?
|
|
This refers to commit 2e109c7, but someone deeper involved should take it from here, I know nothing about the vscode extension API. |
CC @Wilfred I wonder why these were broken for me though. |
Thanks for the ping, I'll take a look. Sorry about this. |
OK, this is an issue with how tasks are defined, because they're a user-facing API through tasks.json or If you need a workaround right now and can't downgrade, you can define your task as a
|
I think there's another issue with the task declaration in package.json, it doesn't allow |
Fix tasks in tasks.json #16839 refactored the representation of tasks inside the VS Code extension. However, this data type is exposed to users, who can define their own tasks in the same format in `tasks.json` or `.code-workspace`. Revert the data type to have a `command` field rather than a `program` field, and document the different fields. This code is also a little complex, so split out a `cargoToExecution` to handle the Task to Execution conversion logic. After this change, any tasks.json with a `command` field works again. For example, the following tasks.json works as expected: ``` { "version": "2.0.0", "tasks": [ { "type": "cargo", "command": "build", "problemMatcher": [ "$rustc" ], "group": "build", "label": "my example cargo build task" } ] } ``` Fixes #16943 #16949
Still broken in |
The fix got merged today so it will land on next monday (or tomorrow for the nightly / 0.4 version) |
I confirm that the prerelease version currently available fixes the issue for me. Thanks for fast action! |
Will close this then, thanks for confirming! |
This started happening to me yesterday. I upgraded to the pre-release version but it is still broken for me there. |
Do you have an example task? The ones I tested worked fine |
I have bindings for commands like |
I'm experiencing the exact same issue as #9093, but in the latest version. The previous 0.3.1885 does not have issue.
rust-analyzer version: 0.3.1896
rustc version: 1.77.0 stable
The text was updated successfully, but these errors were encountered: