rnk wrote:

(This is mostly written wearing my "Googler" hat, not the clang area team lead 
hat)

There's been a lot of discussion of what the exact use case is. I think it's 
helpful to share the context that Google essentially uses Clang header modules 
to wrap generated proto headers, and this is critical for enabling our builds 
to scale. The details here about private modules, module wrappers, and textual 
inclusions are Blazel-generated, low-level implementation details that don't 
matter in the grand scheme of things. The intention is to provide a IWYU-clean, 
header module programming model that is efficient as possible, meaning 
sometimes the large generated proto header needs to be included textually, and 
sometimes handled as a module import.

I believe the arrangement of the module maps is changeable, but it is a 
low-level detail at the bottom of a performance critical system, so the lead 
time for changes is probably measured in months, not days, and probably 
requires significant effort.

Focusing back on the commit at hand, it would have forced our internal build 
system to provide thousands more header files as inputs to compilations across 
the system, and we can't afford to do that. We backed it out of the last few 
internal release candidates, but carrying it over requires manual effort. The 
purpose of the commit seems to have been to emit fewer errors, not more. I'm 
sure Google's usage of header modules relies on internal implementation details 
that it shouldn't, but we appreciate having more time to debug the issue, so 
thank you for the accommodation.

And, in the end, the folks debugging this (Ilya & co) are busy working on clang 
header module reproduction and reduction tools: 
https://github.com/emaxx-google/cvise/branches @emaxx-google 

Effective open source collaboration is all about balancing the needs of 
contributors, and while this work on cvise and reblaze isn't happening in LLVM, 
I hope the value of these contributions outweighs the inconvenience of dealing 
with Google's reliance on header module implementation details.

https://github.com/llvm/llvm-project/pull/138227
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to