Skip to content

Canceling initial check build does not work #13348

Closed
@RalfJung

Description

@RalfJung

To reproduce:

  • start vscode with RA on a rustc checkout that is out-of-date (e.g., touch library/core/src/lib.rs)
  • once it gets going, do ./x.py test src/test/ui in a terminal
  • now it waits for the lock that RA grabbed for its check-build. in RA, do "cancel running flychecks".

Expected behavior:

  • the build in the terminal starts

Actual behavior:

  • the check build keeps going. I can see in htop that there's still a check build running, started by RA

Strangely, that build is out-of-sync with the flycheck status bar at the bottom of the vscode window: usually it shows there the last crate whose check was completed, but in cases like this that status bar either shows some very early crate from the library (despite the check build already being long past that, and working on rustc crates), or it doesn't show any completed crates at all. It seems almost as if RA would kick off two checkbuilds, a flycheck and something else, and even the flycheck is blocked waiting for that other build to complete. I have proc macro support disabled though so I cannot think of why it would do that.

rust-analyzer version: rust-analyzer version: 0.3.1221-standalone

rustc version: (rustc bootstrap)

relevant settings:
workspace settings

    "rust-analyzer.rustc.source": "./Cargo.toml",
    "rust-analyzer.linkedProjects": [
        "./Cargo.toml",
        //"./src/bootstrap/Cargo.toml"
    ],
    "rust-analyzer.checkOnSave.overrideCommand": [
        "./x.py",
        "check",
        "--json-output",
        "library/std",
        "compiler/rustc",
        //"compiler/rustc_codegen_cranelift",
        //"src/tools/miri",
    ],
    // This also affects proc macros.
    "rust-analyzer.cargo.buildScripts.overrideCommand": [
        "./x.py",
        "check",
        "--json-output",
        "compiler/rustc",
    ],
    "rust-analyzer.rustfmt.overrideCommand": [
        "./build/x86_64-unknown-linux-gnu/stage0/bin/rustfmt",
        "--edition=2021"
    ],
    "files.watcherExclude": {
        "*rustc*/src/llvm-project/**": true,
        "*rustc*/build/**": true,
    },
    "files.exclude": {
        "src/llvm-project/**": true,
        "build/**": true
    },
    "rust-analyzer.cargo.buildScripts.enable": false,
    "rust-analyzer.procMacro.enable": false,

user settings

    "rust-analyzer.lens.enable": false,
    "rust-analyzer.cargo.buildScripts.useRustcWrapper": false,
    "rust-analyzer.cargo.buildScripts.enable": false,
    "rust-analyzer.procMacro.enable": false,
    //
    "rust-analyzer.diagnostics.disabled": [
        "unlinked-file", // I guess for "normal" projects unlinked files are strange, for me they are common
        "unresolved-module", // https://github.com/rust-lang/rust-analyzer/issues/9173
        "unresolved-extern-crate", // https://github.com/rust-lang/rust-analyzer/issues/12926
        "type-mismatch", // https://github.com/rust-lang/rust-analyzer/issues/1109
    ],

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions