Skip to content

Diagnostics show "Unknown crate (2)" for even for some of the valid crates #45455

@sarmadgulzar

Description

@sarmadgulzar

Reproduction steps

  1. Start a new project
cargo new helloworld
  1. Open the project in Zed
zed helloworld
  1. Add rust_decimal package
cargo add rust_decimal
  1. Open the Cargo.toml file and there'll be yellow squiggly lines under the version number of rust_decimal package. Hovering on it shows this message: rust_decimal: Unknown crate (2)

Current vs. Expected behavior

Current behavior: The diagnostics incorrectly show the "Unknown crate" warning even for valid crates.

Image

Expected behavior: For valid crates, this warning shouldn't be shown.

Zed version and system specs

Zed: v0.217.3+stable.105.80433cb239e868271457ac376673a5f75bc4adb1 (Zed)
OS: macOS 26.2
Memory: 16 GiB
Architecture: aarch64

Attach Zed log file

Zed.log

Relevant Zed settings

settings.json

Relevant Keymap

keymap.json

(for AI issues) Model provider details

No response

If you are using WSL on Windows, what flavor of Linux are you using?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:diagnosticsFeedback for diagnostics, error messages, logs, etcarea:languages/rustRust programming language supportfrequency:uncommonBugs that happen for a small subset of users, special configurations, rare circumstances, etcpriority:P3Papercuts, minor issues with a clear workaround, cosmetic bugsstate:needs infoIssue that needs more information from the userstate:needs reproNeeds reproduction steps / someone to reproduce

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions