Repository navigation
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/32217. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste 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. |
|
So this is fixing a CMake regression? |
There was a problem hiding this comment.
Does CMake have no logical-or operator that could be used to unite these two conditional blocks?
There was a problem hiding this comment.
This comment is still unaddressed.
If so, could it be demonstrated that something works in v28.1 but is broken in v29.0rc3? |
There was a problem hiding this comment.
In what real-life scenarios is this branch executed?
There was a problem hiding this comment.
I don't know of any, it's included for correctness since the alternative is clearly wrong.
There was a problem hiding this comment.
In what real-life scenarios is this branch executed?
There was a problem hiding this comment.
If any parent directory is a git repository, but the source directory is not
There was a problem hiding this comment.
It is unnecessary to run git for that. I believe #32220 presents a superior and fully functional alternative to this PR.
There was a problem hiding this comment.
I disagree somewhat @hebasto, though I don't think it's very important.
Sure, the user can disable git entirely if they know they're not building directly in a git working tree for the repository, but it doesn't seem unreasonable to me that the code automatically works correctly by not treating it as a git build if it happens to be unpacked tarball in an unrelated git working tree.
That said, if this already doesn't work correctly it's not a blocker for 29.x.
There was a problem hiding this comment.
Sure, the user can disable
gitentirely if they know they're not building directly in a git working tree for the repository, but it doesn't seem unreasonable to me that the code automatically works correctly by not treating it as a git build if it happens to be unpacked tarball in an unrelated git working tree.
I've read your comment a few times, and I'm fairly sure I agree with you 100%. Now I'm wondering — which (part) of my comments do you disagree with?
There was a problem hiding this comment.
You suggest that it is possible to find out, without running git, that a parent directory is a git repository, but the source directory is not. I don't see how.
You suggest that #32220 is an alternative to this PR, but as far as I can tell, it offers no way to detect the use case this PR is concerned about.
There was a problem hiding this comment.
Oh, I see! That only works if it's a git-created tarball, and not a source tree copied over from somewhere, but perhaps that is enough.
There was a problem hiding this comment.
It's not enough: a git work tree appears similar to "copied over from somewhere" if the build user does not have permissions to access the git repo.
There was a problem hiding this comment.
It's not enough: a git work tree appears similar to "copied over from somewhere" if the build user does not have permissions to access the git repo.
This case is handled well in the master branch, as git rev-parse --is-inside-work-tree 2> /dev/null will be empty.
The PR's author mentioned only one explicit case where this PR might alter behaviour:
Accordingly, I have verified any related behavioural changes in this scenario:
As demonstrated above, there is no change in behaviour and no indication of a "CMake regression". Maybe remove this PR from the 29.0 milestone? |
|
Tested 903fc971ed6b13da7260f5e5a8e3e9e7372b2bd7 on Ubuntu 24.10. When building from my local Bitcoin Core repository:
The PR's behaviour is evidently incorrect. |
The regression occurred in #18556 and would have been fixed by #18902
v29.0rc3 is not 76e386813b40 |
So, it's not caused by the migration from Autotools to CMake.
Sure it is not. Because the build happens within another "parent" git repository:
|
Guix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use] |
… right one Original-Github-Pull: bitcoin#7522
903fc97 to
3eb619f
Compare
This is still unaddressed. |
@luke-jr are you going to add documentation here? |
|
NACK, for the following reasons:
|
cmake port of fix originally fixed for autotools in #7522