build: Parse version information in msvc-autogen.py #23194

pull CallMeMisterOwl wants to merge 29 commits into bitcoin:master from CallMeMisterOwl:auto_gen_MSVC_issue changing 1 files +35 −0
  1. CallMeMisterOwl commented at 4:52 PM on October 5, 2021: contributor

    Added function to msvc-autogen.py that automatically parses changes from configure.ac into bitcoin_config.h. The function supports following values:

    • CLIENT_VERSION_BUILD
    • CLIENT_VERSION_IS_RELEASE
    • CLIENT_VERSION_MAJOR
    • CLIENT_VERSION_MINOR
    • COPYRIGHT_YEAR
    • PACKAGE_STRING
    • PACKAGE_VERSION

    <!-- *** Please remove the following help text before submitting: *** Pull requests without a rationale and clear improvement may be closed immediately. GUI-related pull requests should be opened against https://github.com/bitcoin-core/gui first. See CONTRIBUTING.md -->

    <!-- Please provide clear motivation for your patch and explain how it improves Bitcoin Core user experience or Bitcoin Core developer experience significantly: * Any test improvements or new tests that improve coverage are always welcome. * All other changes should have accompanying unit tests (see `src/test/`) or functional tests (see `test/`). Contributors should note which tests cover modified code. If no tests exist for a region of modified code, new tests should accompany the change. * Bug fixes are most welcome when they come with steps to reproduce or an explanation of the potential issue as well as reasoning for the way the bug was fixed. * Features are welcome, but might be rejected due to design or scope issues. If a feature is based on a lot of dependencies, contributors should first consider building the system outside of Bitcoin Core, if possible. * Refactoring changes are only accepted if they are required for a feature or bug fix or otherwise improve developer experience significantly. For example, most "code style" refactoring changes require a thorough explanation why they are useful, what downsides they have and why they *significantly* improve developer experience or avoid serious programming bugs. Note that code style is often a subjective matter. Unless they are explicitly mentioned to be preferred in the [developer notes](/doc/developer-notes.md), stylistic code changes are usually rejected. -->

    <!-- Bitcoin Core has a thorough review process and even the most trivial change needs to pass a lot of eyes and requires non-zero or even substantial time effort to review. There is a huge lack of active reviewers on the project, so patches often sit for a long time. -->

  2. fixes #23073
    Added function to msvc-autogen.py that automatically parses changes from 
    configure.ac into bitcoin_config.h.
    The function supports following values:
    - CLIENT_VERSION_BUILD
    - CLIENT_VERSION_IS_RELEASE
    - CLIENT_VERSION_MAJOR
    - CLIENT_VERSION_MINOR
    - COPYRIGHT_YEAR
    - PACKAGE_STRING
    - PACKAGE_VERSION
    8996833378
  3. Was missing a bracket d2ec759ec1
  4. CallMeMisterOwl commented at 5:10 PM on October 5, 2021: contributor

    I tried to avoid using additional libraries e.g. parsers, I hope that's fine. Also if you're not satisfied with the code (style, lengths etc), please let me know.

  5. Added UTF-8 encoding to open() b333e27c1f
  6. laanwj commented at 7:10 PM on October 5, 2021: member

    Thanks for having a go at #23073.

    However, I don't see how this works. You're adding a function but not actually calling it?

  7. in build_msvc/msvc-autogen.py:61 in b333e27c1f outdated
      57 | @@ -57,6 +58,38 @@ def set_common_properties(toolset):
      58 |      with open(os.path.join(SOURCE_DIR, '../build_msvc/common.init.vcxproj'), 'w', encoding='utf-8',newline='\n') as wfile:
      59 |          wfile.write(s)
      60 |  
      61 | +def parse_config_into_btc_conifg():
    


    laanwj commented at 7:11 PM on October 5, 2021:

    typo parse_config_into_btc_config

  8. laanwj renamed this:
    script: fixes #23073 Added new function to build_msvc/msvc-autogen.py
    build: Parse version information in msvc-autogen.py
    on Oct 5, 2021
  9. laanwj added the label Build system on Oct 5, 2021
  10. typo 40f5505896
  11. Actually call the function 75263a9e9a
  12. Merge branch 'bitcoin:master' into auto_gen_MSVC_issue 2b2cfef545
  13. Merge branch 'auto_gen_MSVC_issue' of https://github.com/CallMeMisterOwl/bitcoin into auto_gen_MSVC_issue a8e6545b94
  14. CallMeMisterOwl commented at 8:24 PM on October 5, 2021: contributor

    However, I don't see how this works. You're adding a function but not actually calling it?

    Of course your right, maybe I should focus before pushing random stuff. Sorry about that...

  15. Remove encoding from fileinput.input() 0b1a129f2c
  16. sandbox: add newfstatat to allowed filesystem syscalls 1ea2d36c35
  17. sandbox: add copy_file_range to allowed filesystem syscalls 13b3b6e7aa
  18. fixes #23073
    Added function to msvc-autogen.py that automatically parses changes from
    configure.ac into bitcoin_config.h.
    The function supports following values:
    - CLIENT_VERSION_BUILD
    - CLIENT_VERSION_IS_RELEASE
    - CLIENT_VERSION_MAJOR
    - CLIENT_VERSION_MINOR
    - COPYRIGHT_YEAR
    - PACKAGE_STRING
    - PACKAGE_VERSION
    
    Was missing a bracket
    
    Added UTF-8 encoding to open()
    
    typo
    
    Actually call the function
    84d7011ce7
  19. [move-only] Move CAddrMan function definitions to cpp
    In preparation for introducing the pimpl pattern to addrman, move all function
    bodies out of the header file.
    
    Review hint: use git diff --color-moved=dimmed-zebra
    --color-moved-ws=ignore-all-space
    f9b2dff79d
  20. [move-only] Match ordering of CAddrMan declarations and definitions
    Also move `Check` and `ForceCheckAddrman` to be after the `FunctionName_` functions.
    
    Review hint: use git diff --color-moved=dimmed-zebra
    --color-moved-ws=ignore-all-space
    f3749ae625
  21. [addrman] Introduce CAddrMan::Impl to encapsulate addrman implementation.
    Introduce the pimpl pattern for CAddrMan to separate the implementation details
    from the externally used object representation. This reduces compile-time
    dependencies and conceptually clarifies AddrMan's interface from the
    implementation specifics.
    
    Since the unit & fuzz tests currently rely on accessing CAddrMan internals, this
    commit introduces addrman_impl.h, which is exclusively imported by addrman.cpp
    and test files.
    
    Review hint: git diff --color-moved=dimmed-zebra
    --color-moved-ws=ignore-all-space
    b351ad7312
  22. [net, addrman] Remove external dependencies on CAddrInfo objects
    CAddrInfo objects are an implementation detail of how AddrMan manages and adds
    metadata to different records. Encapsulate this logic by updating Select &
    SelectTriedCollision to return the additional info that the callers need.
    14bc48c04e
  23. [move-only] Move CAddrInfo to test-only header file
    Now that no bitcoind callers require knowledge of the CAddrInfo object, it can
    be moved into the test-only header file.
    
    Review hint: use git diff --color-moved=dimmed-zebra
    --color-moved-ws=ignore-all-space
    85a1e7ed4f
  24. [addrman] Change CAddrInfo access
    Since knowledge of CAddrInfo is limited to callsites that import
    addrman_impl.h, only objects in addrman.cpp or the tests have access. Thus we
    can remove calling them friends and make the members public.
    8954b80a54
  25. [move-only] Move constants to test-only header
    Review hint: git diff --color-moved=dimmed-zebra
    --color-moved-ws=ignore-all-space
    7d2f737841
  26. [refactor] Update GetAddr_() function signature
    Update so the internal function signature matches the external one, as is the
    case for the other addrman functions.
    88ed0f00e3
  27. [doc] Update comments
    Maintain comments on the external interfaces rather than on the internal
    functions that implement them.
    28a124096b
  28. [includes] Fix up included files 01f5765950
  29. scripted-diff: Rename CAddrMan to AddrMan
    -BEGIN VERIFY SCRIPT-
    git grep -l CAddrMan src/ test/ | xargs sed -i 's/CAddrMan/AddrMan/g'
    -END VERIFY SCRIPT-
    a9d03014a4
  30. scripted-diff: Rename CAddrInfo to AddrInfo
    -BEGIN VERIFY SCRIPT-
    git grep -l CAddrInfo src/ | xargs sed -i 's/CAddrInfo/AddrInfo/g'
    -END VERIFY SCRIPT-
    57ad5fc329
  31. [style] Run changed files through clang formatter. a006613159
  32. util: Define SECCOMP_RET_KILL_PROCESS if not provided by the headers
    Define `SECCOMP_RET_KILL_PROCESS` as it isn't defined in the headers, as
    is the case for the GUIX build on this platform.
    cbf1b114fd
  33. util: Make sure syscall numbers used in profile are defined
    Define the following syscall numbers for x86_64, so that the profile
    will be the same no matter what kernel is built against, including
    kernels that don't have `__NR_statx`:
    ```c++
     #define __NR_statx 332
     #define __NR_getrandom 318
     #define __NR_membarrier 324
    ```
    8532e3ff20
  34. contrib: Ask for captcha in signet getcoins.py
    As the faucet will always ask for a captcha now, the current script is
    no longer usable.
    
    Change the script to print the captcha in dot-matrix to the terminal,
    using unicode Braille characters.
    d90bba86ce
  35. Remove encoding from fileinput.input() 6eaed606a8
  36. Merge branch 'auto_gen_MSVC_issue' of https://github.com/CallMeMisterOwl/bitcoin into auto_gen_MSVC_issue
    merge
    b29952bbc2
  37. CallMeMisterOwl closed this on Oct 5, 2021

  38. CallMeMisterOwl deleted the branch on Oct 5, 2021
  39. fanquake locked this on Oct 5, 2021

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-04-22 18:14 UTC

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