@SchrodingerZhu
Github will suggest reviewers if someone recently touched that file. However, that suggestion is only visible to committers.
This seems useful, but I don’t think it’s strong enough for the sort of code ownership being discussed.
@nickdesaulniers once mentioned to me that before committing a TODO in the code, it is recommended to add an associated link to an issue (create a new one if needed). This may also be a good practice to add.
That’s probably a good policy to put in place, though there are a ton of existing todos in the codebase already so it might be significant effort to make issues for all of those.
@nickdesaulniers
What about emergency “revert to green” patches?
I forgot to add this to the original list, but I was thinking that any “revert” patch could land without review, since you’re just returning the repo to a previous state. Relands should still be reviewed though.
That is very aggressive and I suspect leads to fiefdoms where “don’t touch my code” becomes an utterance. Do we really want that?
If we can get the automated codeowners working, then this might be unnecessary since the owner could just request changes to a bad change before it lands. If that’s not possible though, I’m not sure what else there is to do other than “tell people not to do that” or “revert the change”. Perhaps telling people to not do that will be enough.
I feel like it’s common for folks to take week long increments off for vacation. If you don’t hear back from a requested reviewer within 1 week, that’s when I tend to either ping the reviewer again, or take other means.
I agree that people should be able to take time off, so I would say that if a file has any owners it should have at least two (as you said later). We can also go with a longer time for reviews, 2 days was just a number I pulled out of thin air.
Looks like github supports a top level CODEOWNERS file.
That does sound like what I want, though it seems like this would need coordination with the wider project to actually use it.
@asb
If every LLVM sub-project introduces its own policies, then I think that hurts LLVM as a whole.
I agree to some extent, but I would say that different projects within LLVM may have different types of users. Since the libc project is still changing a lot, our users tend to live at head. This means they get the latest changes faster, but they’re more affected by a bad commit turning the bots red then a user that is only taking major versions. For that reason I think having more things checked before commit as opposed to after makes sense.
To the extent these things can be phrased as suggestions and recommended working practices that seems just fine to me, but libc-only rules doesn’t seem the right way to go.
This is probably getting a bit pedantic, but I’m not sure where the difference between “suggestion” and “policy” is. If it’s a suggestion and we enforce it, then it’s a rule in everything but name.
As for having some sort of code owners, ideally the strict ownership would be very limited in scope. I don’t want the whole of the libc directory to require my approval for any change, just small and specific things like FuchsiaTest.h
requiring approval from a Fuchsia developer or the GPU RPC mechanism requiring approval from a GPU developer.