Skip to content

"build scripts have not been built" is shown while crates are being loaded #20130

@RalfJung

Description

@RalfJung

After opening Miri in vscode, if I have the miri-script/src/commands.rs file open while the workspace loads, it shows errors like this:

Image

If I wait a bit and then switch to a different file, the error disappears. (Just waiting without switching the file does not seem to make it disappear.)

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

rustc version: rustc 1.90.0-nightly (fdad98d74 2025-06-30)

editor or extension: VSCodium, extension version 0.3.2519

relevant settings:

{
    "rust-analyzer.rustc.source": "discover",
    "rust-analyzer.linkedProjects": [
        "Cargo.toml",
        "cargo-miri/Cargo.toml",
        "miri-script/Cargo.toml",
    ],
    "rust-analyzer.check.invocationStrategy": "once",
    "rust-analyzer.check.overrideCommand": [
        "./miri",
        "clippy",
        "--message-format=json",
    ],
    "rust-analyzer.cargo.extraEnv": {
        "MIRI_AUTO_OPS": "no",
        "MIRI_IN_RA": "1",
    },
    // Contrary to what the name suggests, this also affects proc macros.
    "rust-analyzer.cargo.buildScripts.invocationStrategy": "once",
    "rust-analyzer.cargo.buildScripts.overrideCommand": [
        "./miri",
        "check",
        "--message-format=json",
    ],
}

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

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