Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Tycho/Contributor Guide"

(Commit Message Guidelines: commit message should have "Bug: <number>" line; link to example commit which has this (TODO replace by a more interesting commit))
(Commit Message Guidelines)
(7 intermediate revisions by 3 users not shown)
Line 9: Line 9:
 
The technical basics (how to get the sources, how to import and build, etc.) are described here: [[Developing Tycho]] .
 
The technical basics (how to get the sources, how to import and build, etc.) are described here: [[Developing Tycho]] .
  
If the patch is not trivial, make sure you include a test case that reproduces the bug or proves that the enhancement works.
+
Unless the patch is really trivial, make sure you include at least one test case that reproduces the bug or proves that the enhancement works.
 +
 
 +
Note that if '''you don't provide any tests, we will not take the contribution'''.
  
 
=== Writing Tests ===
 
=== Writing Tests ===
Line 25: Line 27:
 
* Add one blank line, followed by more details about the change. This could include a motivation for the change and/or reasons why things were done in the particular way they are done in the change.
 
* Add one blank line, followed by more details about the change. This could include a motivation for the change and/or reasons why things were done in the particular way they are done in the change.
 
* Add "Bug: <bug number>" in the footer.
 
* Add "Bug: <bug number>" in the footer.
 +
* Add "Signed-off-by: <your_email_adress>" in the footer (see "Legal Paperwork" below).
  
 
See here for an [http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/commit/?id=52ca41640484f108cae9fcaadb1c105e686dd985 example commit message]
 
See here for an [http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/commit/?id=52ca41640484f108cae9fcaadb1c105e686dd985 example commit message]
Line 34: Line 37:
  
 
== Contributing the Patch ==
 
== Contributing the Patch ==
 +
 +
=== Legal Paperwork ===
 +
 +
Before your contribution can be accepted by the project, you need to create and
 +
electronically sign the Eclipse Foundation Contributor License Agreement (CLA) and sign
 +
off on the Eclipse Foundation Certificate of Origin.
 +
 +
Follow the instructions on [[Development_Resources/Handling Git Contributions]]
 +
 +
In general, also see [[Development Resources#Users: Contributing To A Project]].
  
 
=== Using Gerrit ===
 
=== Using Gerrit ===
Line 40: Line 53:
  
 
In order to propose a change to Tycho
 
In order to propose a change to Tycho
* Configure the repository URL <tt>https:</tt><tt>//git.eclipse.org/r/p/tycho/org.eclipse.tycho.git</tt> for the remote "origin"
+
* Configure the repository URL <tt>https:</tt><tt>//git.eclipse.org/r/tycho/org.eclipse.tycho.git</tt> for the remote "origin"
 
* Know your [https://git.eclipse.org/r/#/settings/http-password Gerrit HTTPS user name and password]
 
* Know your [https://git.eclipse.org/r/#/settings/http-password Gerrit HTTPS user name and password]
 
* Push to the special code review branch "refs/for/master", e.g. with <tt>git push origin HEAD:refs/for/master</tt>
 
* Push to the special code review branch "refs/for/master", e.g. with <tt>git push origin HEAD:refs/for/master</tt>
  
 
For more information on the Eclipse Gerrit instance (e.g. how to push via SSH), see here: [[Gerrit]].
 
For more information on the Eclipse Gerrit instance (e.g. how to push via SSH), see here: [[Gerrit]].
 +
 +
Note that prototypes and other incomplete work should be pushed to the refs/for/master/POC branch so committers know the nature of the changed being pushed.
  
 
=== Using Bugzilla ===
 
=== Using Bugzilla ===
  
 
Attach the patch(es) to the bug/enhancement in Bugzilla. The patch should be in the format produced by <tt>git format-patch</tt>, so that it is suitable for <tt>git am</tt>.
 
Attach the patch(es) to the bug/enhancement in Bugzilla. The patch should be in the format produced by <tt>git format-patch</tt>, so that it is suitable for <tt>git am</tt>.
 
=== Legal Paperwork ===
 
 
With the contribution, you will have to include answers to the following questions (e.g. as comment in Gerrit or Bugzilla):
 
 
# Did you author 100% of the content you are contributing?
 
# Who owns the copyright of the contributed content? (This is typically your employer.)
 
# Is the contributed code licensed under the EPL? (You should answer this question by putting a [http://www.eclipse.org/legal/copyrightandlicensenotice.php copyright and license header] into every new java file.)
 
# Do you have the right to contribute the content to Eclipse? (You need to confirm this with the copyright owner.)
 
 
With these questions answered, we will be able to accept small patches (<250 LoC) immediately. For larger patches, we will also have to create a contribution questionnaire for review by the Eclipse IP team, but this usually doesn't require additional actions from you.
 
 
In general, also see [[Development Resources#Users: Contributing To A Project]].
 
  
  
 
[[Category:Tycho|Contributor Guide]]
 
[[Category:Tycho|Contributor Guide]]

Revision as of 04:20, 1 July 2013

Starting a Contribution

Before starting to develop an enhancement or fix for Tycho, it is important that you get in touch with the project. We track ideas for enhancements and bug reports in the Eclipse Bugzilla, so this is a good place to present your ideas for a patch and to make sure it's going in the right direction.

If you want to do an enhancement but don't know where to start, you can also just ask on tycho-dev@eclipse.org.

Developing Patches for Tycho

The technical basics (how to get the sources, how to import and build, etc.) are described here: Developing Tycho .

Unless the patch is really trivial, make sure you include at least one test case that reproduces the bug or proves that the enhancement works.

Note that if you don't provide any tests, we will not take the contribution.

Writing Tests

Tycho has two types of tests: unit tests (locally in each module) and a global integration test suite in module tycho-its.

Unit tests are preferred if possible because they are in general much faster and better targeted at the functionality under test. Integration tests generally invoke a forked maven build on a sample project (stored under projects/) and then do some assertions on the build output.

See an example for a unit test and an integration test.

Commit Message Guidelines

  • Start with the bug number the change is related to; don't add "bug" or puctuation marks
  • Also in the first line, provide a clear and concise description of the change
  • Add one blank line, followed by more details about the change. This could include a motivation for the change and/or reasons why things were done in the particular way they are done in the change.
  • Add "Bug: <bug number>" in the footer.
  • Add "Signed-off-by: <your_email_adress>" in the footer (see "Legal Paperwork" below).

See here for an example commit message

Commit Granularity

  • Make small commits, yet self-contained commits. This makes them easy to review.
  • Do not mix concerns in commits: have a commit do a single thing. This makes them reviewable 'in isolation'. This is particularly important if you need to do refactorings to the existing code: Refactorings tend to lead to large diffs which are difficult to review. Therefore make sure to have separate commits for refactorings and for functional changes.

Contributing the Patch

Legal Paperwork

Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA) and sign off on the Eclipse Foundation Certificate of Origin.

Follow the instructions on Development_Resources/Handling Git Contributions

In general, also see Development Resources#Users: Contributing To A Project.

Using Gerrit

The Eclipse Gerrit is the preferred way to propose patches to Tycho. Everyone with an Eclipse Bugzilla login can propose patches.

In order to propose a change to Tycho

  • Configure the repository URL https://git.eclipse.org/r/tycho/org.eclipse.tycho.git for the remote "origin"
  • Know your Gerrit HTTPS user name and password
  • Push to the special code review branch "refs/for/master", e.g. with git push origin HEAD:refs/for/master

For more information on the Eclipse Gerrit instance (e.g. how to push via SSH), see here: Gerrit.

Note that prototypes and other incomplete work should be pushed to the refs/for/master/POC branch so committers know the nature of the changed being pushed.

Using Bugzilla

Attach the patch(es) to the bug/enhancement in Bugzilla. The patch should be in the format produced by git format-patch, so that it is suitable for git am.

Back to the top