GWT Contributor Workshop

193 visualizaciones

Publicado el

GWTCon 2017 - Florence

Publicado en: Internet
0 comentarios
0 recomendaciones
Estadísticas
Notas
  • Sé el primero en comentar

  • Sé el primero en recomendar esto

Sin descargas
Visualizaciones
Visualizaciones totales
193
En SlideShare
0
De insertados
0
Número de insertados
2
Acciones
Compartido
0
Descargas
7
Comentarios
0
Recomendaciones
0
Insertados 0
No insertados

No hay notas en la diapositiva.

GWT Contributor Workshop

  1. 1. Become a GWT contributor
  2. 2. Introduction - All GWT is under the Apache 2.0 license. - Everybody is welcome to improve it, but must sign a CLA. - You need to be familiar with git
  3. 3. Resources - Users mailing list. - Contributors mailing list. - GWT project site and documentation - Gitter channel - Google+ channel - Stackoverflow QA
  4. 4. Preparation: Gerrit - Check that you already have an account in github: https://github.com/join - Sign in into the GWT gerrit service: https://gwt-review.googlesource.com - Gerrit will use your gmail account
  5. 5. Sign a CLA - It works for both gerrit (gwt) and github (gwt-site) - Click on your name, then click on settings. - Fill everything even your github id
  6. 6. Clone tools, gwt, and gwt-site repos
  7. 7. Architecture of GWT project - Source code: git repository. - Compilation tools: git repository. - Review: gerrit - Continuous integration: Jenkins - Site & Doc: github
  8. 8. Contributing to gwt-site
  9. 9. Google Bot http://gwtproject.org Browser Edit check CLA merge Github Desktop publish Contributing gwt-site markdown user/gwt-site gwtproject/gwt-site discussion fork pull request Continuous Integration Jenkins Discuss WebSite
  10. 10. Google Bot http://gwtproject.org Browser clone/pull/push check CLA project merge Github Desktop publish Contributing gwt-site assets user/gwt-site gwtproject/gwt-site discussion fork pull request Continuous Integration Jenkins Discuss WebSite
  11. 11. How to make the contributions - GWT site uses markdown - Visit the site and click on edit icon - Fork the repo if not already done - Follow github flavored syntax. - You can mix HTML syntax but, do only in the case there is no markdown equivalent - Send a github pull-request - Wait for feedback - Merge
  12. 12. Send the Pull Request 4 clicks 1 2 3 4
  13. 13. - Wait for feedback - Make suggested modifications in github - A contributor will Merge when done - Will be live in gwtproject.org after few minutes Follow github discussions
  14. 14. Contributing to gwt
  15. 15. Central maven repository Git Repository patches Git Repository master Review System Continuous Integration Jenkins Cloned to github Browser clone pull push verify+1 project merge review+2 snapshot Git Repository tools (github) clone Gerrit Desktop IDE Contributing GWT workflow
  16. 16. Setting up git Set your UserName and Email Configure the gerrit commit hook
  17. 17. Setting up git Try your first commit
  18. 18. Setting up git Obtain your HTTP cookie
  19. 19. Setting up git Save your cookie & push your first commit !!!
  20. 20. Contributing to code - You need to be familiar with ‘ant’ - Compile the code - Run checkstyle & tests - Prepare your IDE - Plugins - Formating & checkstyle rules - Import projects in your IDE - Run checkstyle & tests from your IDE
  21. 21. Contributing to code - Check that the issue is in the issues list - Work in a new local branch - Make changes and add Tests - Run tests - Commit & push changes - Make sure git is configured: name, email, hook - Add issue numbers to commit message - Wait for review - amend & rebase until ready - Merge
  22. 22. Using your IDE Choose whatever development environment you are comfortable with. - Eclipse: - Work through the eclipse/README.txt - IntelliJ IDEA: - Style configuration - Gradle build
  23. 23. - Select or create an issue. - It’s recommended that any patch was previously documented in an issue ticket in github - Search for: - status:patcheswelcome or status:accepted - Issue reporting guidelines Contributing, how to start
  24. 24. - Javadoc: classes and public methods. - Class structure and member sorting (relaxed) - Indentation: 2 spaces - Imports: remove unused, follow order - Line length: 100 chars - Meaningful names. Contributing, Style rules
  25. 25. Contributing, how to use ‘ant’ - Check Code Compiles $ ant clean dist-dev [2min] - Check Styles $ ant checkstyle apicheck [3min - 1min] - Check Tests Compile $ ant compile.tests [1min - 15secs] - Run certain Tests $ ( cd dev && ant test ) $ ( cd user && ant test.nongwt )
  26. 26. - Create a new branch $ git checkout -b issue_name - Commit your changes $ git commit -a -m 'Message, Bug: issue nnn' - Push for Review $ git push origin HEAD:refs/drafts/master #push as private draft $ git push origin HEAD:refs/for/master #public ready for review - New changes $ git commit --amend --no-edit -a $ git push origin HEAD:refs/for/master Contributing, how to use ‘git’ Tip: use different branches for different and unrelated changes Tip: push as draft to check your changes in gerrit and not being public yet
  27. 27. Dealing with gerrit - Check your patch in gerrit until it looks ok to you (avoid noise, follow rules) - Assign a reviewer to your patch, check the maintainer list for candidates. - Use gerrit for discussions - Make the proposed changes - Amend the previous commit - Repeat the process until you get a +2 - Merge on master (rebase can be needed) Tip: contribute reviewing other contributors’ patches
  28. 28. Promote draft > review Abandon a Change Add a reviewer Vote a Review Contributing: using ‘gerrit’
  29. 29. Thanks for contributing GWT manolo@vaadin.com

×