rust-lang / rust-lang/rust-analyzer

Build task does not work after v0.3.1615

Open
#15,408 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

rust-analyzer version: v0.3.1615
vscode:

Version: 1.80.2 (system setup) Commit: 2ccd690cbff1569e4a83d7c43d45101f817401dc Date: 2023-07-27T20:40:28.909Z Electron: 22.3.14 ElectronBuildId: 22695494 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.22000

tasks.json contents
{ "version": "2.0.0", "tasks": [ { "type": "cargo", "command": "build", "problemMatcher": [ "$rustc" ], "group": "build", "label": "rust: cargo build" }, ] }
When I do cntrl-shft-B,
Error: there is no registered task type 'cargo'. Did you miss installing an ![BuildError](https://github.com/rust-lang/rust-analyzer/assets/21189075/ab77b9bc-57ff-4c36-8c55-84bd1cb49f55) extension that provides a corresponding task provider?
vscode UI shows the error attached

This started Today when I upgraded rust-analyzer to the new version, Cargo build from command line works.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the error with the supplied tasks.json and Ctrl+Shift+B, then inspect how the cargo task type is registered. Done means the task is recognized in VS Code and the configured cargo build runs without the missing task-provider error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, vscode
Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.