-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add arm-toolchain CONTRIBUTING.md including downstream patch policy #48
base: arm-software
Are you sure you want to change the base?
Conversation
This is based on the "LLVM Embedded Toolchain for Arm" contributing.md with adaptations for the arm-toolchain. The largest change is the introduction of the downstream patch policy. Arm wants the arm-toolchain to be as close to the upstream open-source projects as possible, we impose some additional requirements on downstream patches so that we can summarize all the patches and know why they were made. Replace llvm-project's CONTRIBUTING.md rather than using another location like .github as we expect many developers to read the file from the terminal.
CONTRIBUTING.md
Outdated
The Arm Toolchain repository is synchronized with the upstream | ||
*llvm-project* including the main and release branches. Arm Toolchain | ||
for Embedded aims to stay close to the head of the *picolibc* main | ||
branch. The newlib overlay package aims to track the most recent |
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 suggest we stick to a consistent formatting of project names. In some places they are emphasized with stars, in others they aren't. For instance in this line, newlib does not have emphasis.
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.
ACK. I thought I'd caught those. Will fix.
CONTRIBUTING.md
Outdated
before reporting. If the issue exists in *llvm-project* or *picolibc* | ||
then please report the issue in the upstream project. | ||
|
||
Please create a Github issue in the *arm-toolchain* 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.
Github -> GitHub
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.
ACK
CONTRIBUTING.md
Outdated
|
||
Please create a Github issue in the *arm-toolchain* project | ||
[Issues](https://github.com/arm/arm-toolchain/issues) | ||
list and label is as a `bug`. |
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.
We ought to check that external contributors have permissions to add labels. That is not the case for example in the ABI and the ACLE repositories.
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.
Looks like our base role is Read
and Triage
is needed to add labels. I've taken out the requirement to add labels, I'm not sure that was happening in practice anyway.
I've suggested putting [RFC]
in the title. I expect one of us with sufficient privilege will need to add the labels.
CONTRIBUTING.md
Outdated
For a bigger change, please create an issue in the | ||
*arm-toolchain* project | ||
[Issues](https://github.com/arm/arm-toolchain/issues) | ||
list and label is as an `rfc` (Request for Comments) to initiate the discussion |
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.
Same remark about permissions to add labels
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.
ACK. I've suggested [RFC]
in the subject instead.
CONTRIBUTING.md
Outdated
#### Toolchain integration | ||
|
||
Patches that are specific to integrating components of the Arm | ||
toolchain or the the projects that it depends on, may be implemented |
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.
"the 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.
ACK
CONTRIBUTING.md
Outdated
* New files added to an external project like *picolibc* or *newlib* | ||
must follow the licensing and copyright of the external project. | ||
|
||
* Any patch that causes the arm toolchain to deviate from upstream |
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.
Capitalise arm toolchain
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.
ACK
CONTRIBUTING.md
Outdated
|
||
* Any patch that causes the arm toolchain to deviate from upstream | ||
behavior, such as a new command-line option, must be documented in | ||
the arm-software/doc/features.md file. The documentation for a |
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.
Put the filepath between ticks
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.
ACK
* Same emphasis used for open-source projects. * Removed requirement to add labels on issues. * Fix typos and capitalisation.
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 review. I'll upload a fixup patch.
CONTRIBUTING.md
Outdated
The Arm Toolchain repository is synchronized with the upstream | ||
*llvm-project* including the main and release branches. Arm Toolchain | ||
for Embedded aims to stay close to the head of the *picolibc* main | ||
branch. The newlib overlay package aims to track the most recent |
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.
ACK. I thought I'd caught those. Will fix.
CONTRIBUTING.md
Outdated
before reporting. If the issue exists in *llvm-project* or *picolibc* | ||
then please report the issue in the upstream project. | ||
|
||
Please create a Github issue in the *arm-toolchain* 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.
ACK
CONTRIBUTING.md
Outdated
|
||
Please create a Github issue in the *arm-toolchain* project | ||
[Issues](https://github.com/arm/arm-toolchain/issues) | ||
list and label is as a `bug`. |
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.
Looks like our base role is Read
and Triage
is needed to add labels. I've taken out the requirement to add labels, I'm not sure that was happening in practice anyway.
I've suggested putting [RFC]
in the title. I expect one of us with sufficient privilege will need to add the labels.
CONTRIBUTING.md
Outdated
For a bigger change, please create an issue in the | ||
*arm-toolchain* project | ||
[Issues](https://github.com/arm/arm-toolchain/issues) | ||
list and label is as an `rfc` (Request for Comments) to initiate the discussion |
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.
ACK. I've suggested [RFC]
in the subject instead.
CONTRIBUTING.md
Outdated
#### Toolchain integration | ||
|
||
Patches that are specific to integrating components of the Arm | ||
toolchain or the the projects that it depends on, may be implemented |
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.
ACK
CONTRIBUTING.md
Outdated
* New files added to an external project like *picolibc* or *newlib* | ||
must follow the licensing and copyright of the external project. | ||
|
||
* Any patch that causes the arm toolchain to deviate from upstream |
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.
ACK
CONTRIBUTING.md
Outdated
|
||
* Any patch that causes the arm toolchain to deviate from upstream | ||
behavior, such as a new command-line option, must be documented in | ||
the arm-software/doc/features.md file. The documentation for a |
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.
ACK
CONTRIBUTING.md
Outdated
To get started with contributing, please take a look at the | ||
[Contributing to LLVM](https://llvm.org/docs/Contributing.html) guide. It | ||
describes how to get involved, raise issues and submit patches. | ||
Arm Toolchain for Embedded integrates *llvm-project* with 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.
Do we need to mention llvm-libc separately as well? It is part of llvm-project so implicitly is there, however we seem to go into much more details in regard to the other two libraries.
Taking into account that we want to use llvm-libc more, we may want to mention is explicitly.
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.
The distinction I was trying to make was in-tree llvm-project, which includes llvm-libc, and out-of-tree picolibc and newlib. LLVM libc
I've updated the wording to hopefully make it clearer.
CONTRIBUTING.md
Outdated
list and put [RFC] in the subject line (Request for Comments) to initiate the discussion | ||
first, before submitting a PR for the change. | ||
|
||
There is no formal template for an `rfc`, however it would be good to |
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.
rfc
was probably a label previously, so may be clearer as RFC now with the new recommendation.
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.
ACK
CONTRIBUTING.md
Outdated
|
||
A patch is considered a downstream patch if: | ||
|
||
* It touches any part of the *llvm-project* repository outside 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.
Should this be arm-toolchain repository? Or maybe more complicated statement like llvm-project files inside arm-toolchin 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.
I've used the arm-toolchain repository and tweaked the language a bit.
CONTRIBUTING.md
Outdated
as when the upstream equivalent lands, must include Removes | ||
downstream issue:#<issue number>. | ||
|
||
* New files in *llvm-project* must include the LLVM license, with 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.
Same as above: llvm-prooject files inside arm-toolchain 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.
ACK
CONTRIBUTING.md
Outdated
|
||
* Any patch that causes the Arm Toolchain to deviate from upstream | ||
behavior, such as a new command-line option, must be documented in | ||
the `arm-software/doc/features.md file`. The documentation for a |
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 add the placeholder file now as well?
Maybe it should have sections for common and embedded/linux specific features?
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, I was in two minds over whether to do that here or in a follow up patch.
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.
There's an interesting design decision here. The current directory structure is:
arm-software
|-- ci
|-- embedded
|-----docs
|-- linux
With the docs directory for embedded being part of the installed package.
I think we would want the documentation of downstream features to be available in the installed package for LLVM embedded at least. Not sure about what is supposed to happen in linux.
One way of doing this is to put the downstream feature documentation in embedded/docs/features.md
and linux/docs/features.md
with duplication for common changes. In theory all changes are common to both, but I suspect that the users for each toolchain will care about different downstream features. For example ATfA won't care about M-profile code-generation changes.
An alternative is to add a new doc directory to arm-software
for common docs for both embedded and linux. The tool installation could then copy the features.md
file into the installation.
My instinct is that ATfE will have more of the downstream features, and that these won't be that useful to ATfA, so I think each toolchain can have its own features.md file.
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'll start with a patch for embedded/docs/features.md
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, this is a tricky one. On one hand, most of the LLVM changes will technically impact both, so would be easier to document in one place, but then you are right it is not obvious how to nicely include into the distribution.
I think I prefer to have a shared folder to document the changes in one place, then an extra CMake rule to copy contents into the distribution.
We may have 3 feature files: common to copy to both, embedded and linux for very clearly specific things to be copied to respective distributions.
* change rfc to RFC. * prefer arm-toolchain repository to llvm-project when talking about scope of changes. * Add docs subdirectory for documentation common to both ATfE and ATfA. * Created skeleton docs for downstream feature user documentation.
I've uploaded a new patch with the common docs folder and some skeleton feature pages. I've also removed the embedded/contributing.md as this replaces it. |
This is based on the "LLVM Embedded Toolchain for Arm" contributing.md with adaptations for the arm-toolchain.
The largest change is the introduction of the downstream patch policy. Arm wants the arm-toolchain to be as close to the upstream open-source projects as possible, we impose some additional requirements on downstream patches so that we can summarize all the patches and know why they were made.
Replace llvm-project's CONTRIBUTING.md rather than using another location like .github as we expect many developers to read the file from the terminal.