rust-lang / rust-lang/rust-analyzer

Build process keeps running in the background after closing vscode

Open
#22,732 0 comments 0 reactions 1 assignee View on GitHub

@ChayimFriedman2 is already working on this.

Since Jul 7, 2026.

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

Description

When working in a rustc checkout, some process spawned by RA kept running in the background even after closing vscode, holding the build lock, and preventing me from finishing the git commit call. I had to do killall curl to fix that (looks like bootstrap was stuck trying to download rustc over a way too slow train internet connection).

Before quitting vscode, I also tried "cancel running flychecks", which did not help either. The stuck command wasn't a flycheck, it was the build script / proc macro building command. But I would expect that, too, to be canceled when quitting vscode.

The status bar looks like this while this happens (i.e. just before I quite vscode):

Image

rust-analyzer version: rust-analyzer version: 0.3.2955-standalone [/home/r/.vscode-oss/extensions/rust-lang.rust-analyzer-0.3.2955-linux-x64/server/rust-analyzer]

rustc version: rustc dev tree

editor or extension: VSCodium, extension version 0.3.2963

relevant settings: a lot :)

{
    "rust-analyzer.linkedProjects": [
        "Cargo.toml",
        "library/Cargo.toml",
        "src/bootstrap/Cargo.toml",
        "compiler/rustc_codegen_cranelift/Cargo.toml",
        "compiler/rustc_codegen_gcc/Cargo.toml",
    ],
    "rust-analyzer.check.invocationStrategy": "once",
    "rust-analyzer.check.overrideCommand": [
        "./ra-check", "--json-output"
    ],
    "rust-analyzer.rustfmt.overrideCommand": [
        "${workspaceFolder}/build/host/rustfmt/bin/rustfmt",
        "--edition=2024",
    ],
    "rust-analyzer.procMacro.server": "${workspaceFolder}/build/host/stage0/libexec/rust-analyzer-proc-macro-srv",
    "rust-analyzer.cargo.buildScripts.invocationStrategy": "once",
    "rust-analyzer.cargo.buildScripts.overrideCommand": [
        "python3", "x.py", "check",
        "library", "compiler", "miri",
        "--json-output",
        "--compile-time-deps",
        "--set", "rust.download-rustc=false",
    ],
    "rust-analyzer.server.extraEnv": {
        "RUSTC": "${workspaceFolder}/build/host/stage0/bin/rustc",
        "CARGO": "${workspaceFolder}/build/host/stage0/bin/cargo",
    },
    "rust-analyzer.rustc.source": "./Cargo.toml",
    "rust-analyzer.cargo.sysrootSrc": "./library",
    "rust-analyzer.cargo.extraEnv": {
        "RUSTC_BOOTSTRAP": "1"
    },
    // Some diagnostics don't work properly here
    "rust-analyzer.diagnostics.enable": false, // due to <https://github.com/rust-lang/rust-analyzer/issues/13504>, we have too many errors
    //
    "files.watcherExclude": {
        "build": true,
    },
    "files.exclude": {
        "build": true
    },
}

repository link (if public, optional): https://github.com/rust-lang/rust/

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.