sammccall added a comment.

@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).

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...

@ivanmurashko

Yes, my experience is that in practice people object to e.g. removing things 
without replacement, even in an "unstable" API.
Heck, *I* object to that, because it's often disruptive, and in practice people 
do put effort into making transitions easier.

I think this is a bit abstract though. Concretely, what API do you need here? 
e.g. which headers do you want to include, to what end?

My impression so far is that you actually don't need an API, but rather to link 
some extra libraries into an otherwise-unmodified clangd binary, and that being 
able to call `clangdMain()` from an external source file would make this easier 
in your build system. That seems like a problem worth solving, but installing 
all clangd's private headers into /usr/lib doesn't seem like a particularly 
direct solution.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145228

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to