Skip to content
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

Rust analyzer fails to pick up Pyo3 proc-macros #4914

Open
Ruhrpottpatriot opened this issue Feb 14, 2025 · 0 comments
Open

Rust analyzer fails to pick up Pyo3 proc-macros #4914

Ruhrpottpatriot opened this issue Feb 14, 2025 · 0 comments
Labels

Comments

@Ruhrpottpatriot
Copy link

Bug Description

When using pyo3 inside VSCode with rust-analyzer, rust-analyzer fails to compile the proc macros. See the attacked image.

Image

Steps to Reproduce

  1. Create a new virtual environment with python -m venv .venv
  2. Activate the new virtual environment
  3. Install Maturin with pip install maturin
  4. Create a new maturin project with maturin init --name foo
  5. Open the lib.rs file and see rust-analyzer complaining

Backtrace

Your operating system and version

Windows 10 10.0.19045 Build 19045

Your Python version (python --version)

Python 3.12

Your Rust version (rustc --version)

rustc 1.84.1 (e71f9a9a9 2025-01-27)

Your PyO3 version

0.23.3

How did you install python? Did you use a virtualenv?

python -m venv .venv

Additional Info

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant