зеркало из https://github.com/mozilla/gecko-dev.git
665766a29c
In order to allow rust-analyzer to be able to use the build script in the mozbuild crate to discover the configuration information, this patch adds new flags to the vscode config to tell rust-analyzer to invoke cargo through `./mach cargo check`, and use the correct target directory within the objdir rather than `$(topsrcdir)/target`. Due to the virtual filesystem used by rust-analyzer not including files in the object directory, this is not sufficient to get suggestions for symbols from the included files, however it will accurately fetch diagnostics upon save and run things like proc macros. A new feature will likely need to be added to rust-analyzer to allow us to specify additional paths to add to the source root for packages to fix that issue. Due to this change using `./mach cargo check`, rather than running it independently, we don't run into issues caused by running `check` against crates in the workspace which aren't being used, making the diagnostics more useful. An additional feature needed to be added to `./mach cargo check` to allow specifying `--message-format=json`. I am open to suggestions for a more elegant way to communicate this flag into the makefile. Depends on D153269 Differential Revision: https://phabricator.services.mozilla.com/D153270 |
||
---|---|---|
.. | ||
xpidl | ||
autotargets.mk | ||
debugmake.mk | ||
functions.mk | ||
makeutils.mk | ||
nonrecursive.mk | ||
rust.mk | ||
target_binaries.mk |