Repository navigation
Check required interfaces before generating manpages - #33828
151henry151 wants to merge 1 commit into
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/33828. ReviewsSee the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste ConflictsNo conflicts as of last run. |
abda94f to
a212ec6
Compare
|
This duplicates #33085. If the author doesn't follow up there shortly, we could reopen here. |
|
Thanks for taking a look, fanquake. I noticed #33085 had gone quiet for a little over three weeks with the review concerns still open, so I put this together. In #33085 the script pulls component flags from #33085 adds a new I appreciate the work Brandon already put in to #33085 and I looked his code over thoroughly before tackling this, but I thought this solution was more elegant and would be preferred. Wanting to follow proper etiquette, perhaps I should have commented my suggestions on his PR instead of opening my own? |
It's been a few weeks, would it be appropriate to reopen here? I did try to reach out to @BrandonOdiwuor on the comments of #33085 and haven't heard back from him yet. |
|
I've closed #33085 given the lack of followup. |
a212ec6 to
2a226ae
Compare
2a226ae to
2746c51
Compare
|
@maflcko you said --ignore-warnings, but I used --skip-build-options-check since we're skipping checks, not ignoring warnings. Should I change it to --ignore-warnings? I switched HAVE_SYSTEM and ENABLE_WALLET to read from bitcoin-build-config.h. WITH_ZMQ isn't in the header, so I'm still parsing CMakeCache.txt for it. Is that expected? |
It is called |
2746c51 to
e67b39a
Compare
|
🚧 At least one of the CI tasks failed. HintsTry to run the tests locally, according to the documentation. However, a CI failure may still
Leave a comment here, if you need help tracking down a confusing failure. |
e67b39a to
27cb3ed
Compare
|
Thanks for the review and feedback @maflcko , I think I've implemented your suggested changes correctly. |
Sorry, i was wrong. This is actually a compile definition. So I guess either the cmake parsing is required, or it has to be made a define in the build header. |
So either we need to keep parsing CMakeCache.txt for WITH_ZMQ, or ENABLE_ZMQ needs to be added to the build header. Do you have a preference between these two approaches? I would lean towards adding it to the build header, since it's simpler and more direct than parsing the CMake cache format. I've implemented that in f9ad5f0 |
27cb3ed to
f9ad5f0
Compare
|
i am not a build system expert, but i don't think compile definitions and build header defines should be mixed for the same symbol. |
|
Also, this doesn't compile (please test locally before pushing) Edit: As for a preference, I'd say it is probably easiest in this context to just read the cmake cache file. |
f9ad5f0 to
fd9fc29
Compare
fd9fc29 to
442346a
Compare
|
I believe the current commit 442346a follows your suggestions, using header checks for HAVE_SYSTEM and ENABLE_WALLET, and still checking CMakeCache.txt for WITH_ZMQ. Frankly, I prefer the code of 2a226ae which intentionally used the existing SKIP_BUILD_OPTIONS_CHECK env var to keep the CLI unchanged, and checked all three interfaces against CMakeCache.txt as the single source of truth. It just seems more elegant to me. Can you clarify the suggestion to use a single argument like --ignore-warnings? I don't see an existing --ignore-warnings option in the script. I added the argument --skip-build-options-check, but wasn't sure if maybe the --ignore-warnings option exists elsewhere and should also skip build options checks? |
|
Yeah, it seems better to just read one file instead of two. I haven't tested this, but the initial code looks plausible lgtm ACK 2a226ae02c1556a8626da823ccde3ba3c89e9a73 |
|
You'll have to push that commit, though |
442346a to
1945329
Compare
|
lgtm ACK 19453292cff54e768b5138236bfffb5706f54f36 I haven't tested this, but the initial code looks plausible |
|
|
|
@151henry151 Is this LLM generated? There is little value in doing that, because it is just adding extra hops and wastes time. At least for this software project, the pull request author is expected to have a rock solid understanding of their own changes they are proposing. Failure of the pull request author to understand their own changes will lead to subtle missed bugs, or tedious review cycles to uncover and fix them. For example, when I asked if the ZMQ build option can be parsed from the header (#33828 (comment)), you should have replied that it isn't present in the header, and thus the check will fail. Ideally with exact steps to reproduce, or the failure output. Given that This means you never even tried to run any of this yourself, to confirm that it works? This looks like purely LLM generated ai slop to me, just like #33254 (comment) and #33926 (review) |
|
I think I understand why my local testing failed to catch this; I was explicitly setting HAVE_SYSTEM=1 and HAVE_SYSTEM=0 at the command line which puts them in the cmake cache. When I'm back at my laptop I'll take a closer look at this. I would guess that it's going to be preferable to read the header file, but we'll have to add the ZMQ define to the build header. [edit: if we want to avoid reading two separate files and have a single source of information for this check] And yes, I wrote and understand the code of this pull request and it was not LLM generated. I can understand your questioning that in the context of my misunderstandings and mistakes here, but would appreciate it if you will continue to take the time to review my work; I'm learning. Thanks |
|
I'm on lunch break from work now, so have a moment at my computer to share for reference how I was testing this locally: I will continue working on this when I get home this evening. Thanks again for your time and effort, I know reviewing slop is taking up a lot of time for bitcoin maintainers and I want to be of value to the project, not a drag on it. |
1945329 to
bd7c049
Compare
|
@maflcko @fanquake I believe bd7c049 addresses the issue. The script now reads all three features (HAVE_SYSTEM, ENABLE_WALLET, and WITH_ZMQ) from bitcoin-build-config.h as the single source of truth, which resolves the problem that HAVE_SYSTEM is not typically present in CMakeCache.txt. I added #cmakedefine WITH_ZMQ 1 to the header template, which references the existing CMake option WITH_ZMQ (defined in CMakeLists.txt) and conditionally generates #define WITH_ZMQ 1 in the output header when ZMQ is enabled. I've tested locally across all combinations of these three features enabled/disabled, and the script correctly detects missing features in each case. Thanks for any time you might take to review my work. |
Regarding #33254, that was my very first attempt at contributing to Bitcoin and I acknowledge it was not of any value. Regarding #33926, I think that the most recent commit warrants reopening the pull request and that it is ready for review. Neither of them were "purely LLM generated", and I think that if you look more closely at the current state of #33926 you may even consider reopening it. I did use AI to help me comprehend the issue and to help me research how to go about resolving the issue, and to debug when I made errors, but I take full responsibility for the code as it stands and it is my work, not purely LLM generated ai slop. Thanks for any consideration. |
| #cmakedefine ENABLE_WALLET 1 | ||
|
|
||
| /* Define to 1 to enable ZMQ notifications. */ | ||
| #cmakedefine WITH_ZMQ 1 |
There was a problem hiding this comment.
i am not a build system expert, but i don't think compile definitions and build header defines should be mixed for the same symbol.
This makes it triply confusing
There was a problem hiding this comment.
@maflcko
The header define WITH_ZMQ uses the same name as the CMake option WITH_ZMQ that users configure (e.g., via -DWITH_ZMQ=ON).
Using a different name would require adding a mapping line like set(HAVE_ZMQ ${WITH_ZMQ}) in CMakeLists.txt.
Using the existing WITH_ZMQ name requires no additional mapping code—the #cmakedefine directive can check the existing CMake variable directly.
Using ENABLE_ZMQ won't work because it's already a compile definition, as you pointed out earlier.
I think this solution is the most elegant, but if you think a different name like HAVE_ZMQ would make things clearer, I'm happy to adjust the code.
There was a problem hiding this comment.
@maflcko it's been some time and I haven't heard back from you on this. Could I trouble you to take another look and share your thoughts?
There was a problem hiding this comment.
I am not too familiar with the build system best practises, so I can't comment here, but it looks like there is some proposal in #35072 that touches this topic.
There was a problem hiding this comment.
Thanks maflcko. @fanquake (or @hebasto) — would either of you be willing to weigh in on the naming convention here? Specifically, whether reusing the CMake option name WITH_ZMQ directly in the #cmakedefine is preferable to introducing a separate HAVE_ZMQ define that would require an explicit mapping in CMakeLists.txt
|
There is a stale ACK here, can you take another look @maflcko? |
|
This is still not getting review. Will leave it open for a bit more, but we have a lot of other pull requests open and this just might not be a priority. |
|
Closing for now due to lack of interest. Given the large number of other pull requests open, this just doesn't seem like a priority for reviewers. |
Guard manpage generation by reading bitcoin-build-config.h and exiting if HAVE_SYSTEM, ENABLE_WALLET, or WITH_ZMQ are off, and provide a short hint so contributors rebuild with the right flags instead of committing incomplete manpages.
Fixes #17506
Override by using the SKIP_BUILD_OPTIONS_CHECK environment variable if you really need a custom-fit manpage (see #29457 (comment)).