I can’t really provide a doc, but i can describe what I believe to be the biggest problem.
In a GH PR, comments are associated with commit hashes. If a commit hash ceases to exist, so do all comments associated with it. The comments are quite literally destroyed and irretrievable.
Either I’m misunderstand something, or this is just blatantly incorrect. Assuming we’re talking about pull request reviews here, review comments do not get lost, regardless of how you rebase the pull request branch.
What this means for LLVM is that everyone will have to completely stop using history rewriting operations. No more rebase, squash, amend, etc.
This is also incorrect. Most GitHub projects I work on use a rebase-oriented workflow without issue, so clearly that’s possible…
The only issue in this area that I’m aware of is that you can’t easily see what changed between two revisions of a pull request if you both a) rebase onto master and b) amend commits at the same time. For review purposes it is most useful if additional changes are not squashed into existing commits, but pushed on top. The squash is best performed when landing the changes.
A common theme in LLVM development is carefully curating patch histories for easy reviewability. For example, someone might tell you to split a patch up into two patches and have them reviewed separately. If there are dependent changes between the two, you have to choices:
- You can split this into two commits on a single branch.
- You can make 2 branches A and B, with B based off A. Request a PR from A into master and B into A.
If you do 1 and someone requests changes on A, you cannot rebase -i your fixes so that they still appear in the diff for A, because that destroys comments.
If you do 2 and someone requests changes on A, you then have to merge (not rebase) those changes into B. The problem is compounded the more pieces you have to split your patch into and it becomes quite a maintenance headache.
This is a real issue (minus the comment about destroying comments). The option 3. here is to open a PR that includes the base changes and say “review only the last commit, the rest are dependent changes”, which is how I have seen this handled commonly. GitHub allows you to limit the review view to individual commits.
IMO, switching to GH PRs means abandoning LLVMs philosophy on incremental development for the above reason.
One more interesting quirk of GitHub PR: it is actually impossible to make a comment on lines in a PR that aren’t changed as part of the PR (eg surrounding code). See
https://github.com/isaacs/github/issues/284 which has been open a very long time
This is a real issue.
Nikita