[INFO] Suggestions for submitting patches

Use this forum for requesting small changes in ChibiOS. Large changes should be discussed in the development forum. This forum is NOT for support.
User avatar
Giovanni
Site Admin
Posts: 13085
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 759 times
Been thanked: 637 times
Contact:

[INFO] Suggestions for submitting patches

Postby Giovanni » Sun Sep 24, 2017 6:08 pm

Hi,

Just some notes for making sure yous patches are applied in a short time:

1) Create patches to be applied to trunk code. Stable code does not usually receive changes, only fixes. Back-porting changes is possible but it has to be evaluated.
2) Make sure your patches are "atomic", each patch should only focus on one change, if needed make more of them. We need to evaluate changes and huge patches make that difficult.
3) Make sure you change is complete, the project maintains a lot of devices, if the patches only address one of them then the integrator is left with a lot of work and that makes things a lot slower. Registry files are a typical example.
4) If you patch requires changes to mcuconf.h, halconf.h or chconf.h then it can be very slow, all files must be updated in all demos and test applications, there hundreds of them. Avoid changes to configuration files if possible.
5) Do not submit patches for unofficial code, most likely we don't maintain that. Better contact the original author.
6) Patches impacting demos or test application must also patch those, all of them.

Things that can slow down the process:

1) Violation of coding rules (tabs, comments etc, see the article regarding those), try to follow our patterns.
2) Breaking APIs. This can be done only on major releases (yyyy.mm.0).
3) Significant changes or features, those has to be discussed on the development forum because it is handled more on an architectural level, this process is for small changes.
4) Contributing things we cannot easily test and maintain, once something is included users expect us to support them. We cannot rely on contributors staying around here and answer questions.

How to submit patches:
- For bug fixes open a new topic in the "Bug Reports" forum.
- For small changes open a new topic in the "Small Changes" forum.
- For proposing big changes it is better to discuss in the "Development" forum before even starting, inclusion is not a given, depending on impact.

Giovanni

rasm
Posts: 11
Joined: Thu Aug 24, 2017 6:35 pm
Has thanked: 4 times
Been thanked: 3 times

Re: [INFO] Suggestions for submitting patches

Postby rasm » Tue Sep 26, 2017 12:24 pm

Hi Giovanni,

What about switching completely to git and use git/github's tools to manage pull requests ?

User avatar
Giovanni
Site Admin
Posts: 13085
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 759 times
Been thanked: 637 times
Contact:

Re: [INFO] Suggestions for submitting patches

Postby Giovanni » Tue Sep 26, 2017 1:08 pm

Hi,

It is an old topic here :) the short version is that I don't love git particularly so I prefer to stay with subversion.

Giovanni

rasm
Posts: 11
Joined: Thu Aug 24, 2017 6:35 pm
Has thanked: 4 times
Been thanked: 3 times

Re: [INFO] Suggestions for submitting patches

Postby rasm » Tue Sep 26, 2017 3:25 pm

Fair enough. All the cool kids are using it though ;)

steved
Posts: 733
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 10 times
Been thanked: 108 times

Re: [INFO] Suggestions for submitting patches

Postby steved » Tue Sep 26, 2017 8:14 pm

Giovanni wrote:1) Create patches to be applied to trunk code.

Given that files within ChibiOS are generally relatively small, could I request complete files rather than genuine patches (diffs)?

From time to time I download a patch to test/update my library, and invariably have some difficulty - either because I don't have the right software to hand (patching is a rare process for me; pretty much ChibiOS only), or because the trunk has moved on since the patch was generated. Sometimes I can sort out the change by examining the patch file; sometimes I just don't bother).

And, at risk of starting
Giovanni wrote:It is an old topic here :) the short version is that I don't love git particularly so I prefer to stay with subversion.

+1
(I don't care about being a 'cool kid'; I just want something that works for me ;) )

User avatar
Giovanni
Site Admin
Posts: 13085
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 759 times
Been thanked: 637 times
Contact:

Re: [INFO] Suggestions for submitting patches

Postby Giovanni » Tue Sep 26, 2017 8:50 pm

Submitting files is perfectly fine, I always diff-check them against base so there is little risk to overwrite some change.

I don't care about being a 'cool kid'; I just want something that works for me ;)


Exactly my thought, I can live with 4 commands two clicks away from my desktop, no need to make my life more complex that it already is.

Giovanni

Thargon
Posts: 114
Joined: Wed Feb 04, 2015 5:03 pm
Location: CITEC, Bielefeld University, germany
Has thanked: 12 times
Been thanked: 21 times
Contact:

Re: [INFO] Suggestions for submitting patches

Postby Thargon » Wed Nov 22, 2017 5:55 pm

Hi,
could you please add your preferred way how users should submit patches to the nice list of your original post?

PS: I prefer Git and feel somewhat discriminated :P

User avatar
Giovanni
Site Admin
Posts: 13085
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 759 times
Been thanked: 637 times
Contact:

Re: [INFO] Suggestions for submitting patches

Postby Giovanni » Thu Nov 23, 2017 8:53 am

Hi

I added a small not about where to post.

About git, you may open a new topic in Development to make your point but my I reached my conclusions a while ago.

Giovanni

Thargon
Posts: 114
Joined: Wed Feb 04, 2015 5:03 pm
Location: CITEC, Bielefeld University, germany
Has thanked: 12 times
Been thanked: 21 times
Contact:

Re: [INFO] Suggestions for submitting patches

Postby Thargon » Thu Nov 23, 2017 10:14 am

Giovanni wrote:I added a small not about where to post.

Thanks!

Giovanni wrote:About git, you may open a new topic in Development to make your point but my I reached my conclusions a while ago.

I was just joking ;) I know there have been many discussions and I am completely fine as long as the Git mirror at Github exists (although it does not mirror all branches for some reason...).

tridge
Posts: 130
Joined: Mon Sep 25, 2017 8:27 am
Has thanked: 8 times
Been thanked: 18 times
Contact:

Re: [INFO] Suggestions for submitting patches

Postby tridge » Sat Jun 09, 2018 2:16 am

Hi Giovanni,
What is the preferred file name extension and patch format for submitting patches? I presume you want a unidiff?
I tried *.patch and *.txt but both are rejected as extensions in attachments. Is there a plain text format that is accepted? Or do you want them zipped?
Cheers, Tridge


Return to “Small Change Requests”

Who is online

Users browsing this forum: No registered users and 2 guests