Skip to content

In rustc workspace, cranelift errors are ignored #8937

Open
@RalfJung

Description

@RalfJung

My rustc workspace settings.json looks like this:

{
    "rust-analyzer.checkOnSave.overrideCommand": [
        "./x.py",
        "check",
        "--json-output",
        "library/std",
        "compiler/rustc",
        "compiler/rustc_codegen_cranelift",
    ],
    "rust-analyzer.rustfmt.overrideCommand": [
        "./build/x86_64-unknown-linux-gnu/stage0/bin/rustfmt"
    ],
    "rust-analyzer.cargo.runBuildScripts": false,
    "rust-analyzer.procMacro.enable": false,
    "editor.formatOnSave": false,
    "files.watcherExclude": {
        "*rustc*/src/llvm-project/**": true,
        "*rustc*/build/**": true,
    },
    "files.exclude": {
        "src/llvm-project/**": true,
        "build/**": true
    },
}

However, it seems like RA for some reason ignores the compiler/rustc_codegen_cranelift part of the check-on-save command: even when I deliberately introduce an error in, e.g., compiler/rustc_codegen_cranelift/src/constant.rs, RA shows no diagnostic at all. Running the exact command that is given here on the console does show an error. Errors in rustc itself are shown. It's almost as if RA just "forgets" to pass the last argument to x.py. (Yes I did "reload window" after changing my settings.json. I even tried restarting vscode.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cargocargo related issuesA-diagnosticsdiagnostics / error reportingC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions