[PATCH] D145228: [clangd] Add clangd headers to install targets

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 7 05:20:32 PST 2023


aaron.ballman added a comment.

In D145228#4174829 <https://reviews.llvm.org/D145228#4174829>, @sammccall wrote:

> @aaron.ballman
>
> If someone wants to work on producing a more modular, component-based design, that's probably a good idea (but tricky to get right). Probably a good place to start is working out what pieces can be moved into separate libraries with e.g. a coherent layering story, thinking about how they might be reused in other tools etc.
>
> Exposing all clangd's headers as-is is not that. I don't think the idea that llvm-project is modular is at odds with the idea that leaf subprojects exist, though clangd is big enough that it may make sense to split up. And private headers (those that live next to source files in the tree) are not installed (with the recent exception of `clang-tidy`, which IMO should have been restructured to publish in this way).

Ah, okay, thank you for the clarification! I agree we have to go about splitting the project up into libraries very carefully and this approach isn't appropriate. But I was getting the impression there was push-back against the idea of making clangd into a series of libraries in general and that worried me.

> FWIW, I do think clang is a fair example of a project where the default of "everything is a public library" has made the library design somewhat incoherent and hard to evolve. OTOH it's enabled tons of useful stuff, so...

IMO, we've not really had too many issues evolving Clang's libraries, but I do think there's room for improvement (it's hard to figure out how to split up Sema, for example). As you say, it's not an easy problem to solve but it enables a lot of really useful stuff we wouldn't otherwise be able to achieve as easily.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145228



More information about the cfe-commits mailing list