It doesn't help modules to add extra includes for things that are already transitively included. What's needed is additional module exports.
This reverts commit 5ac0c1af8215ae5b084235c34be60a50dbe4e92e.
Differential D153209
Revert "[libc++][PSTL] Add missing includes to PSTL headers" iana on Jun 17 2023, 6:51 PM. Authored by
Details It doesn't help modules to add extra includes for things that are already transitively included. What's needed is additional module exports. This reverts commit 5ac0c1af8215ae5b084235c34be60a50dbe4e92e.
Diff Detail
Unit Tests Event TimelineComment Actions I don't understand this patch. We follow include-what-you-use in libc++. These headers are using the entities declared by the includes you're removing, I think we should keep them. In other words, those files should have been including these headers since they were written, regardless of whether it helps with disentangling the Clang modules story or not. Do I misunderstand something? If not, I think we can abandon this. Comment Actions I guess it doesn't hurt to have these extra includes, but they mask the missing module exports which are important to have. Without the exports, many unit tests have compiler errors, and even linker errors. Comment Actions
We follow include-what-you-use in libc++ -- that's the baseline rule. This patch moves us away from include-what-you-use, so I don't think we want to move forward with it. The stuff we export from the modulemap is not what we consider the baseline -- we tweak it however it needs to be tweaked to fix stuff (a rather poor strategy TBH). If it's not needed for your stack of patches (I think it's not), then I would drop this. Comment Actions Alright, I'll drop these reviews. They ended up being the wrong fix for the errors I was seeing in D144322, the exports were needed for the lots of linker errors I was seeing, But I agree it's correct to have these includes. |