Details
- Reviewers
ldionne zoecarver cjdb jdoerfert • Quuxplusone - Group Reviewers
Restricted Project - Commits
- rG61c35fb0c2c9: [libc++][modularisation] Split <compare> into internal headers.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This should be mostly ready to go (I'm a bit surprised we only need two headers). Two bits of feedback.
- Blocking: Please add these to the module map. The ranges.__ranges submodule should give you guidance on how to make the compare.__compare submodule. I'll LGTM once this is done.
- Non-blocking: I'd appreciate it if you could change [NFC] in your commit summary to [modularisation].
Done. Please check if everything correct
libcxx/include/__compare/ordering.h | ||
---|---|---|
10 | I don't see the reason to create separate header for each ordering, but if you do I can change that. |
Regarding just two headers. I expect them to be more in future because not everything is implemented in <compare> e.g. compare_three_way_result, some CPOs, etc. But for now I don't think it worth it to split ordering.h on separate partial, weak and strong unless you think opposite.
LGTM mod nits.
libcxx/include/CMakeLists.txt | ||
---|---|---|
102–103 | a-z plz | |
libcxx/include/__compare/common_comparison_category.h | ||
10–11 | I think our style would make this _LIBCPP___COMPARE_COMMON_COMPARISON_CATEGORY_H — please check some other nested-directory files, and then change it here if I'm right. | |
13–14 | a-z plz | |
30 | If you want, a drive-by whitespace fix to unsigned { would be nice. | |
libcxx/include/compare | ||
132–133 | Is this needed now for some reason? (Historically we seem to have put __undef_macros only in files that actually use min or max as identifiers. If something breaks without these lines, it'd be nice to say in your commit message what it is; and if nothing breaks without these lines, then arguably they shouldn't be here. Although I'm not inclined to actually object.) | |
libcxx/include/module.modulemap | ||
359–360 | a-z plz |
libcxx/include/compare | ||
---|---|---|
132–133 | This maaaaay have indirectly been my doing. I used to include <__undef_macros> in all my headers before I understood its purpose. I think since then it's just been included in everything by accident at this point. I agree we should remove it, and we should probably action some mass-cleanup in the near future (since I'm apparently taking responsibility for the trend, it makes sense for me to do it). |
libcxx/include/__compare/common_comparison_category.h | ||
---|---|---|
10–11 | Yes, you are right. I did it for ordering header but for some reason prefix was missed for this file | |
libcxx/include/module.modulemap | ||
359–360 | Actually I've found another mistake that is more important. `compare module was already there and I needed to just add private headers. Now it's done. |
One final nit, then ship it!
(Assuming you don't need someone to land this for you. But if you do, please ping me and I can do it.)
libcxx/include/module.modulemap | ||
---|---|---|
363–364 | These two still need alphabetization between the two of them (i.e., switch their order). |
libcxx/include/module.modulemap | ||
---|---|---|
363–364 | :) Done. Sorry for missing that, it's 2:30 am my timezone:) |
LGTM once CI passes, and assuming you did not modify any code (only moving stuff around).
CI appears to be failing right now, so please make sure to have a green run before shipping.
I figured out what was wrong with "Generated Output" step. I was needed to add generated tests to the commit as well. Previously I didn't know that but currently it is done. Waiting for the CI completion.
I also found the recent change in __get_comp_type function and also applied it to this patch.
There is a high probability that CI will be successful. If it's the case I would need somebody to commit this patch for me.
@Quuxplusone, if I remember correctly you volunteered to do that. Could you please help?
Full name: Ruslan Arutyunyan
Thanks.
There is a high probability that CI will be successful. If it's the case I would need somebody to commit this patch for me.
@Quuxplusone, if I remember correctly you volunteered to do that. Could you please help?
Full name: Ruslan Arutyunyan
Yes, I can land it. For that I also need your email address (which is probably gettable from Phabricator somehow, but it's not obvious ;)) because a Git committer ID is always of the form Bob Smith <bobs@example.com>.
For that I also need your email address (which is probably gettable from Phabricator somehow, but it's not obvious ;))
Didn't figure it out from Phab, but the mails sent to the reviews.llvm.org mailing list have it. I'll land this shortly.
a-z plz