Skip to content

Rust-Analyzer Hangs and Fails to Display Errors with Local Proc-macro-Crate Dependency #17786

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

Closed
SchlexanderOlz opened this issue Aug 4, 2024 · 5 comments
Labels
C-bug Category: bug

Comments

@SchlexanderOlz
Copy link

rust-analyzer version: 0.3.2020-standalone

rustc version: 1.80.0 (051478957 2024-07-21)

editor or extension: VSCode rust-analyzer v0.3.2020

relevant settings:

repository link (if public, optional):

code snippet to reproduce:

Issue Description:
When adding a local crate dependency in the Cargo.toml the rust-analyzer enters an endless loop without any error output. Code completion still works, but no errors are displayed. The issue does not occur with no local dependency. I have tried removing the local dependency and calling cargo clean, which fixes the issue, but I obviously now can't use that local library I need.

Before this issue I have faced a similar one by updating to the latest rust-analyzer version. I tried to fix the issue as described in #17765 and #17744 but none of the approaches worked. I then tried downgrading the analyzer version to 0.3.2020 which is where I am currently at.

Cargo.toml of the main crate:

[package]
name = "monitoring-data"
version = "0.1.0"
edition = "2021"

[dependencies]
redisadapter_derive = { path = "../redisadapter_derive" }
redis = { version = "0.25.4" }
tracing = "0.1.40"

[features]
default = ["redis"]
redis = []

Cargo.toml of the derive-macro crate:

[package]
name = "redisadapter_derive"
version = "0.1.5"
edition = "2021"

[lib]
proc-macro = true

[dependencies]
syn = "1.0"
quote = "1.0"
proc-macro2 = "1.0.86"
lazy_static = "1.5.0"
@SchlexanderOlz SchlexanderOlz added the C-bug Category: bug label Aug 4, 2024
@JohnGrubba
Copy link

It works for me 🙄

@LiamKrenn
Copy link

Couldn't replicate the issue, sorry please close

@JohnGrubba
Copy link

thumbnail

@julikober
Copy link

Can't replicate. Probably already fixed. Try updating your system. Please close

@SchlexanderOlz
Copy link
Author

Issue has nothing to do with mentioned issues #17765 and #17744. The issue was dead-locking in the local proc-macro crate

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

4 participants