ci: Run iwyu on all src files #27571

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2305-ci-iwyu- changing 2 files +9 −44
  1. maflcko commented at 10:57 AM on May 4, 2023: member

    This makes it easier to look at the CI output of a file without having to manually add it first to the list.

  2. DrahtBot commented at 10:57 AM on May 4, 2023: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK hebasto
    Concept ACK fanquake, jonatack

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #27636 (kernel: Remove interface_ui, util/system from kernel library by TheCharlatan)
    • #27576 (kernel: Remove args, chainparams, chainparamsbase from kernel library by TheCharlatan)
    • #27425 (test: move remaining rand code from util/setup_common to util/random by jonatack)
    • #27385 (net, refactor: extract Network and BIP155Network logic to node/network by jonatack)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  3. DrahtBot added the label Tests on May 4, 2023
  4. DrahtBot added the label CI failed on May 4, 2023
  5. maflcko force-pushed on May 4, 2023
  6. maflcko marked this as a draft on May 4, 2023
  7. DrahtBot cross-referenced this on May 4, 2023 from issue ci: Remove CI_EXEC bloat in test/06_script_b.sh by maflcko
  8. DrahtBot cross-referenced this on May 4, 2023 from issue Remove now-unnecessary poll, fcntl includes from net(base).cpp by Empact
  9. DrahtBot cross-referenced this on May 4, 2023 from issue test: move remaining rand code from util/setup_common to util/random by jonatack
  10. DrahtBot cross-referenced this on May 4, 2023 from issue net, refactor: extract Network and BIP155Network logic to node/network by jonatack
  11. DrahtBot cross-referenced this on May 4, 2023 from issue refactor, kernel: Decouple ArgsManager from blockstorage by TheCharlatan
  12. DrahtBot cross-referenced this on May 5, 2023 from issue kernel: Remove args, settings, chainparams, chainparamsbase from kernel library by TheCharlatan
  13. DrahtBot cross-referenced this on May 6, 2023 from issue build: Add CMake-based build system by hebasto
  14. fanquake commented at 2:31 PM on May 9, 2023: member

    Is this dependant on #27573

  15. maflcko commented at 2:55 PM on May 9, 2023: member

    Yes, I can't figure out how to fight bash -c, so I removed it there

  16. fanquake commented at 3:25 PM on May 9, 2023: member

    Concept ACK on removing the continual manual updating of this list

  17. maflcko marked this as ready for review on May 10, 2023
  18. maflcko force-pushed on May 10, 2023
  19. maflcko force-pushed on May 10, 2023
  20. maflcko force-pushed on May 10, 2023
  21. fanquake commented at 11:41 AM on May 10, 2023: member

    (qt/qrc_bitcoin_locale.cpp has correct #includes/fwd-decls)

    Looks like it's mostly working, except GUI stuff is still being dragged in

  22. hebasto commented at 12:31 PM on May 10, 2023: member

    (qt/qrc_bitcoin_locale.cpp has correct #includes/fwd-decls)

    Looks like it's mostly working, except GUI stuff is still being dragged in

    And qt/qrc_bitcoin.cpp as well.

  23. maflcko force-pushed on May 10, 2023
  24. maflcko force-pushed on May 10, 2023
  25. maflcko marked this as a draft on May 10, 2023
  26. maflcko added the label Up for grabs on May 10, 2023
  27. jonatack commented at 10:02 AM on May 11, 2023: contributor

    Concept ACK. I've been adding sources files to this list while working on each pull.

  28. DrahtBot added the label Needs rebase on May 11, 2023
  29. maflcko force-pushed on May 12, 2023
  30. DrahtBot removed the label Needs rebase on May 12, 2023
  31. DrahtBot cross-referenced this on May 12, 2023 from issue kernel: Remove util/system from kernel library, interface_ui from validation. by TheCharlatan
  32. DrahtBot cross-referenced this on May 12, 2023 from issue ci: Add test coverage job by aureleoules
  33. ci: Run iwyu on all src files
    This makes it easier to look at the CI output of a file without having
    to manually add it first.
    ddddf4957b
  34. maflcko force-pushed on May 13, 2023
  35. maflcko removed the label Up for grabs on May 13, 2023
  36. maflcko marked this as ready for review on May 13, 2023
  37. DrahtBot removed the label CI failed on May 13, 2023
  38. maflcko commented at 3:02 PM on May 15, 2023: member

    Should be ready for review

  39. in ci/test/06_script_b.sh:49 in ddddf4957b
      41 | @@ -42,51 +42,16 @@ if [ "${RUN_TIDY}" = "true" ]; then
      42 |    set -eo pipefail
      43 |    cd "${BASE_BUILD_DIR}/bitcoin-$HOST/src/"
      44 |    ( run-clang-tidy-16 -quiet "${MAKEJOBS}" ) | grep -C5 "error"
      45 | +  # Filter out files by regex here, because regex may not be
      46 | +  # accepted in src/.bear-tidy-config
      47 | +  # Filter out:
      48 | +  # * qt qrc and moc generated files
      49 | +  # * walletutil (temporarily)
    


    hebasto commented at 2:11 PM on May 16, 2023:

    Mind elaborating about skipping walletutil?


    maflcko commented at 5:41 PM on May 16, 2023:

    because it crashes. See:

    # python3 "/include-what-you-use/iwyu_tool.py" -p . ./src/wallet/walletutil.cpp -j 9 -- -Xiwyu --cxx17ns -Xiwyu --mapping_file="$PWD/contrib/devtools/iwyu/bitcoin.core.imp"  
    In file included from wallet/walletutil.cpp:5:
    In file included from ./wallet/walletutil.h:8:
    In file included from ./script/descriptor.h:8:
    In file included from ./outputtype.h:9:
    In file included from ./script/signingprovider.h:10:
    In file included from ./key.h:10:
    In file included from ./pubkey.h:10:
    In file included from ./hash.h:10:
    In file included from ./crypto/common.h:12:
    In file included from /usr/lib64/clang/16/include/stdint.h:52:
    In file included from /usr/include/stdint.h:26:
    In file included from /usr/include/bits/libc-header-start.h:33:
    /usr/include/features.h:413:4: warning: _FORTIFY_SOURCE requires compiling with optimization (-O) [-W#warnings]
    #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
       ^
    In file included from wallet/walletutil.cpp:5:
    In file included from ./wallet/walletutil.h:8:
    In file included from ./script/descriptor.h:8:
    In file included from ./outputtype.h:9:
    In file included from ./script/signingprovider.h:10:
    In file included from ./key.h:10:
    In file included from ./pubkey.h:10:
    In file included from ./hash.h:14:
    In file included from ./serialize.h:17:
    In file included from /usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/memory:78:
    /usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/unique_ptr.h:97:16: error: invalid application of 'sizeof' to an incomplete type 'wallet::DescriptorScriptPubKeyMan'
            static_assert(sizeof(_Tp)>0,
                          ^~~~~~~~~~~
    /usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/unique_ptr.h:404:4: note: in instantiation of member function 'std::default_delete<wallet::DescriptorScriptPubKeyMan>::operator()' requested here
              get_deleter()(std::move(__ptr));
              ^
    /usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_construct.h:151:19: note: in instantiation of member function 'std::unique_ptr<wallet::DescriptorScriptPubKeyMan>::~unique_ptr' requested here
          __pointer->~_Tp();
                      ^
    /usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_construct.h:196:2: note: in instantiation of function template specialization 'std::_Destroy_aux<false>::__destroy<std::unique_ptr<wallet::DescriptorScriptPubKeyMan> *>' requested here
            __destroy(__first, __last);
            ^
    /usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/alloc_traits.h:947:7: note: in instantiation of function template specialization 'std::_Destroy<std::unique_ptr<wallet::DescriptorScriptPubKeyMan> *>' requested here
          _Destroy(__first, __last);
          ^
    /usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/stl_vector.h:732:7: note: in instantiation of function template specialization 'std::_Destroy<std::unique_ptr<wallet::DescriptorScriptPubKeyMan> *, std::unique_ptr<wallet::DescriptorScriptPubKeyMan>>' requested here
            std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
                 ^
    ./wallet/walletutil.h:122:8: note: in instantiation of member function 'std::vector<std::unique_ptr<wallet::DescriptorScriptPubKeyMan>>::~vector' requested here
    struct MigrationData
           ^
    ./wallet/walletutil.h:119:7: note: forward declaration of 'wallet::DescriptorScriptPubKeyMan'
    class DescriptorScriptPubKeyMan;
          ^
    
    
  40. hebasto approved
  41. hebasto commented at 6:04 PM on May 16, 2023: member

    ACK ddddf4957b02c83ed9b6c46b35d8ae1e137889d2

  42. maflcko cross-referenced this on May 17, 2023 from issue test: Add missed header by hebasto
  43. fanquake merged this on May 17, 2023
  44. fanquake closed this on May 17, 2023

  45. maflcko deleted the branch on May 17, 2023
  46. sidhujag referenced this in commit 352ed46608 on May 17, 2023
  47. hebasto cross-referenced this on May 25, 2023 from issue Fix `#include`s in `src/wallet` by hebasto
  48. fanquake referenced this in commit dfe658009d on May 29, 2023
  49. bitcoin locked this on May 16, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:53 UTC