willcrichton / flowistry

Flowistry is an IDE plugin for Rust that helps you focus on relevant code.
https://marketplace.visualstudio.com/items?itemName=wcrichton.flowistry
MIT License
1.88k stars 44 forks source link

Allow setting rustflags required to build codebase #56

Closed duarten closed 2 years ago

duarten commented 2 years ago

If a codebase requires a rustflag to be able to build (e.g., tokio_unstable), then flowistry won't be able to do it. It would be nice if flowistry picked up .cargo/config or accepted a set of rustflags.

willcrichton commented 2 years ago

Good suggestion. Seems like Rust Analyzer has a config option for this, we could do something similar: https://users.rust-lang.org/t/how-to-tell-rust-analyzer-about-target-features/75332/3

repi commented 2 years ago

we just ran into this exact same problem and same missing flag for unstable tokio features when testing out flowistry in our codebase, so +1.

willcrichton commented 2 years ago

I realized actually this was actually a bug due to Flowistry unnecessarily overriding RUSTFLAGS. It will be fixed in the next release.

repi commented 2 years ago

thanks can confirm this fixed in the latest release resolved the issue we were seeing!