rust-lang / rust-lang/rust-analyzer

Failed autocomplete for `bevy_transform::components::Transform`

Open
#15,992 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

When using bevy, one can autocomplete Transform from bevy::prelude::Transform just fine. However, this is a re-export from bevy_transform, and when depending directly on that crate it does not show up, as can be seen in the attached screenshot.

2023-11-29-224140-f

There is nothing very interesting going on with how this crate exports this type, so I'm really baffled why it wouldn't show up.

In bevy_transform, we have:

// lib.rs
...
pub mod components;
...
// components/mod.rs
...
mod transform;
pub use transform::*;
...
// components/transform.rs
...
pub struct Transform { ... }
...

rust-analyzer version: rust-analyzer 1.74.0 (79e9716 2023-11-13)

rustc version: rustc 1.74.0 (79e9716c9 2023-11-13)

relevant settings: I don't think there's anything interesting at play here.

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 missing autocomplete using the bevy_transform exports shown in lib.rs, components/mod.rs, and components/transform.rs, then trace rust-analyzer's autocomplete handling for this re-export pattern. Done means Transform is suggested when depending directly on bevy_transform, as it already is through bevy::prelude::Transform.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
developer-experience, tooling
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.