-
Notifications
You must be signed in to change notification settings - Fork 2
"Given directory does not exist" from rust-analyzer #6
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
Comments
I've done some debugging and it seems that Rustc takes "prql" (the workspace directory) as the cwd (current working directory) when running the proc macro, while rust-analyzer takes "prql/prqlc/prqlc" (the subcrate) as the cwd. So this is indeed an issue of rust-analyzer. I think it's best to open an issue on the rust-analyzer repo https://github.com/rust-lang/rust-analyzer/ I learned the following things:
|
Thanks @JonathanBrouwer . Do you know how the path is represented after the macro is expanded? That could help with a smaller example which I can put into rust-analyzer. |
The problem is not how the macro is expanded, the problem is that the environment during execution is wrong. I've made a simple example:
I've pushed the code to a branch available here: Using |
Great case, thanks! I put the issue in |
Fixed in rust-analyzer. |
Possibly this is an issue with rust-analyzer, but posting here to see whether it's helpful feedback for this crate.
At https://github.com/PRQL/prql/blob/d3ed63e250b9368fbcbaa1984eef42a382a23aa5/prqlc/prqlc/tests/integration/queries.rs#L14, each of the invocations gets an error "Given directory does not exist".
It compiles & tests fine.
It's not related to the in-path module, since I tried removing that and still get the error:
Thanks for any guidance!
The text was updated successfully, but these errors were encountered: