-
Notifications
You must be signed in to change notification settings - Fork 37.7k
doc: Fix gen-manpages to check build options #29457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: Fix gen-manpages to check build options #29457
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/29457. ReviewsSee the guideline 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. |
contrib/devtools/gen-manpages.py
Outdated
docs_to_exlude = [] | ||
if (binary == 'bitcoind' or binary == 'bitcoin-qt') and not config['components'].getboolean('HAVE_SYSTEM'): | ||
docs_to_exlude += ['shutdownnotify', 'alertnotify', 'startupnotify', 'blocknotify'] | ||
return parse_and_remove_subsections_from_doc(document, docs_to_exlude) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding would be that the check returns an error to recommend to build with the component, when a component is missing, no?
🚧 At least one of the CI tasks failed. Make sure to run all tests locally, according to the Possibly this is due to a silent merge conflict (the changes in this pull request being Leave a comment here, if you need help tracking down a confusing failure. |
Probably should be a way to override this, in case someone actually wants a custom-fit manpage? |
4c3062a
to
1e1ab90
Compare
efb45f0
to
428b921
Compare
@luke-jr you mean away to override the changes or the help2man generation? |
contrib/devtools/gen-manpages.py
Outdated
|
||
error_message = "Aborting generating manpages…\nError: {component} support is not enabled.\nPlease enable it and try again." | ||
|
||
if not config['components'].getboolean('HAVE_SYSTEM'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems arbitrary and prone to breakage, giving the hardcoding of specific components. It also doesn't cover all of the relevant components in any case, i.e at least decl_fork and natpmp (which both effect manpage output) are missing any sort of check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems arbitrary and prone to breakage, giving the hardcoding of specific components.
I don't think there is a better alternative, is there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure. Although I think any changes here can wait until after CMake, as this script will likely need to be (partially) rewritten after that change in any case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes here can wait until after CMake, as this script will likely need to be (partially) rewritten after that change in any case.
Can you explain this? config ini should be unrelated to the build system and shouldn't be affected by it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is hardcoding component names / variables, and they are likely to change during the switchover.
Are you still working on this? |
Thanks for working on this issue, however this needs update after the cmake change.. This is the new contents of [components]
# Which components are enabled. These are commented out by `configure` if they were disabled when running config.
ENABLE_WALLET=true
USE_SQLITE=true
#USE_BDB=true
ENABLE_CLI=true
ENABLE_BITCOIN_UTIL=true
ENABLE_WALLET_TOOL=true
ENABLE_BITCOIND=true
#ENABLE_FUZZ_BINARY=true
#ENABLE_ZMQ=true
ENABLE_EXTERNAL_SIGNER=true
#ENABLE_USDT_TRACEPOINTS=true i'm not sure there is a way around hardcoding component names, as they have different effects on options we can't automatically detect here, but we may want to be more thorough: explicitly include lists of components that must be enabled, and components that we don't care about. If any unknown components appear, also error out so that can be resolved first. |
428b921
to
7651dc3
Compare
@laanwj I updated the PR to include the suggestions |
'ENABLE_FUZZ_BINARY': 'Fuzz testing binary', | ||
'ENABLE_ZMQ': 'ZeroMQ support', | ||
'ENABLE_USDT_TRACEPOINTS': 'USDT tracepoints', | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about silently ignoring those. The goal of the script is to generate the manpages of the releases, and fail if it can't.
Allowing third parties to generate their own manpages can be implemented behind an option, or not at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maflcko, are you suggesting the default behaviour should be to also fail if the enabled components
are missing?
7651dc3
to
59cee70
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This just fails on the release binaries. Please make sure to test the code yourself before asking for review. If you run into issues, you can ask questions.
BUILDDIR=bld ./contrib/devtools/gen-manpages.py
Aborting generating manpages...
Error: 'HAVE_SYSTEM' (System component) support is not enabled.
Please enable it and try again.
You'll probably have to use bld/src/bitcoin-build-config.h
instead of the test ini. It seems odd anyway to tie the test config to this.
'build/src/bitcoin-tx', | ||
'build/src/bitcoin-wallet', | ||
'build/src/bitcoin-util', | ||
'build/src/qt/bitcoin-qt', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't just change the relative path to include an unrelated prefix. This breaks when using BUILDDIR
. Please see the conflicting pull request on how to correctly do it.
🐙 This pull request conflicts with the target branch and needs rebase. |
⌛ There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
Drafted for now. @BrandonOdiwuor are you still working on this? |
⌛ There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
Fixes #17506
gen-manapages.py should check enabled build options when generating docs