Comment by mi_lk
7 hours ago
I'd really like to hear your argument about when single large PR is better than stacked PRs from both PR author and reviewers' perspectives
7 hours ago
I'd really like to hear your argument about when single large PR is better than stacked PRs from both PR author and reviewers' perspectives
Why frame this as either/or? Those aren't the only two options.
There are different types of "large" PR's. If I'm doing a 10,000 LOC refactor that's changing a method signature, that's a "large" PR, but who cares? It's the same thing being done over and over, you get a gist of the approach, do some sampling and sanity checks, check sensitive areas, and done.
If I'm doing something more complex and storied to the point it requires stacks with dependencies, then I'm questioning why I haven't split and chunked the thing into smaller PR's in the first place and having those reviewed. Ultimately the code still has to get reviewed, so often it's about reframing the mindset more than anything else. If it organizationally slows me down to the point that chunking the PR into smaller components is worse than a stacked-pr like approach, I'm not questioning the PR structure, I'm questioning why I'm being slowed down organizationally. Are my reviews not picked up fast enough? Is the automated testing situation not good enough? The answer always seems to come back to the process and not the tooling in these scenarios.
What problem does the stacked PR solve? It's so you can continue working downstream while someone else reviews your unmainlined upstream code that it depends on. If your upstream code gets mainlined at a reasonable rate, why is this even a problem to be solved? It also implies that you're only managing 1-3 major workstreams if you're getting blocked on the feature downstream which also begs the question, why are you waterfalling all of your work like this?
Fundamentally, you still have to manage the dependency issue with upstream PR's, even when you're using stacked PR's. Let's say that an upstream reviewer in your stacked PR chain needs you to change something significant. You still have to walk down that chain and update your code accordingly. Having tools to slightly make that easier is nice, but the cost benefit of being on a different opt in toolchain that requires its own learning curve is questionable.