Sign in Join
Wiki copytemporary

How To Help Developing Lazarus: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
1+## Contents
2+
3+ * 1 Prerequisites to developing Lazarus
4+ * 2 Development areas
5+ * 2.1 Known bugs
6+ * 2.2 Documentation
7+ * 2.3 IDE
8+ * 2.4 Widgetsets ("interfaces")
9+ * 3 How to submit your changes?
10+ * 4 Dealing with regressions
11+ * 4.1 Automate searching for regression errors
12+ * 4.1.1 SubVersion
13+ * 4.1.2 Git mirrors
14+ * 5 Need more help?
15+ * 6 See also
16+
117## Prerequisites to developing Lazarus
218
3-There are two things to note:
19+There are two things to note:
420
5-- You should have the latest release of the Free Pascal compiler (FPC) **or** a more recent GIT version of it (ie development version). For obtaining FPC, see [Free Pascal download](http://www.freepascal.org/download.var) for the latest release version **or** [[Installing the Free Pascal Compiler]] for building a development version from source.
21+ * You should have the latest release of the Free Pascal compiler (FPC) **or** a more recent GIT version of it (ie development version). For obtaining FPC, see [Free Pascal download](<http://www.freepascal.org/download.var>) for the latest release version **or** [[Installing the Free Pascal Compiler]] for building a development version from source.
622
7-- You **must** have the very latest Lazarus development version from the GIT repository. For obtaining the latest version, see [[Getting Lazarus|Getting Lazarus from the GitLab server]].
23+ * You **must** have the very latest Lazarus development version from the GIT repository. For obtaining the latest version, see [[Getting Lazarus|Getting Lazarus from the GitLab server]].
824
925## Development areas
1026
11-So now you have the latest version of Lazarus and wish to start improving it, but are asking yourself "where do I begin?" Well, that depends.
27+So now you have the latest version of Lazarus and wish to start improving it, but are asking yourself "where do I begin?" Well, that depends.
1228
1329### Known bugs
1430
15-If you don't have any particular woes about Lazarus but just want to help, then I would recommend looking at the bug list [Bug Tracker](http://bugs.freepascal.org/set_project.php?project_id=1) find a bug that you think you can fix, and start hacking. Additional information on submitting bug reports and using the bug tracker can be found at [[How do I create a bug report]].
31+If you don't have any particular woes about Lazarus but just want to help, then I would recommend looking at the bug list [Bug Tracker](<http://bugs.freepascal.org/set_project.php?project_id=1>) find a bug that you think you can fix, and start hacking. Additional information on submitting bug reports and using the bug tracker can be found at [[How do I create a bug report]].
1632
1733### Documentation
1834
19-Lazarus needs more documentation! If you don't want to fix a bug you can help by writing documentation. Even this page is a work in progress. If you have useful information to add, or if you see mistakes, please feel free to improve the contents of this page.
35+Lazarus needs more documentation! If you don't want to fix a bug you can help by writing documentation. Even this page is a work in progress. If you have useful information to add, or if you see mistakes, please feel free to improve the contents of this page.
2036
21-Look at [[Lazarus Documentation Editor]] and [[LCL Documentation Roadmap]] for some help on how to and a list of units to be documented.
37+Look at [[Lazarus Documentation Editor]] and [[LCL Documentation Roadmap]] for some help on how to and a list of units to be documented.
2238
23-The on-line IDE help is gradually being created as a part of the wiki. Recently a lot of stub pages of the [[Lazarus IDE]] documentation about the IDE windows have been added. When working in IDE, if you need help, press F1. You will be presented a help wiki page (possibly empty or incomplete). Improve it, if you have the relevant knowledge.
39+The on-line IDE help is gradually being created as a part of the wiki. Recently a lot of stub pages of the [[Lazarus IDE]] documentation about the IDE windows have been added. When working in IDE, if you need help, press F1. You will be presented a help wiki page (possibly empty or incomplete). Improve it, if you have the relevant knowledge.
2440
2541### IDE
2642
27-See these link: [[Extending the IDE]].
43+See these link: [[Extending the IDE]].
2844
2945### Widgetsets ("interfaces")
3046
31-A [[Widgetset|widgetset]] (WS) is the "glue code" between the LCL code parts that are independent of the target operating system and the target operating system itself. For each supported target OS, the corresponding WS units are to be found in one of the subdirectories under the C:\Lazarus\lcl\interfaces\\.
47+A [[Widgetset|widgetset]] (WS) is the "glue code" between the LCL code parts that are independent of the target operating system and the target operating system itself. For each supported target OS, the corresponding WS units are to be found in one of the subdirectories under the C:\Lazarus\lcl\interfaces\\.
3248
33-Here is an outline of the steps one should follow, in order to improve a widgetset (description provided by Mattias Gärtner on the Lazarus mailing list on 2006-07-15). When making changes to a WS, it is not necessary to rebuild everything (Lazarus including the IDE), in order to test the efects of the changes. Proceed as follows:\
49+Here is an outline of the steps one should follow, in order to improve a widgetset (description provided by Mattias Gärtner on the Lazarus mailing list on 2006-07-15). When making changes to a WS, it is not necessary to rebuild everything (Lazarus including the IDE), in order to test the efects of the changes. Proceed as follows:
3450
35-`* Create your testbed project (a small program`\
36-`  which should contain the testing code for your WS changes);`\
37-`* Setup the keyboard shortcuts for 'Build Lazarus' and 'Configure Build Lazarus' `\
38-`  (in IDE, go to Editor Options/Keymapping);`\
39-<u>**`repeat`**</u>\
40-` * build your application (this will re-build the WS you altered, and will re-build the LCL);`\
41-` `<u>**`repeat`**</u>\
42-`  * Make your improvement in the WS code;`\
43-`  * Build Lazarus (in IDE, go to Tools/Build Lazarus `\
44-`    - this only rebuilds the LCL, which rebuilds also the selected WS);`\
45-`  * Now compile your testbed project;`\
46-`  * Run and debug your program;`\
47-` `<u>**`until`**</u>` no errors are found in your change;`\
48-` * Reconfigure "Build Lazarus" to build all `\
49-`   (in IDE, go again to Tools/Configure "Build Lazarus");`\
50-` * Build Lazarus and test the IDE;`\
51-<u>**`until`**</u>` no errors/degradation due to your changes are found in IDE;`\
52-`* Create a patch and send it (see further below for details).`
51+```
52+* Create your testbed project (a small program
53+ which should contain the testing code for your WS changes);
54+ * Setup the keyboard shortcuts for 'Build Lazarus' and 'Configure Build Lazarus'
55+ (in IDE, go to Editor Options/Keymapping);
56+ _**repeat**_
57+ * build your application (this will re-build the WS you altered, and will re-build the LCL);
58+ _**repeat**_
59+ * Make your improvement in the WS code;
60+ * Build Lazarus (in IDE, go to Tools/Build Lazarus
61+ - this only rebuilds the LCL, which rebuilds also the selected WS);
62+ * Now compile your testbed project;
63+ * Run and debug your program;
64+ _**until**_ no errors are found in your change;
65+ * Reconfigure "Build Lazarus" to build all
66+ (in IDE, go again to Tools/Configure "Build Lazarus");
67+ * Build Lazarus and test the IDE;
68+ _**until**_ no errors/degradation due to your changes are found in IDE;
69+ * Create a patch and send it (see further below for details).
70+```
5371
5472## How to submit your changes?
5573
56-You will need to make a "patch" (see [[Creating A Patch]]). The preferred way of submitting the patch to the Lazarus developers is to create an issue in the bug tracker and attach the patch to it.
74+You will need to make a "patch" (see [[Creating A Patch]]). The preferred way of submitting the patch to the Lazarus developers is to create an issue in the bug tracker and attach the patch to it.
5775
5876## Dealing with regressions
5977
60-From time to time changes in the Lazarus source code might cause features which worked before to stop working. In a case where there is no clue as to what caused the break it may be useful to do an iteration method to determine exactly which revision caused the problem.
61-
62-This process is simple, although somewhat time consuming:
78+From time to time changes in the Lazarus source code might cause features which worked before to stop working. In a case where there is no clue as to what caused the break it may be useful to do an iteration method to determine exactly which revision caused the problem.
6379
64-Suppose it works with rev 1000 and not with 5000. Then test with 3000. Testing requires updating the svn code, rebuilding the LCL for the desired widgetset, rebuilding a test application which uses the feature and testing this application. If it works, repeat with 3000 and 5000 as extremes. If not, use 1000 and 3000 as extremes.
80+This process is simple, although somewhat time consuming:
6581
66-After some time you should be able to isolate which revision broke it. This information makes fixing the problem much easier, so we encourage people helping to develop Lazarus to try this process and post this information in bug reports in case there are any regressions with no clear clue of what went wrong.
82+Suppose it works with rev 1000 and not with 5000. Then test with 3000. Testing requires updating the svn code, rebuilding the LCL for the desired widgetset, rebuilding a test application which uses the feature and testing this application. If it works, repeat with 3000 and 5000 as extremes. If not, use 1000 and 3000 as extremes.
6783
68-To check to which data each revision corresponds, one can use the [Lazarus svn browser (ViewVC)](http://svn.freepascal.org/cgi-bin/viewvc.cgi/?root=lazarus). After the interval of revisions has been reduced to a relatively small number, like 25 or so, it may be quicker to check the revisions with ViewVC and check which are possible candidates for the break, to speed up the final part.
84+After some time you should be able to isolate which revision broke it. This information makes fixing the problem much easier, so we encourage people helping to develop Lazarus to try this process and post this information in bug reports in case there are any regressions with no clear clue of what went wrong.
6985
70-One can obtain a particular revision using the command:
86+To check to which data each revision corresponds, one can use the [Lazarus svn browser (ViewVC)](<http://svn.freepascal.org/cgi-bin/viewvc.cgi/?root=lazarus>). After the interval of revisions has been reduced to a relatively small number, like 25 or so, it may be quicker to check the revisions with ViewVC and check which are possible candidates for the break, to speed up the final part.
7187
72-`svn update -r <revision number>`
88+One can obtain a particular revision using the command:
89+```
90+svn update -r <revision number>
91+```
7392
74-**A word of caution.** If you have a slow and unreliable internet connection (like modem dial-up or 3G) and limited bandwidth, then checking out various revisions from SubVersion is a slow and costly process. Every revision you checkout has to be downloaded from the internet.
93+**A word of caution.** If you have a slow and unreliable internet connection (like modem dial-up or 3G) and limited bandwidth, then checking out various revisions from SubVersion is a slow and costly process. Every revision you checkout has to be downloaded from the internet.
7594
76-This issue is completely eliminated if you use Git, because the whole repository history is local on your computer. So you can checkout any older revisions without needing an internet connection and checkouts are instant.
95+This issue is completely eliminated if you use Git, because the whole repository history is local on your computer. So you can checkout any older revisions without needing an internet connection and checkouts are instant.
7796
7897### Automate searching for regression errors
7998
8099#### SubVersion
81100
82-Florian wrote a small Unix script which can help automate the process of finding a regression error. The script is called [searchrev](http://svn.freepascal.org/cgi-bin/viewvc.cgi/scripts/florian/unix/searchrev?view=markup&root=fpcbuild).
101+Florian wrote a small Unix script which can help automate the process of finding a regression error. The script is called [searchrev](<http://svn.freepascal.org/cgi-bin/viewvc.cgi/scripts/florian/unix/searchrev?view=markup&root=fpcbuild>).
83102
84-There are command-line tools inspired by "git-bisect". A Unix shell script can be found in Debian-based Linux distributions as part of *subversion-tools* package. A Perl-based version can be found in some other Linux distributions (eg. SuSE, Fedora, CentOS) as *svn-bisect* package or [here](https://github.com/Infinoid/svn-bisect).
103+There are command-line tools inspired by "git-bisect". A Unix shell script can be found in Debian-based Linux distributions as part of _subversion-tools_ package. A Perl-based version can be found in some other Linux distributions (eg. SuSE, Fedora, CentOS) as _svn-bisect_ package or [here](<https://github.com/Infinoid/svn-bisect>).
85104
86105#### Git mirrors
87106
88-Git includes a command called *bisect* which helps with finding regression bugs. It also has built-in support for automated testing. You need to create a small testcase and let Git use that testcase to determine if a revision is buggy or not. So with the automated bisecting, regression bugs can be found in seconds. For more information on the *git bisect* command, see the [Git User Manual](http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#using-bisect).
107+Git includes a command called _bisect_ which helps with finding regression bugs. It also has built-in support for automated testing. You need to create a small testcase and let Git use that testcase to determine if a revision is buggy or not. So with the automated bisecting, regression bugs can be found in seconds. For more information on the _git bisect_ command, see the [Git User Manual](<http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#using-bisect>).
89108
90109## Need more help?
91110
92-If you have any question you can ask them on one of the following places:
111+If you have any question you can ask them on one of the following places:
93112
94-- The Free Pascal mailing lists: [<http://www.freepascal.org/maillist.var>](http://www.freepascal.org/maillist.var)
95-- The Lazarus Mailing lists [<http://lists.lazarus.freepascal.org/mailman/listinfo>](http://lists.lazarus.freepascal.org/mailman/listinfo)
96-- The [Lazarus Forum](http://forum.lazarus.freepascal.org)
97-- The [Lazarus Developer's blog](http://lazarus-dev.blogspot.de)
113+ * The Free Pascal mailing lists: <http://www.freepascal.org/maillist.var>
114+ * The Lazarus Mailing lists <http://lists.lazarus.freepascal.org/mailman/listinfo>
115+ * The [Lazarus Forum](<http://forum.lazarus.freepascal.org>)
116+ * The [Lazarus Developer's blog](<http://lazarus-dev.blogspot.de>)
98117
99118## See also
100119
101-- [[Creating A Patch]] If you have modified the source code to implement a solution, this article helps you to add it to your bug report in the most efficient way, so that developers can add it to the main code as fast as possible
102-- [[Database bug reporting]] Specific info and sample programs for database bugs
103-- [[How do I create a bug report]] general information on submitting bugs, what should be covered in a bug report, and using the bug tracker.
104-- [[Moderating the bug tracker]]
105-- [[Lazarus Development Process]]
120+ * [[Creating A Patch]] If you have modified the source code to implement a solution, this article helps you to add it to your bug report in the most efficient way, so that developers can add it to the main code as fast as possible
121+ * [[Database bug reporting]] Specific info and sample programs for database bugs
122+ * [[How do I create a bug report]] general information on submitting bugs, what should be covered in a bug report, and using the bug tracker.
123+ * [[Moderating the bug tracker]]
124+ * [[Lazarus Development Process]]
106125
107126---
108-*From the Free Pascal wiki, page "How To Help Developing Lazarus", as it stood on 2023-04-19 after a change by Xhajt03, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
109-Category: Community
110-Category: Debugging
111-Category: FPC Issues
112-Category: Lazarus
127+*From the Free Pascal wiki, page "How To Help Developing Lazarus", as the Internet Archive kept it on 2024-09-10. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history