rust-lang / rust-lang/rust-analyzer

Unresolved module rust-analyzer error when `@` character is in path.

Open
#13,909 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-nameres C-bug
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

I am running into a bug with similar symptoms as in this issue: https://github.com/rust-lang/rust-analyzer/issues/5484, but the cause seems to differ slightly.

When accessing a file in a project with a file system path including a @ character, rust-analyzer cannot find files included via mod.

When accessing the file through a symlink with a path without the @ character, rust-analyzer works as expected.

rust-analyzer version: rust-analyzer 0.3.1348-standalone

rustc version: rustc 1.66.0

relevant settings: Using via https://github.com/fannheyward/coc-rust-analyzer

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with a project whose filesystem path contains @, then compare module resolution when accessing it directly and through a symlink without @. Trace rust-analyzer's path handling and module resolution; done when files included via mod resolve correctly from the path containing @.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.