[PATCH] D54952: [clangd] DO NOT SUBMIT. Draft interfaces for build system integration.

Manuel Klimek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 28 02:28:25 PST 2018


klimek added inline comments.


================
Comment at: clangd/BuildSystem.h:29
+/// Default compilation database used by clangd, based on the build system.
+class Integration : public GlobalCompilationDatabase {
+public:
----------------
'Integration' is a bit of a weird name, as it doesn't tell me what it does.
What I'd have expected is an abstraction like 'Workspace' (which I believe is a domain term in IDEs) that would:
-> be in some form coupled to 1 build system
-> provide a file system view on the workspace
-> provide the ability to watch for changed files

Then the BuildSystem would:
-> provide the ability to watch for changed inputs / commands
-> provide the ability to "prepare all inputs"
-> potentially provide the ability to get a build graph

If Integration wants to be that, it should:
- not extend GlobalCompilationDatabase
- not have getCompileCommand itself


================
Comment at: clangd/BuildSystemPlugin.h:31
+  /// The 'compile_commands.json' has a weight of 1.
+  virtual float weight() = 0;
+  /// Attempt to detect and load the build system that resides in \p Dir.
----------------
Do you actually foresee more than 1 being available in a single workspace? Feels a bit premature generalization to me :)


Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54952/new/

https://reviews.llvm.org/D54952





More information about the cfe-commits mailing list