This is an archive of the discontinued LLVM Phabricator instance.

Revert "[libc++][PSTL] Add missing includes to PSTL headers"
AbandonedPublic

Authored by iana on Jun 17 2023, 6:51 PM.

Details

Reviewers
ldionne
Mordante
philnik
Bigcheese
Group Reviewers
Restricted Project
Summary

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

Event Timeline

iana created this revision.Jun 17 2023, 6:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 17 2023, 6:51 PM
iana requested review of this revision.Jun 17 2023, 6:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 17 2023, 6:51 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
iana updated this revision to Diff 532505.Jun 18 2023, 7:32 PM

Reorder in the stack

iana updated this revision to Diff 533367.Jun 21 2023, 12:52 PM

Reordering in the stack

ldionne requested changes to this revision.Jun 21 2023, 1:01 PM

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.

This revision now requires changes to proceed.Jun 21 2023, 1:01 PM
iana added a comment.Jun 22 2023, 1:14 PM

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.

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.

iana updated this revision to Diff 536821.Jul 3 2023, 10:12 AM

Rebase, fix merge conflict

ldionne requested changes to this revision.Jul 4 2023, 12:11 PM

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.

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.

This revision now requires changes to proceed.Jul 4 2023, 12:11 PM
iana abandoned this revision.Jul 4 2023, 9:33 PM

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.

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.

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.