The file has ~3kLOC and is slow to compile.
Fix both issues by splitting it. (On my machine the compilation goes from 25 seconds previously to 17+10 seconds for the two smaller files)
To review, --color-moved=dimmed-zebra can be used.
The file has ~3kLOC and is slow to compile.
Fix both issues by splitting it. (On my machine the compilation goes from 25 seconds previously to 17+10 seconds for the two smaller files)
To review, --color-moved=dimmed-zebra can be used.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Reviewers, this pull request conflicts with the following ones:
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.
12 | +#include <univalue.h> 13 | + 14 | +#include <array> 15 | +#include <optional> 16 | +#include <cstdint> 17 | +#include <cstring>
nit: These dependencies can be removed
No, they are needed, see https://en.cppreference.com/w/cpp/types/integer
Okay, I verified that two dependencies are indeed needed for the file.
I hope we can use iwyu one day on the tests :sweat_smile:
Thanks a lot for the name. I was searching for this tool, but I forgot its name. I will remember to use it from now on. 😄
Concept ACK
I successfully compiled the branch and ran the test on it.
I think some dependencies would be redundant and can be removed.
in src/test/util_tests.cpp
#include <test/util/logging.h>
#include <test/util/str.h>
and, in src/test/argsman_tests.cpp
ACK fa4ec1be513c80d6db644f1e3170e980035e7306
0 | @@ -0,0 +1,1043 @@ 1 | +// Copyright (c) 2011-2022 The Bitcoin Core developers 2 | +// Distributed under the MIT software license, see the accompanying 3 | +// file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 | + 5 | +#include <util/system.h>
nit
diff --git a/src/test/argsman_tests.cpp b/src/test/argsman_tests.cpp
index d00876bc7..76d64e0d5 100644
--- a/src/test/argsman_tests.cpp
+++ b/src/test/argsman_tests.cpp
@@ -2,13 +2,13 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#include <util/system.h>
#include <fs.h>
#include <sync.h>
#include <test/util/logging.h>
#include <test/util/setup_common.h>
#include <test/util/str.h>
#include <util/strencodings.h>
+#include <util/system.h>
#include <univalue.h>
#include <array>
ACK fa4ec1be513c80d6db644f1e3170e980035e7306
ACK fa4ec1be513c80d6db644f1e3170e980035e7306 for:
macOS x84_64:
Darwin ₿ 19.6.0 Darwin Kernel Version 19.6.0: Tue Jun 21 21:18:39 PDT 2022; root:xnu-6153.141.66~1/RELEASE_X86_64 x86_64
macOS Arm64:
Darwin DeepSpaceM1.local 21.6.0 Darwin Kernel Version 21.6.0: Thu Sep 29 20:13:46 PDT 2022; root:xnu-8020.240.7~1/RELEASE_ARM64_T8101 arm64