gecko-dev/config/makefiles
Nika Layzell 665766a29c Bug 1759555 - Part 2: Partially configure rust-analyzer for ./mach ide vscode, r=glandium,andi
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
2022-08-09 14:12:12 +00:00
..
xpidl
autotargets.mk
debugmake.mk Bug 1745074 - Remove unused FILTER and IMPLIB substs. r=firefox-build-system-reviewers,andi 2021-12-10 03:27:26 +00:00
functions.mk
makeutils.mk
nonrecursive.mk
rust.mk Bug 1759555 - Part 2: Partially configure rust-analyzer for ./mach ide vscode, r=glandium,andi 2022-08-09 14:12:12 +00:00
target_binaries.mk