Skip to content

Formatting with rustfmt no longer works in rustc repository #10209

Closed
@RalfJung

Description

@RalfJung

It used to be the case that formatting worked even inside the rustc repo, but something seems to have broken since I last tried that (a few weeks ago). Now, when I ask RA to format a file in the rustc repo, nothing at all happens -- I see no error or other kind of feedback, and nothing gets formatted. (So there are at least 2 bugs here: formatting doesn't work, and error reporting also doesn't work.)

My workspace config is:

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

I verified that ./build/x86_64-unknown-linux-gnu/stage0/bin/rustfmt still exists. I can't see any rustfmt-related messages in the various "output" categories.

I updated vscode (v.1.60.0 now), which did not help. It says there are no extension updates available. RA has version v0.2.735.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bugS-unactionableIssue requires feedback, design decisions or is blocked on other work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions