ProcMacroSrv executed outside of workspace directory #11518
Labels
C-support
Category: support questions
S-unactionable
Issue requires feedback, design decisions or is blocked on other work
rust-analyzer version: (eg. output of "Rust Analyzer: Show RA Version" command)
rust-analyzer version: 02904e9 2022-02-14 stable
rustc version: (eg. output of
rustc -V
)rustc 1.58.1 (db9d1b20b 2022-01-20)
relevant settings: (eg. client settings, or environment variables like
CARGO
,RUSTUP_HOME
orCARGO_HOME
)It seems like during proc-macro expansion in
ProcMacroSrv::expand
the task's current dir is not the workspace directory.I'm not sure how to debug this properly but what I suspect is happening is that the cwd and env vars of the
ExpandMacro
are not the workspace and workspace env vars. so that, if a proc-macro that expands depending onCARGO_MANIFEST_DIR
and expects this path to point to the current workspace, it can generate different token trees for RA insideProcMacroSrv
.The text was updated successfully, but these errors were encountered: