-
Notifications
You must be signed in to change notification settings - Fork 14.6k
[docs] Refresh Developer Policy text #136198
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
Conversation
Clarify lots of existing practice. Expand on the "major change" section, which is the closest thing we have on how to run an RFC.
#. Once you have created your patch, create a | ||
:ref:`GitHub Pull Request <github-reviews>` for | ||
it (or commit it directly if applicable). | ||
* Identify 2-3 individuals to review the patch. Look through the relevant |
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.
Do random GIthub users have permissions to add PR reviewers? If not, we should document the recommended way of attracting attention, e.g., by @-pinging the relevant people in a comment and explicitly stating you don't have permission to add reviewers (for one-off PRs) and/or asking for "triage" set of permissions.
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.
Do random GIthub users have permissions to add PR reviewers?
In my experience, they do not have the ability to do this themselves unless they're a member of the organization. Though I wonder if that can be relaxed?
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 added guidance to @-ping in the absence of permission changes. It's good enough for the time being.
llvm/docs/DeveloperPolicy.rst
Outdated
|
||
* Make sure your patch is based on a recent commit from ``main``, rather than a | ||
previous release branch. If you want to make changes to a release branch, land | ||
a change in ``main`` first and ask a release manager to backport it. |
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.
Should we encourage developers to backport their patches themselves, when possible?
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 I should link the instructions for backporting and leave it at that. It looks like the current state is that we have special github issue comments that bots pick up and act on:
https://llvm.org/docs/GitHub.html#backporting-fixes-to-the-release-branches
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.
Are you planning on adding that link here?
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.
Yes, done, sorry I missed that.
archived, and that notices of confidentiality or non-disclosure cannot be | ||
respected. | ||
|
||
We accept code contributions as :ref:`GitHub Pull Requests <github-reviews>`. |
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.
Some thing I don't have a strong opinion on, but witnessed: some PRs or Github issue discussions grow very long and sometimes contentious, but much fewer people engage with them. Maybe we want some sort of soft guideline on when to move such a discussion to the forums for broader community involvement.
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 agree that's useful information, but I think I'd move that to the specific CodeReview docs, and I don't want to touch that file in this PR. This section is supposed to be an overview of the main communication spaces (Discourse, Discord, GitHub).
llvm/docs/DeveloperPolicy.rst
Outdated
by :doc:`bugpoint <Bugpoint>` or manually. It is unacceptable to place an | ||
entire failing program into ``llvm/test`` as this creates a *time-to-test* | ||
burden on all developers. Please keep them short. | ||
* Test cases are written in the relevant input language of the relevant |
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 we want to highlight more prominently that, whenever possible, tests should be written against a tool such as opt
rather than as unit tests and use command-line tools such as FileCheck
to verify the output for testing efficiency reasons.
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 scrapped this paragraph, reordered it, and mentioned our usual preferred approaches.
llvm/docs/DeveloperPolicy.rst
Outdated
set right" will leave the reviewer wondering about which bits, and why they | ||
weren't right, while "Correctly set overflow bits in TargetInfo" conveys almost | ||
all there is to the change. | ||
Commit messages should communicate briefly what the change does, and provide |
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.
IMO, the "why" part is the most important in the commit message. We can understand the "what" from the commit itself, although it is useful to summarize the "what" in the message for the reviewer to check whether the code actually does what the author intended.
messages should be thoughtfully written and specific, rather than vague. For | ||
example, "bits were not set right" will leave the reviewer wondering about which | ||
bits, and why they weren't right, while "Correctly set overflow bits in | ||
TargetInfo" conveys almost all there is to the change. |
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'd also remind that the final commit, potentially squashed from multiple commits in a PR, will have the description taken from the PR description. The latter is set once when the PR is created, defaulting to the commit message if the PR only contains one commit, and does not track the changes to the commit message. As a corollary, developers must manually update the PR description as they iterate on the change...
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 added a paragraph after the following bullets
llvm/docs/DeveloperPolicy.rst
Outdated
often be helpful in making design discussions more concrete by demonstrating | ||
what is possible. | ||
|
||
TODO: Elaborate on best practices for making a successful RFC. |
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.
Random ideas for this from recent experience:
- make it targeted, don't touch components irrelevant to the task
- explain how the change improves LLVM for all/most stakeholders rather than your specific use case
- periodically summarize the current state of the discussion and clearly separate points where consensus seems to emerge from those where further discussion is necessary
- by default, the burden of proof is on the proposer (though we'd like to avoid situations when somebody keeps asking for more proof as a way of exhausting the proposer)
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 added that list, but I'm sure we can add more here :) I think my goal with this PR was to get a better base for future edits.
FYI: |
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.
Thank you for working on this refresh, it's definitely heading in a good direction IMO! I have some light feedback, still thinking about content further.
llvm/docs/DeveloperPolicy.rst
Outdated
|
||
Making and Submitting a Patch | ||
----------------------------- | ||
|
||
When making a patch for review, the goal is to make it as easy for the reviewer | ||
to read it as possible. As such, we recommend that you: | ||
Submitting patches for review is straightforward with GitHub. Follow 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.
Submitting patches for review is straightforward with GitHub.
I'd probably reword this to "Patches are submitted through GitHub" rather than claim it's straightforward for everyone (not everyone is familiar with GitHub or comfortable with git in general).
#. Once you have created your patch, create a | ||
:ref:`GitHub Pull Request <github-reviews>` for | ||
it (or commit it directly if applicable). | ||
* Identify 2-3 individuals to review the patch. Look through the relevant |
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.
Do random GIthub users have permissions to add PR reviewers?
In my experience, they do not have the ability to do this themselves unless they're a member of the organization. Though I wonder if that can be relaxed?
llvm/docs/DeveloperPolicy.rst
Outdated
feature tests only. More extensive test cases (e.g., entire applications, | ||
benchmarks, etc) should be added to the ``llvm-test`` test suite. The ``llvm-test`` | ||
suite is for integration and application testing (correctness, performance, etc) | ||
testing, not feature or regression testing. |
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.
Do we also want to mention that it's the place to put tests which are incompatible with the license from the main LLVM repo?
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.
Sure, done.
Co-authored-by: Oleksandr "Alex" Zinenko <[email protected]>
Co-authored-by: Aaron Ballman <[email protected]>
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.
Thanks for the suggestions, I think it's actually significantly better. Sorry for the long hiatus.
llvm/docs/DeveloperPolicy.rst
Outdated
|
||
* Make sure your patch is based on a recent commit from ``main``, rather than a | ||
previous release branch. If you want to make changes to a release branch, land | ||
a change in ``main`` first and ask a release manager to backport it. |
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 I should link the instructions for backporting and leave it at that. It looks like the current state is that we have special github issue comments that bots pick up and act on:
https://llvm.org/docs/GitHub.html#backporting-fixes-to-the-release-branches
archived, and that notices of confidentiality or non-disclosure cannot be | ||
respected. | ||
|
||
We accept code contributions as :ref:`GitHub Pull Requests <github-reviews>`. |
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 agree that's useful information, but I think I'd move that to the specific CodeReview docs, and I don't want to touch that file in this PR. This section is supposed to be an overview of the main communication spaces (Discourse, Discord, GitHub).
#. Once you have created your patch, create a | ||
:ref:`GitHub Pull Request <github-reviews>` for | ||
it (or commit it directly if applicable). | ||
* Identify 2-3 individuals to review the patch. Look through the relevant |
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 added guidance to @-ping in the absence of permission changes. It's good enough for the time being.
llvm/docs/DeveloperPolicy.rst
Outdated
by :doc:`bugpoint <Bugpoint>` or manually. It is unacceptable to place an | ||
entire failing program into ``llvm/test`` as this creates a *time-to-test* | ||
burden on all developers. Please keep them short. | ||
* Test cases are written in the relevant input language of the relevant |
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 scrapped this paragraph, reordered it, and mentioned our usual preferred approaches.
llvm/docs/DeveloperPolicy.rst
Outdated
feature tests only. More extensive test cases (e.g., entire applications, | ||
benchmarks, etc) should be added to the ``llvm-test`` test suite. The ``llvm-test`` | ||
suite is for integration and application testing (correctness, performance, etc) | ||
testing, not feature or regression testing. |
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.
Sure, done.
messages should be thoughtfully written and specific, rather than vague. For | ||
example, "bits were not set right" will leave the reviewer wondering about which | ||
bits, and why they weren't right, while "Correctly set overflow bits in | ||
TargetInfo" conveys almost all there is to the change. |
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 added a paragraph after the following bullets
llvm/docs/DeveloperPolicy.rst
Outdated
often be helpful in making design discussions more concrete by demonstrating | ||
what is possible. | ||
|
||
TODO: Elaborate on best practices for making a successful RFC. |
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 added that list, but I'm sure we can add more here :) I think my goal with this PR was to get a better base for future edits.
Ping, PTAL. |
llvm/docs/DeveloperPolicy.rst
Outdated
the firehose of all issue notifications, which some community members use to | ||
perform custom filtering. | ||
|
||
Beyond the main formal communication channels, LLVM has a Discord server for |
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.
This makes it sound like working groups are not formal communication channels. Perhaps:
Beyond the Discourse forums, LLVM has...
instead?
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 said "asynchronous written", since I think that's the differentiator.
llvm/docs/DeveloperPolicy.rst
Outdated
|
||
* Make sure your patch is based on a recent commit from ``main``, rather than a | ||
previous release branch. If you want to make changes to a release branch, land | ||
a change in ``main`` first and ask a release manager to backport it. |
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.
Are you planning on adding that link here?
Co-authored-by: Aaron Ballman <[email protected]>
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.
LGTM aside from a formatting nit. Thank you for working on the refresh!
Co-authored-by: Aaron Ballman <[email protected]>
Thanks for the review! I'm about to go on vacation for a while, and given that this is all doc text updates with no intended policy changes, I think I should go ahead and land them. I'm happy to address any unaddressed concerns from @ftynse in two weeks, and I think folks will benefit from the updates in the meantime. |
Clarify lots of existing practice. Expand on the "major change" section,
which is the closest thing we have on how to run an RFC.