Re: [Lazarus] Lazarus IDE 'testall' program

2022-11-24 Thread Aruna Hewapathirane via lazarus
On Thu, Nov 24, 2022 at 12:53 PM Juha Manninen via lazarus <
lazarus@lists.lazarus-ide.org> wrote:

> On Thu, Nov 24, 2022 at 3:00 PM Aruna Hewapathirane via lazarus <
> lazarus@lists.lazarus-ide.org> wrote:
>
>> On Thu, Nov 24, 2022 at 7:16 AM Martin Frb via lazarus <
>> lazarus@lists.lazarus-ide.org> 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 of what was
originally under the Examples folder. The files are at the bottom the
folders at the top.


>
> Regards,
> Juha
>
> --
> ___
> lazarus mailing list
> lazarus@lists.lazarus-ide.org
> https://lists.lazarus-ide.org/listinfo/lazarus
>
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus IDE 'testall' program

2022-11-24 Thread Aruna Hewapathirane via lazarus


> 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!

>
> 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

look for Reply #1, please. Hopefully, someday I will actually understand
what ASerge did.

>
>
>> 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.

>
> 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.

>
> 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
> 

Re: [Lazarus] Lazarus IDE 'testall' program

2022-11-24 Thread Juha Manninen via lazarus
On Thu, Nov 24, 2022 at 3:00 PM Aruna Hewapathirane via lazarus <
lazarus@lists.lazarus-ide.org> wrote:

> On Thu, Nov 24, 2022 at 7:16 AM Martin Frb via lazarus <
> lazarus@lists.lazarus-ide.org> 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
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus IDE 'testall' program

2022-11-24 Thread Martin Frb via lazarus

On 24/11/2022 14:00, Aruna Hewapathirane wrote:
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


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?


- 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.




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)
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus IDE 'testall' program

2022-11-24 Thread Aruna Hewapathirane via lazarus
On Thu, Nov 24, 2022 at 7:16 AM Martin Frb via lazarus <
lazarus@lists.lazarus-ide.org> 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?

>
>
> 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 :_)

>
> 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

>
>
> --
> ___
> lazarus mailing list
> lazarus@lists.lazarus-ide.org
> https://lists.lazarus-ide.org/listinfo/lazarus
>
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus IDE 'testall' program

2022-11-24 Thread Martin Frb via lazarus

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.




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.


-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Lazarus IDE 'testall' program

2022-11-24 Thread Aruna Hewapathirane via lazarus
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
.

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
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus