Open IceTDrinker opened 2 years ago
you wanna set the RUSTFLAGS in server.extraEnv
instead of runnableEnv
, that way all the cargo processes r-a spawns will spawn with that env flag. Otherwise there is currently no way to set different things here for debug vs release builds
I think it worked with runnableEnv
(I'm not sure now ๐
) but ok noted that there is no per profile setting!
it might, but if you have RUSTFLAGS set you want to mirror them for the server usually as otherwise cargo will do a bunch of rebuilds usually.
it might, but if you have RUSTFLAGS set you want to mirror them for the server usually as otherwise cargo will do a bunch of rebuilds usually.
Yep sounds right!
Hello!
First I would like to say a big thank you for this wonderful extension, really makes working with Rust in VSCode a breeze once a bit of configuration is done ๐
I'm currently facing a case where we use different RUSTFLAGS between our debug and release builds. rust-analyzer seems to be using mostly the debug build, I tried setting some RUSTFLAGS (the ones for the release profile) through the runnableEnv config, this invalidated the build cache as there was a mismatch between the standard debug flags I use to build stuff in my terminal and the ones (for release) that rust-analyzer used as I set them in the configuration.
So the question is: how hard would it be to have runnableEnvs on a per config basis (debug, release) and more (?) (test, bench) not sure if it makes sense to have additional envs for test and benches, but I guess it could be useful.
Maybe it's already doable and I don't see it!
Otherwise maybe you can point to the relevant code in here and I might be able to contribute something if it's not a high priority feature!
Cheers