Repository navigation
contrib: Convert check-deps.sh to Python - #37023
Open
jeanpablojp wants to merge 4 commits into
Open
jeanpablojp wants to merge 4 commits into
jeanpablojp wants to merge 4 commits into
Conversation
Read the allowed library dependencies from the mermaid graph in doc/design/libraries.md instead of a hand-copied list, and allow the dependencies that follow from the graph transitively. Compared to the shell script, it also checks data symbols and not only functions, ignores symbols that the consuming library or an allowed one also defines, and runs on macOS, where the shell script needs bash 4. bitcoin_kernel is skipped because it does not exist as a library yet, and bitcoinqt because the shell script never checked it. The script fails, rather than reporting success, when a target does not build or an archive is missing. Co-authored-by: jeanpablojp <[email protected]>
Allows InitError and InitWarning to be used by other executables beside bitcoind and bitcoin-node. Co-authored-by: jeanpablojp <[email protected]>
check-deps.py follows the dependency graph transitively, so remove edges that other edges already imply, and say so in the caption. Also remove libbitcoin_wallet_tool, which has not existed since the CMake migration (wallettool.cpp is built into bitcoin-wallet), and drop it from the libraries check-deps.py skips. Co-authored-by: jeanpablojp <[email protected]>
check-deps.py reported success without checking anything when it read no symbols from a library, as happens when nm prints a format that NM_LINE_RE does not match. It also left a library out of the check when its graph line did not match the edge regex, for example an edge without the trailing semicolon, which mermaid accepts. Exit with an error in both cases.
Contributor
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. External sites
ReviewsSee the guideline and AI policy for information on the review process. ConflictsReviewers, 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This picks up #35167.
check-deps.pyreads the allowed library dependencies from the mermaid graph indoc/design/libraries.mdand follows them transitively, so the graph can drop its transitive edges and the script no longer keeps its own copy of the list. Compared tocheck-deps.sh, it also checks data symbols, and it runs on macOS, where the shell script needs bash 4.Changes compared to #35167, most of them from ryanofsky's review and the branch he shared there.
init/common.cppstays in common, andinterface_uimoves there from node. It's the same move as in ipc: add bitcoin-mine test program #30437.nmreports as typeSand drops the extra leading underscore of Mach-O names before matching suppressions.On whether
libraries.mdcan be the source of truth (#35167 (comment)),check-deps.shalready took its list from that file. Where the build doesn't match the graph yet,check-deps.pyskips the library or suppresses the symbols, and says why in a comment.