Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2022-11

Lazarus IDE 'testall' program

7 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Aruna Hewapathirane

Hello Everyone,

I recently came across this in the Free Pascal and Lazarus Wiki.

"Try running the 'testall' program to see a menu of the available

components together with small example test forms for most of them; then inspect the code to find out how they work!"

The testall.lpi works fine under Windows but not so well under Linux. I got multiple errors in Linux (Debian).
I asked for help on the Lazarus Forum and the conversation history is here <https://forum.lazarus.freepascal.org/index.php/topic,61327.0.html>.

I wanted to make things work under Linux and thought let me clone the git repo and see what I may be able to do.

I found one repository on Gitlab:
https://gitlab.com/freepascal.org/lazarus/lazarus/-/tree/main/examples

And another repository on Sourceforge:
https://sourceforge.net/p/lazarus/laz.git/ci/main/tree/examples/

And now comes the interesting part, neither repository has a file called "testall" which was very confusing to me.
So I checked and then double-checked under the examples folder in both repositories and found nothing again.

Does anyone know why "testall" is not there in both Lazarus repositories? And where is the repo that contains
"testall" please? And which repo do I use when I want to submit a patch or fix?

Thanks - Aruna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20221124/97e2ef96/attachment.htm>

Reply by email

Martin Frb
to Aruna Hewapathirane
Aruna Hewapathirane wrote 8 lines

The correct repo is the one on Gitlab. The sourceforge is a mirror (run by the team). There also is a mirror on Github.

Show quoted text 11 lines
And now comes the interesting part, neither repository has a file called "testall" which was very confusing to me. So I checked and then double-checked under the examples folder in both repositories and found nothing again. Does anyone know why "testall" is not there in both Lazarus repositories? And where is the repo that contains "testall" please? And which repo do I use when I want to submit a patch or fix?

The "testall" exists in the "fixes_2_2" branch. (Which is used for current releases).

In the "main" branch the example folder was re-ordered. During this process the "testall" appears to have been removed. Not sure of the reasons...
Maybe oversight, maybe because it did not work. If the latter, then likely a working version can be re-added. I did sent a query to the person behind the change, hopefully he can shine some light on this.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20221124/05d7f0ae/attachment.htm>

Reply by email

Aruna Hewapathirane
to Martin Frb

On Thu, Nov 24, 2022 at 7:16 AM Martin Frb via lazarus <

Show quoted text 15 lines
wrote: On 24/11/2022 12:53, Aruna Hewapathirane via lazarus wrote: I found one repository on Gitlab: https://gitlab.com/freepascal.org/lazarus/lazarus/-/tree/main/examples And another repository on Sourceforge: https://sourceforge.net/p/lazarus/laz.git/ci/main/tree/examples/ The correct repo is the one on Gitlab. The sourceforge is a mirror (run by the team). There also is a mirror on Github.

Ah... thank you for the clarification. So any fix'es I have to push to Gitlab then?

Show quoted text 16 lines
And now comes the interesting part, neither repository has a file called "testall" which was very confusing to me. So I checked and then double-checked under the examples folder in both repositories and found nothing again. Does anyone know why "testall" is not there in both Lazarus repositories? And where is the repo that contains "testall" please? And which repo do I use when I want to submit a patch or fix? The "testall" exists in the "fixes_2_2" branch. (Which is used for current releases).

Thank you again I just checked out fixes_2_2 branch and yes "testall" and other friends are all there :_)

Show quoted text 5 lines
In the "main" branch the example folder was re-ordered. During this process the "testall" appears to have been removed. Not sure of the reasons...

Oh-kay that explains why I was unable to find it and am sure the reasons were all good and valid :-)

Maybe oversight, maybe because it did not work. If the latter, then likely

a working version can be re-added.

Umm... well "testall" works on Windows I had zero issues but needs a few fixes when running under Linux. I have manged to get it to work on my Debian system now.

I did sent a query to the person behind the change, hopefully he can shine some light on this.

Thank you for following up and I just want to say the 'documentation' is of a quality I have never seen anywhere before. Extremely thorough and to the point so if someone removed "testall" I am sure there were valid reasons. It just 'spooked' me when I simply
could not find it in the repo. I never thought to look in other branches....

Much obliged for clearing this up Martin. Thank you!

Aruna

Show quoted text 8 lines
-- _______________________________________________ lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20221124/93b19823/attachment.htm>

Reply by email

Martin Frb
to Aruna Hewapathirane
Aruna Hewapathirane wrote 19 lines
On Thu, Nov 24, 2022 at 7:16 AM Martin Frb via lazarus wrote: On 24/11/2022 12:53, Aruna Hewapathirane via lazarus wrote: > > I found one repository on Gitlab: > https://gitlab.com/freepascal.org/lazarus/lazarus/-/tree/main/examples > <https://gitlab.com/freepascal.org/lazarus/lazarus/-/tree/main/examples> > > And another repository on Sourceforge: > https://sourceforge.net/p/lazarus/laz.git/ci/main/tree/examples/ > <https://sourceforge.net/p/lazarus/laz.git/ci/main/tree/examples/> The correct repo is the one on Gitlab. The sourceforge is a mirror (run by the team). There also is a mirror on Github. Ah...? thank you for the clarification. So any fix'es I have to push to Gitlab then?

- Ideally as a "merge request" on Gitlab. (Fork, push to your fork, create merge-request)
- However Patches are accepted too.
- And some developers may accept pull requests (in which case your fork can be on any public accessible git).
? "some developers" => That is, if you interactively deal with a member of the team, who told you they would be the one to accept your changes.

Any change should ideally be against the "main" branch. So in this case, that would be reintroducing the files.

If you plan any "larger" work, best to query (as actually - by coincidence - you do in this mail) if it would be accepted (or what implementation requirements their might be).
Ideally you will get response from some developer, who confirms that they will accept and merge/apply your changes.

Show quoted text 15 lines
In the "main" branch the example folder was re-ordered. During this process the "testall" appears to have been removed. Not sure of the reasons... Oh-kay that explains why I was unable to find it and am sure the reasons were all good and valid :-) Maybe oversight, maybe because it did not work. If the latter, then likely a working version can be re-added. Umm... well "testall" works on Windows I had zero issues but needs a few fixes when running under Linux. I have manged to get it to work on my Debian system now.

If you plan to work on it, I would suggest to wait a day or two, for further details on this to emerge.
If it was removed because it did not work cross platform, then re-adding after fixing should be ok.

Maybe there were other reasons. Maybe it would be better to break it into a small number of projects, each dealing with a subset of the components.
A "all in one" might make it very hard to read and understand the code for a specific component.

If you look at the examples (and the IDE menu Tools > "Example projects" (in Lazarus 2.3), then you will find that many components have there own examples already.
Repeating them, may not make much sense (unless for example to have all buttons in one project, with settings/code explicitly showing their differences).

Of course, depending on the course of action, the wiki may need updates (it still is correct for the current release, but it wont be for 2.4 / and it might easily be overlooked when the time comes) -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20221124/d0119eb4/attachment-0001.htm>

Reply by email

Juha Manninen
to Aruna Hewapathirane: On Thu, Nov 24, 2022 at 7:16 AM Martin Frb via lazarus < Ah... thank you for the…

On Thu, Nov 24, 2022 at 3:00 PM Aruna Hewapathirane via lazarus <

Show quoted text 13 lines
wrote: On Thu, Nov 24, 2022 at 7:16 AM Martin Frb via lazarus < > wrote: > In the "main" branch the example folder was re-ordered. During this > process the "testall" appears to have been removed. Not sure of the > reasons... > Oh-kay that explains why I was unable to find it and am sure the reasons were all good and valid :-)

There may be a valid reason or there may be a mistake. Let's see. I committed to changes to example project management made by David Bannon. I did not notice the removal of "testall". I sent a message to David. We will figure it out.

Regards,
Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20221124/3a840f13/attachment.htm>

Reply by email

Aruna Hewapathirane
to Martin Frb: - Ideally as a "merge request" on Gitlab. (Fork, push to your fork, create merge-request)…

<snip>

Show quoted text 12 lines
Ah... thank you for the clarification. So any fix'es I have to push to Gitlab then? - Ideally as a "merge request" on Gitlab. (Fork, push to your fork, create merge-request) - However Patches are accepted too. - And some developers may accept pull requests (in which case your fork can be on any public accessible git). "some developers" => That is, if you interactively deal with a member of the team, who told you they would be the one to accept your changes.

Sounds good to me.

Any change should ideally be against the "main" branch. So in this case, that would be reintroducing the files.

Understood!

Show quoted text 7 lines
If you plan any "larger" work, best to query (as actually - by coincidence - you do in this mail) if it would be accepted (or what implementation requirements their might be). Ideally you will get response from some developer, who confirms that they will accept and merge/apply your changes.

Let's just say every time I use the Lazarus IDE or FPC or whenever I go through the documentation the more humbled I become and I think about the amount of time+thought and work that has gone into this the more I start to feel the need to be part of this and contribute within my limited skill sets. So yes the plan is to first teach myself how things work then get myself comfortable with doing Voodoo magic like ASerge did in the Lazarus forum when I asked a noob question. This is worth having a look at actually: Voodoo Magic by ASerge
<https://forum.lazarus.freepascal.org/index.php/topic,61315.msg461061.html#msg461061> look for Reply #1, please. Hopefully, someday I will actually understand what ASerge did.

Show quoted text 23 lines
> In the "main" branch the example folder was re-ordered. During this > process the "testall" appears to have been removed. Not sure of the > reasons... > Oh-kay that explains why I was unable to find it and am sure the reasons were all good and valid :-) Maybe oversight, maybe because it did not work. If the latter, then likely > a working version can be re-added. > Umm... well "testall" works on Windows I had zero issues but needs a few fixes when running under Linux. I have manged to get it to work on my Debian system now. If you plan to work on it, I would suggest to wait a day or two, for further details on this to emerge. If it was removed because it did not work cross platform, then re-adding after fixing should be ok.

I just have to find a way to test in code if we are running on Windows or Linux then change the 'path' accordingly;y and we are good to go. That was one of the
reasons "testall" did not work on Linux.

Show quoted text 6 lines
Maybe there were other reasons. Maybe it would be better to break it into a small number of projects, each dealing with a subset of the components. A "all in one" might make it very hard to read and understand the code for a specific component.

This is very true. I went through the "testall" code and it took me quite a while and a lot of asking around on the forum and irc and doing my own research to begin to start to
understand what is going on :-)

It is definitely not something a beginner/noob will understand or have fun trying to analyze why things are working when there is zilch in the Form. It's good for folks coming in with 'experience' and who have years of some type of coding background then they will appreciate the possibilities and freedom and the power of Lazarus+Free Pascal but to a total newbie, this is throwing him/her in the deep end of the pool with no life jacket :-)

When one does not understand what has been done or why a piece of code works the way it does it can soon lead to frustration which in turn usually turns folks away and
we lose good people who may have turned out to be very competent and capable programmers or analysts or simply people who could have contributed to the code and make
things better? It would be a very different story if the source to "testall" was "heavily" commented at each line then life becomes easier. This is my personal opinion and thoughts and
others may feel differently. When one is an experienced programmer sometimes we forget what is obvious to us in teh code may not necessarily be so to a newbie? That is why
commenting the code helps. Again my thoughts alone.

One of the primary reasons I love Lazarus and FPC is the community support. It is usually very fast/rapid and usually comes with a concrete-tested sample of code. I have never
experienced this in other coding communities so this is a very welcome and long prayed-for and wished-for thing. It empowers you and makes you want to be part of the larger
project in any small way.

Show quoted text 5 lines
If you look at the examples (and the IDE menu Tools > "Example projects" (in Lazarus 2.3), then you will find that many components have there own examples already.

Repeating them, may not make much sense (unless for example to have all

buttons in one project, with settings/code explicitly showing their differences).

I have actually started building my own set of demos. A side effect of trying to learn and teach myself Lazarus+FPC if anyone wants to have a look I would be happy to share.
Who knows, some of them may actually be useful.

Show quoted text 5 lines
Of course, depending on the course of action, the wiki may need updates (it still is correct for the current release, but it wont be for 2.4 / and it might easily be overlooked when the time comes)

Understood again and thank you very much for your time and help Martin.

Talk again soon, Aruna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20221124/ead44826/attachment.htm>

Reply by email

Aruna Hewapathirane
to Juha Manninen: On Thu, Nov 24, 2022 at 3:00 PM Aruna Hewapathirane via lazarus < There may be a valid…

On Thu, Nov 24, 2022 at 12:53 PM Juha Manninen via lazarus <

Show quoted text 19 lines
wrote: On Thu, Nov 24, 2022 at 3:00 PM Aruna Hewapathirane via lazarus < > wrote: > On Thu, Nov 24, 2022 at 7:16 AM Martin Frb via lazarus < > > wrote: > >> In the "main" branch the example folder was re-ordered. During this >> process the "testall" appears to have been removed. Not sure of the >> reasons... >> > > Oh-kay that explains why I was unable to find it and am sure the reasons > were all good and valid :-) > There may be a valid reason or there may be a mistake. Let's see.

Well sometimes these things happen for a reason. Gives people like me a chance to get involved :-)

I committed to changes to example project management made by David Bannon.

I did not notice the removal of "testall". I sent a message to David. We will figure it out.

Hi Juha, it is not just "testall" that was removed there are other files you may want to consider adding back.
Here is a file-list <https://paste.debian.net/1261741/>of what was originally under the Examples folder. The files are at the bottom the folders at the top.

Show quoted text 10 lines
Regards, Juha -- _______________________________________________ lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20221124/b2785c89/attachment-0001.htm>

Reply by email