Skip to content

if a package becomes a lib+bin package mid-edit, ra requires a restart to notice #19849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lolbinarycat opened this issue May 22, 2025 · 0 comments
Labels
C-bug Category: bug

Comments

@lolbinarycat
Copy link

lolbinarycat commented May 22, 2025

rust-analyzer version: rust-analyzer 1.86.0 (05f9846 2025-03-31)

rustc version: rustc 1.86.0 (05f9846f8 2025-03-31)

editor or extension: emacs eglot

relevant settings: eglot-ensure in rust-mode-hook

reproduction steps

  1. cargo init --lib
  2. open the newly created src/lib.rs in editor
  3. open (nonexistent) src/main.rs in editor, add fn main() {}, save file
  4. you will still be getting an unlined-file error and all LSP features will not work except highlighting error/warning lines

workaround: restart rust-analyzer (in emacs this can be done with M-x eglot)

@lolbinarycat lolbinarycat added the C-bug Category: bug label May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

1 participant