Skip to content

Conversation

@practicalswift
Copy link
Contributor

Reduce compilation time and unneccessary recompiles by removing unused includes in tests.

A subset of #16273 ("refactor: Reduce total compilation time by 2% and avoid unnecessary recompiles by removing unused includes") as requested by MarcoFalke in #16273 (comment).

@DrahtBot
Copy link
Contributor

DrahtBot commented Jun 24, 2019

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #16227 (Refactor CWallet's inheritance chain by achow101)
  • #16224 (gui: Bilingual GUI error messages by hebasto)
  • #16127 (Add support for thread safety annotations when using std::mutex by ajtowns)
  • #16069 (test: move-only: Split large tests into smaller compile units by MarcoFalke)
  • #15935 (WIP: Add /settings.json persistent settings storage by ryanofsky)
  • #15934 (Separate settings merging from parsing by ryanofsky)
  • #13751 (Utils and libraries: Drops the boost/algorithm/string/split.hpp dependency by l2a5b1)
  • #10102 ([experimental] Multiprocess bitcoin by ryanofsky)

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.

@maflcko
Copy link
Member

maflcko commented Jun 24, 2019

ACK 30dfe9a86c29e6e95aac236b9273738e392cf86e (checked that added includes are required and that removed includes are not)

@DrahtBot
Copy link
Contributor

Needs rebase

@practicalswift practicalswift force-pushed the cut-compilation-bloat-in-unit-tests branch from 30dfe9a to 47a15fa Compare June 25, 2019 11:23
@practicalswift practicalswift force-pushed the cut-compilation-bloat-in-unit-tests branch from 47a15fa to 04754f7 Compare June 25, 2019 11:49
@fanquake
Copy link
Member

47a15fa47519a5ab16a3d6c1dd3227dd76076365 does not compile.

 CCLD     libsecp256k1.la
  CXX      test/test_bitcoin-mempool_tests.o
test/fs_tests.cpp:14:26: error: use of undeclared identifier 'GetDataDir'
    fs::path tmpfolder = GetDataDir();
                         ^
1 error generated.
make[2]: *** [test/test_bitcoin-fs_tests.o] Error 1
make[2]: *** Waiting for unfinished jobs....
test/flatfile_tests.cpp:16:27: error: use of undeclared identifier 'GetDataDir'
    const auto data_dir = GetDataDir();
                          ^
test/flatfile_tests.cpp:29:27: error: use of undeclared identifier 'GetDataDir'
    const auto data_dir = GetDataDir();
                          ^
test/flatfile_tests.cpp:90:27: error: use of undeclared identifier 'GetDataDir'
    const auto data_dir = GetDataDir();
                          ^
test/flatfile_tests.cpp:110:27: error: use of undeclared identifier 'GetDataDir'
    const auto data_dir = GetDataDir();
                          ^
4 errors generated.
make[2]: *** [test/test_bitcoin-flatfile_tests.o] Error 1
make[1]: *** [check-recursive] Error 1
make: *** [check-recursive] Error 1

@practicalswift
Copy link
Contributor Author

practicalswift commented Jun 25, 2019

@fanquake That was fixed in 04754f7. Please re-review :-)

@practicalswift practicalswift force-pushed the cut-compilation-bloat-in-unit-tests branch from 04754f7 to 9a84169 Compare June 26, 2019 18:38
@practicalswift practicalswift changed the title tests: Reduce compilation time and unneccessary recompiles by removing unused includes in tests tests: Reduce compile-time memory usage, compilation time and unneccessary recompiles by removing unused includes in tests Jun 27, 2019
@Sjors
Copy link
Member

Sjors commented Jun 27, 2019

ACK 9a84169 on macOS 10.14.5 (I rebased on #16289)

@maflcko maflcko changed the title tests: Reduce compile-time memory usage, compilation time and unneccessary recompiles by removing unused includes in tests tests: Remove unused includes in tests Jun 27, 2019
@maflcko maflcko changed the title tests: Remove unused includes in tests tests: Remove unused includes Jun 27, 2019
pull bot pushed a commit to uniibu/bitcoin that referenced this pull request Jun 27, 2019
9a84169 tests: Reduce compilation time and unneccessary recompiles by removing unused includes in tests (practicalswift)

Pull request description:

  Reduce compilation time and unneccessary recompiles by removing unused includes in tests.

  A subset of bitcoin#16273 ("refactor: Reduce total compilation time by 2% and avoid unnecessary recompiles by removing unused includes") as requested by MarcoFalke in bitcoin#16273 (comment).

ACKs for top commit:
  Sjors:
    ACK 9a84169 on macOS 10.14.5 (I rebased on bitcoin#16289)

Tree-SHA512: bcb6ecffef689a9839bee1a5cb93abe83db1f30819a54226c5630fee456b5a5d187507d06861454adfda939c3556a975113f97662e415cb47fa0327ea4fd09fb
@maflcko maflcko merged commit 9a84169 into bitcoin:master Jun 27, 2019
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Mar 26, 2020
Summary:
Backport of core [[bitcoin/bitcoin#16278 | PR16278]].

Depends on D5556.

Test Plan:
  ninja all check
Run the Gitian builds.

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D5558
@practicalswift practicalswift deleted the cut-compilation-bloat-in-unit-tests branch April 10, 2021 19:38
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Nov 26, 2021
9a84169 tests: Reduce compilation time and unneccessary recompiles by removing unused includes in tests (practicalswift)

Pull request description:

  Reduce compilation time and unneccessary recompiles by removing unused includes in tests.

  A subset of bitcoin#16273 ("refactor: Reduce total compilation time by 2% and avoid unnecessary recompiles by removing unused includes") as requested by MarcoFalke in bitcoin#16273 (comment).

ACKs for top commit:
  Sjors:
    ACK 9a84169 on macOS 10.14.5 (I rebased on bitcoin#16289)

Tree-SHA512: bcb6ecffef689a9839bee1a5cb93abe83db1f30819a54226c5630fee456b5a5d187507d06861454adfda939c3556a975113f97662e415cb47fa0327ea4fd09fb
PastaPastaPasta pushed a commit to dashpay/dash that referenced this pull request Nov 30, 2021
9a84169 tests: Reduce compilation time and unneccessary recompiles by removing unused includes in tests (practicalswift)

Pull request description:

  Reduce compilation time and unneccessary recompiles by removing unused includes in tests.

  A subset of bitcoin#16273 ("refactor: Reduce total compilation time by 2% and avoid unnecessary recompiles by removing unused includes") as requested by MarcoFalke in bitcoin#16273 (comment).

ACKs for top commit:
  Sjors:
    ACK 9a84169 on macOS 10.14.5 (I rebased on bitcoin#16289)

Tree-SHA512: bcb6ecffef689a9839bee1a5cb93abe83db1f30819a54226c5630fee456b5a5d187507d06861454adfda939c3556a975113f97662e415cb47fa0327ea4fd09fb

Co-authored-by: MarcoFalke <[email protected]>
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 18, 2022
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.

5 participants