-
Notifications
You must be signed in to change notification settings - Fork 978
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
CONTRIBUTING.md: Fill out section on pull requests. #6879
base: trunk
Are you sure you want to change the base?
Conversation
CONTRIBUTING.md
Outdated
Large projects must be broken into series of smaller pull requests | ||
that can be reviewed and discussed independently. WGPU's experience | ||
with large, complex pull requests has been bad enough that we now | ||
simply reject them, without trying to assess their merits. |
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.
What happens to things that effectively need large PRs? To use an example: ray-tracing where (most) of it was a single feature that couldn't be broken down? Some of these statements are definite, so maybe they should note where it's a requirement.
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.
suggestion: I agree with @Vecvec that an unqualified "if big, straight to jail /s" rule is not easy for an external contributor to reason about. I also think that we need to disentangle (1) making aligned changed from (2) the art of making review easier, which are related but distinct. I think our intent would be better communicated with something like this instead:
WGPU is a complex codebase, and contributing to it is often nontrivial. To best ensure that your contributions are accepted, we have some recommendations to consider before you get started:
- Large efforts that are ultimately rejected tend to burn contributors out on both sides of a review. To avoid this, we strongly encourage you to validate time-consuming contributions by engaging maintainership before you invest yourself too heavily.
- File the smallest PRs that make sense on their own. Using atomic commits is also encouraged, since they facilitate review on both sides.
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.
issue: This information is technically duplicative with information in the "What can I work on"? as a new contributor?
section.
suggestion: Keeping this dedicated section and linking to it from others would reconcile this.
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.
Yyyyeah, I think there's also a bit of a trust issue here. Based on my experiences in this very repo, when someone says "Oh, I couldn't possibly break this up", I am very skeptical. There have been several times when someone was swearing that their PR had to be landed as a unit, it couldn't possibly be broken up - but then in review I was totally able to break it up into smaller pieces that made sense, if not fully independently, at least serially.
Technically, any PR can be split up - by writing ridiculous code. But that kind of absurdity doesn't help reviewers, and is a waste of time. I'm claiming that in practice, large PRs almost always have reasonable subdivisions.
Counterpoints:
-
When you're doing a massive rename, that obviously has to be a single PR.
-
Switching wgpu to dynamically dispatched hal objects probably needed to be a massive PR. We could have done it one hal type at a time, but that wouldn't really make it any easier to review.
What's hard to review is when the PR has some big substantive change (like dynamic hal dispatch, say), but also contains cleanups and refactors that pave the way for that substantive change. Those cleanups and refactors can often be broken out into their own steps. They may not seem motivated, in the absence of the main change, but if they're neutral then that's fine.
I can expand on this point, but I do want to put a lot of pressure on authors, because our past experiences have been so bad.
CONTRIBUTING.md
Outdated
#### Large pull requests are not accepted | ||
|
||
Large projects must be broken into series of smaller pull requests |
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.
Maybe like this?
#### Large pull requests are not accepted | |
Large projects must be broken into series of smaller pull requests | |
#### Large pull requests are not normally accepted | |
If you believe a project you are working on requires a large pull request then you *must* ask a maintainer before. If they believe that it requires a large pull request then you should keep in frequent contact and talk to them if the plan changes. Otherwise large projects must be broken into series of smaller pull requests |
otherwise it could confuse beginners (which I am assuming this is for) if they see a large project.
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.
Context: This conversation branches out from the previous one: #6879 (comment)
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.
I didn't set that comment up properly to suggest.
CONTRIBUTING.md
Outdated
PR. | ||
### Pull requests | ||
|
||
The "Assigned" field on a pull request indicates who has taken |
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.
suggestion: Let's use backticks (i.e., `Assigned`
) instead of double quotes to make it clear that this is content that somebody would write.
This feedback applies to other references to fields or suggested content fragments.
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.
I made the suggested change. I kind of think <code>
should be reserved for things people type, but "assigned" is just a label on the GitHub page. But I don't feel too strongly about it.
I think I'm going to be able to continue reviewing this on Tuesday of this coming week. 🫡 See you then! |
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.
I think this new content is good, but its relationship with other content needs some work. Let's handle the current conversations, and then see where we're at.
5d8e011
to
23c20a2
Compare
23c20a2
to
788ac36
Compare
Hmm, the large PR language still isn't quite right. |
If a pull request contains multiple commits, please indicate whether | ||
they need to be squashed into a single commit before they're merged, | ||
or if they're ready to rebase onto `trunk` as they stand. In the |
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.
Personally I think this should be in the PR template to stop people (like me) forgetting about it. Maybe even in the template text (not just a comment) to act as a default (I would assume it would be squash). I also think a default would be especially useful for beginners too.
I think the wording is much better, although I'm not a WGPU maintainer (and so don't have as much experience with PRs) it seems to match with what my experience of code being reviewed feels like. |
No description provided.