Make it easy to use clangd
(i.e. an IDE) with the engine (especially post-RBE)
#148519
Labels
c: proposal
A detailed proposal for a change to Flutter
e: engine-tool
Engine-specific tooling (i.e. `tools/engine_tool`).
e: rbe
Related to `RBE` or toolchains in the engine.
P3
Issues that are less important to the Flutter project
team-engine
Owned by Engine team
triaged-engine
Triaged by Engine team
It was and still is possible to use
clangd
(i.e. with the VSCode clangd plugin) while working in the engine.For example, here is an excerpt of my workspace settings (JSON):
Even before RBE, this required manual configuration, and requires re-configuration as you change platforms (for example, editing C++ code that uses Android-only dependencies requires the
--compile-commands-dir
to point to a../out/android_*
target).Post RBE, the default
--compile-commands-dir
for Google employees uses flags (wrappers) unrecognized byclangd
:One workaround is to intentionally create and use a target output that opts out of RBE:
Problems to address (outside of having to do all this manually):
By default, this produces many broken links as a result of (mostly Impeller?) generators that need to run. One such example:
# There are about ~3 sets of targets that need to be built so that clangd finds all generated files. ninja -C ../out/host_debug_unopt_arm64_ide shader_fixtures
Because this target is not actually used, it will frequently get out of date. That is, you will need to need to
gclient sync -D
and reset GN arguments for both the target you're actually working on (i.e.
host_debug_unopt_arm64
, using RBE), and this stub target (host_debug_unopt_arm64_ide
).I'm opening this issue to solicit ideas for addressing this. Incremental is good, automated is good, tested is better.
The text was updated successfully, but these errors were encountered: