Skip to content

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented May 21, 2023

This PR reduces false warnings, especially for unit tests.

From the Boost.Test's point of view, the boost/test/unit_test.hpp header:

... should be the only header necessary to include to start using the framework

@DrahtBot
Copy link
Contributor

DrahtBot commented May 21, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
Stale ACK maflcko

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

No conflicts as of last run.

@hebasto hebasto marked this pull request as draft May 21, 2023 13:38
@hebasto hebasto marked this pull request as ready for review May 21, 2023 19:23
@hebasto
Copy link
Member Author

hebasto commented May 22, 2023

Rebased on top of the merged #27707.

@hebasto
Copy link
Member Author

hebasto commented May 29, 2023

CI failure seems unrelated.

Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm ACK

{ include: [ "<boost/test/unit_test_log.hpp>", public, "<boost/test/unit_test.hpp>", public ] },
{ include: [ "<boost/test/unit_test_suite.hpp>", public, "<boost/test/unit_test.hpp>", public ] },
{ include: [ "<boost/test/utils/basic_cstring/basic_cstring.hpp>", public, "<boost/test/unit_test.hpp>", public ] },
{ include: [ "<boost/test/utils/lazy_ostream.hpp>", public, "<boost/test/unit_test.hpp>", public ] },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to upstream those?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was wondering the same about boost-1.75-all.imp and qt5_11.imp, given they are clearly for older versions. Are we going to upstream updates, or just wait until the mappings break?

Copy link
Member Author

@hebasto hebasto May 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I did consider upstreaming these changes. It seems make sense to do it after removing all Boost and Qt related warnings for our code, to be sure that the changes are complete.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to look for missing ones, there should be at least signals2? See https://api.cirrus-ci.com/v1/task/4955079116062720/logs/ci.log with search string "+#include <boos"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've skipped non-test Boost stuff intentionally to avoid potential conflicts with other (more important) PRs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for #include <boost/multi_index/hashed_index.hpp> // for hashed_index_iterator etc ... ?

Why? boost/multi_index/hashed_index.hpp is a public header. And all IWYU's suggestions about it look correct.

Or did I miss something?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I think that boost is an implementation detail, so it should be IWYU export ed from the header that exports the boost include.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean headers in the boost codebase, or in ours?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the headers in this codebase that include boost should IWYU export the boost include, because it is an implementation detail limited to this single module. Modules including this module shouldn't be bothered with implementation details of it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you still working on this?

@hebasto hebasto force-pushed the 230521-iwyu branch 6 times, most recently from 1279c99 to b2634ad Compare May 29, 2023 12:40
@hebasto
Copy link
Member Author

hebasto commented May 29, 2023

Addressed @MarcoFalke's #27710 (comment).

@maflcko
Copy link
Member

maflcko commented May 30, 2023

Forget my earlier comments. I think this is correct, or at least a good step in the right direction.

lgtm ACK b2634ad

@hebasto
Copy link
Member Author

hebasto commented May 30, 2023

Forget my earlier comments.

Including #27710 (comment)?

@hebasto
Copy link
Member Author

hebasto commented May 30, 2023

Addressed @fanquake's #27710 (comment).

@fanquake
Copy link
Member

Addressed @fanquake's #27710 (comment).

I don't see how this is addressed, looks like it's now just producing include suggestions that are incorrect/we don't want for the test code.

@hebasto
Copy link
Member Author

hebasto commented May 31, 2023

@fanquake

... looks like it's now just producing include suggestions that are incorrect/we don't want for the test code.

Can you point out these suggestions please? Asking because I've just skimmed suggestions for test/*_tests.cpp files again and I can see none of them in comparison to the master branch.

@maflcko
Copy link
Member

maflcko commented Sep 21, 2023

Needs rebase for fresh CI?

@hebasto
Copy link
Member Author

hebasto commented Sep 21, 2023

Needs rebase for fresh CI?

Done.

@hebasto
Copy link
Member Author

hebasto commented Jan 5, 2024

Rebased.

fanquake added a commit that referenced this pull request Jan 11, 2024
a395218 ci, iwyu: Drop backported mappings (Hennadii Stepanov)

Pull request description:

  See include-what-you-use/include-what-you-use#1026.

  Split from #27710 as a non-controversial change.

ACKs for top commit:
  fanquake:
    ACK a395218

Tree-SHA512: ae7955a99396ab4f62ab7c989dba59c26448837f0ba4436bf3fddebe4099b5d3c03492e22a8497104c6afcceede1bb1b81f9d71c7c7e43692e6d70dcdfc11e7c
@hebasto
Copy link
Member Author

hebasto commented Jan 16, 2024

#27710 (comment)

are you still working on this?

I don't think I will work on this PR in the nearest future.

@hebasto hebasto closed this Jan 16, 2024
@bitcoin bitcoin locked and limited conversation to collaborators Jan 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants