mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-01 04:18:20 +00:00
fix: Pass .cargo/config.toml env vars to proc-macro server
This commit is contained in:
parent
2c05da15a9
commit
a981db53fa
6 changed files with 83 additions and 13 deletions
|
|
@ -13,6 +13,7 @@ mod version;
|
|||
|
||||
use indexmap::IndexSet;
|
||||
use paths::AbsPathBuf;
|
||||
use rustc_hash::FxHashMap;
|
||||
use span::Span;
|
||||
use std::{
|
||||
fmt, io,
|
||||
|
|
@ -107,8 +108,11 @@ pub struct MacroPanic {
|
|||
|
||||
impl ProcMacroServer {
|
||||
/// Spawns an external process as the proc macro server and returns a client connected to it.
|
||||
pub fn spawn(process_path: AbsPathBuf) -> io::Result<ProcMacroServer> {
|
||||
let process = ProcMacroProcessSrv::run(process_path)?;
|
||||
pub fn spawn(
|
||||
process_path: AbsPathBuf,
|
||||
env: &FxHashMap<String, String>,
|
||||
) -> io::Result<ProcMacroServer> {
|
||||
let process = ProcMacroProcessSrv::run(process_path, env)?;
|
||||
Ok(ProcMacroServer { process: Arc::new(Mutex::new(process)) })
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue