Skip to content

[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

Merged
merged 11 commits into from
Jul 2, 2025
Merged

[docs] Refresh Developer Policy text #136198

merged 11 commits into from
Jul 2, 2025

Conversation

rnk
Copy link
Collaborator

@rnk rnk commented Apr 17, 2025

Clarify lots of existing practice. Expand on the "major change" section,
which is the closest thing we have on how to run an RFC.

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
Copy link
Member

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.

Copy link
Collaborator

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?

Copy link
Collaborator Author

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.


* 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.
Copy link
Member

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?

Copy link
Collaborator Author

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

Copy link
Collaborator

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?

Copy link
Collaborator Author

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>`.
Copy link
Member

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.

Copy link
Collaborator Author

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).

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
Copy link
Member

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 optrather than as unit tests and use command-line tools such as FileCheck to verify the output for testing efficiency reasons.

Copy link
Collaborator Author

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.

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
Copy link
Member

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.
Copy link
Member

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...

Copy link
Collaborator Author

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

often be helpful in making design discussions more concrete by demonstrating
what is possible.

TODO: Elaborate on best practices for making a successful RFC.
Copy link
Member

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)

Copy link
Collaborator Author

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.

@AaronBallman
Copy link
Collaborator

which is the closest thing we have on how to run an RFC.

FYI:
https://clang.llvm.org/get_involved.html#criteria, starting from The Clang community uses an RFC process

Copy link
Collaborator

@AaronBallman AaronBallman left a 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.


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
Copy link
Collaborator

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
Copy link
Collaborator

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?

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.
Copy link
Collaborator

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, done.

Copy link
Collaborator Author

@rnk rnk left a 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.


* 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.
Copy link
Collaborator Author

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>`.
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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.

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
Copy link
Collaborator Author

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.

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.
Copy link
Collaborator Author

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.
Copy link
Collaborator Author

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

often be helpful in making design discussions more concrete by demonstrating
what is possible.

TODO: Elaborate on best practices for making a successful RFC.
Copy link
Collaborator Author

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.

@rnk rnk marked this pull request as ready for review June 25, 2025 03:10
@rnk
Copy link
Collaborator Author

rnk commented Jul 1, 2025

Ping, PTAL.

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
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.


* 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.
Copy link
Collaborator

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?

Copy link
Collaborator

@AaronBallman AaronBallman left a 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!

@rnk
Copy link
Collaborator Author

rnk commented Jul 2, 2025

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.

@rnk rnk merged commit f01017c into llvm:main Jul 2, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants