build: Increase MS Visual Studio minimum version #25472

pull hebasto wants to merge 5 commits into bitcoin:master from hebasto:220625-desig changing 11 files +246 −257
  1. hebasto commented at 12:01 pm on June 25, 2022: member
    Visual Studio 2022 with /std:c++20 supports designated initializers.
  2. hebasto force-pushed on Jun 25, 2022
  3. DrahtBot added the label Refactoring on Jun 25, 2022
  4. hebasto force-pushed on Jun 25, 2022
  5. hebasto force-pushed on Jun 25, 2022
  6. DrahtBot commented at 3:26 pm on June 25, 2022: contributor

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #25578 (rpc: add missing description in gettxout help text by MarnixCroes)
    • #25572 (refactor: Introduce EvictionManager and use it for the inbound eviction logic by dergoegge)
    • #25514 (net processing: Move CNode::nServices and CNode::nLocalServices to Peer by dergoegge)
    • #25390 (sync: introduce a thread-safe smart container and use it to remove a bunch of “GlobalMutex"es by vasild)
    • #25268 (refactor: Introduce EvictionManager by dergoegge)
    • #23561 (BIP324: Handshake prerequisites by dhruv)
    • #21283 (Implement BIP 370 PSBTv2 by achow101)

    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.

  7. hebasto force-pushed on Jun 25, 2022
  8. hebasto commented at 5:18 pm on June 25, 2022: member
    Still observing a memory usage spike up to 25.38 GB.
  9. ajtowns commented at 6:07 am on June 27, 2022: contributor

    Still observing a memory usage spike up to 25.38 GB.

    Is that unique to cirrus, or something people can observe when compiling with vs2022 themselves?

  10. hebasto force-pushed on Jun 27, 2022
  11. DrahtBot added the label Needs rebase on Jun 27, 2022
  12. fanquake requested review from sipsorcery on Jun 28, 2022
  13. sipsorcery approved
  14. sipsorcery commented at 6:28 pm on June 28, 2022: member
    Builds and passes tests for me.
  15. maflcko commented at 6:44 pm on June 28, 2022: member

    Is that unique to cirrus, or something people can observe when compiling with vs2022 themselves?

    I guess it would be nice to have a minimum working (breaking) example

  16. hebasto commented at 8:17 am on June 29, 2022: member

    Is that unique to cirrus, or something people can observe when compiling with vs2022 themselves?

    I guess it would be nice to have a minimum working (breaking) example

    FWIW, disabling of Qt code removes memory usage spikes.

  17. maflcko commented at 8:27 am on June 29, 2022: member
    So it has nothing to do with designated initializers, but with compiling qt code with the c++20 option?
  18. hebasto commented at 8:39 am on June 29, 2022: member

    So it has nothing to do with designated initializers, but with compiling qt code with the c++20 option?

    Yes. See https://cirrus-ci.com/task/4621320997568512

  19. hebasto force-pushed on Jun 29, 2022
  20. hebasto force-pushed on Jun 29, 2022
  21. DrahtBot removed the label Needs rebase on Jun 29, 2022
  22. laanwj commented at 12:00 pm on June 29, 2022: member
    Concept ACK
  23. maflcko commented at 1:30 pm on June 29, 2022: member
    If you want to use this pull request for debugging faster, you can also delete all other tasks and assign the credits template to the windows build for immediate scheduling.
  24. hebasto commented at 1:32 pm on June 29, 2022: member

    @MarcoFalke

    you can also delete all other tasks

    Of course, I did it in my private Cirrus account :)

    and assign the credits template to the windows build for immediate scheduling.

    Thank you!

  25. hebasto commented at 2:34 pm on June 29, 2022: member

    “Curiouser and curiouser!”

    Just removing other CI tasks make “Win64 native [vs2022]” pass:

  26. maflcko commented at 2:37 pm on June 29, 2022: member
    Maybe it incorrectly uses a previous ccache?
  27. hebasto commented at 10:38 pm on June 29, 2022: member

    I have disabled ccache:

    The getblock() function is a culprit, which creates a memory usage peak over 24 GB (verified a few times).

    Another peak below 24 GB exists although.

  28. hebasto force-pushed on Jun 30, 2022
  29. hebasto commented at 0:31 am on July 1, 2022: member

    Still observing a memory usage spike up to 25.38 GB.

    It appears, that those spikes are caused by recursive usage of RPCResult. The applied refactoring has removed them. @sipsorcery Is this bug familiar to you?

  30. hebasto force-pushed on Jul 1, 2022
  31. hebasto marked this as ready for review on Jul 1, 2022
  32. sipsorcery commented at 8:22 pm on July 2, 2022: member

    Still observing a memory usage spike up to 25.38 GB.

    It appears, that those spikes are caused by recursive usage of RPCResult. The applied refactoring has removed them.

    @sipsorcery Is this bug familiar to you?

    Nope, I’ve never come across it. I only have 16GB though, so I’d guess even if I did somehow manage to replicate it my machine would crash or freeze first.

  33. sipsorcery commented at 8:06 pm on July 5, 2022: member
    tACK 1240e827770dfe2c10badd9e42730430abb44ee5.
  34. maflcko added this to the milestone 24.0 on Jul 6, 2022
  35. maflcko commented at 6:46 am on July 6, 2022: member
    Concept ACK 1240e827770dfe2c10badd9e42730430abb44ee5
  36. DrahtBot added the label Needs rebase on Jul 7, 2022
  37. rpc, refactor: Add `getblock_prevout`
    This change eliminates memory usage spike when compiling with Visual
    Studio 2022 (at least in Cirrus CI environment).
    
    Easy to review using
    `git diff --color-moved-ws=allow-indentation-change --color-moved=dimmed-zebra`
    01d95a3964
  38. rpc, refactor: Add `decodepsbt_inputs`
    This change eliminates memory usage spike when compiling with Visual
    Studio 2022 (at least in Cirrus CI environment).
    
    Easy to review using
    `git diff --color-moved-ws=allow-indentation-change --color-moved=dimmed-zebra`
    0c432cbbfa
  39. rpc, refactor: Add `decodepsbt_outputs`
    This change eliminates memory usage spike when compiling with Visual
    Studio 2022 (at least in Cirrus CI environment).
    
    Easy to review using
    `git diff --color-moved-ws=allow-indentation-change --color-moved=dimmed-zebra`
    555f9dd5d3
  40. build: Increase MS Visual Studio minimum version
    Visual Studio 2022 with `/std:c++20` supports designated initializers.
    88ec5d40dc
  41. refactor: Drop no longer needed `util/designator.h` 630c1711b4
  42. hebasto force-pushed on Jul 7, 2022
  43. hebasto commented at 7:08 pm on July 7, 2022: member
    Rebased 1240e827770dfe2c10badd9e42730430abb44ee5 -> 630c1711b47ce50805f4dd2883777a100f7e5339 (pr25472.06 -> pr25472.07) due to the conflict with #25500.
  44. sipsorcery commented at 7:54 pm on July 7, 2022: member
    reACK 630c1711b47ce50805f4dd2883777a100f7e5339.
  45. DrahtBot removed the label Needs rebase on Jul 7, 2022
  46. fanquake merged this on Jul 13, 2022
  47. fanquake closed this on Jul 13, 2022

  48. hebasto deleted the branch on Jul 13, 2022
  49. sidhujag referenced this in commit e692850c7c on Jul 13, 2022
  50. theuni commented at 7:16 pm on February 13, 2023: member

    I’m confused about this PR. If I’m reading correctly, MSVC now gets built as c++20 while other platforms are c++17. Seemingly so that we could drop our designated initializer code because it’s non-standard for c++17.

    That seems like a huge hammer for a small problem. I suspect I’m missing something?

  51. hebasto commented at 7:41 pm on February 13, 2023: member

    I’m confused about this PR. If I’m reading correctly, MSVC now gets built as c++20 while other platforms are c++17. Seemingly so that we could drop our designated initializer code because it’s non-standard for c++17.

    That seems like a huge hammer for a small problem. I suspect I’m missing something?

    I took a liberty to cross reference:

    Designated initializers are supported since gcc 4.7 (Our minimum required is 8) and clang 3 (Our minimum required is 7). They work out of the box with C++17, and only msvc requires the C++20 flag to be set. I don’t expect any of our msvc users will run into issues due to this. See also https://bitcoin.jonasschnelli.ch/ircmeetings/logs/bitcoin-core-dev/2022/bitcoin-core-dev.2022-03-10-19.00.log.html#l-114

  52. bitcoin locked this on Feb 13, 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: 2024-11-21 21:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me