I ran git blame examples/testall.lpi and below is what is of interest to us.git blame shows who touched a certain line last. It does not show further history nor the diff of the commits mentioned. For that you need another tool like gitk.
87791326d0d (bart 2016-03-04 15:05:52 +0000 87) <SearchPaths> 87791326d0d (bart 2016-03-04 15:05:52 +0000 88) <IncludeFiles Value="$(ProjOutDir)"/> 5328b9a852b (juha 2019-05-06 11:32:58 +0000 89) <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> 87791326d0d (bart 2016-03-04 15:05:52 +0000 90) </SearchPaths>
In 2019 Juha added <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> this works for windows but does not work for Linux
as seen by the error message below.
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
- <Version Value="10"/>
+ <Version Value="12"/>
<General>
+ <Flags>
+ <CompatibilityMode Value="True"/>
+ </Flags>
<SessionStorage Value="InProjectDir"/>
- <MainUnit Value="0"/>
<Title Value="testall"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
@@ -47,9 +49,10 @@
<Version Value="2"/>
</PublishOptions>
<RunParams>
- <local>
- <FormatVersion Value="1"/>
- </local>
+ <FormatVersion Value="2"/>
+ <Modes Count="1">
+ <Mode0 Name="default"/>
+ </Modes>
</RunParams>
<RequiredPackages Count="1">
<Item1>
@@ -83,7 +86,7 @@
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
- <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
+ <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<Checks>
@@ -21,7 +21,7 @@
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
- <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
+ <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<Optimizations>
'/' in path settings works also on Windows. The IDE at some point converts it to '\' for Windows. No need for {$ifdef linux} in XML.The path is all that needs to be fixed so I changed the '\' backslash after /home/aruna/lazarus/examples/lib\ to a forward slash and now it works on linux. My question to you all is the testall.lpi file contents are in XML format so how do I do something like {$ifdef linux} in a XML file for christ sake ::) OR as is usual in my case I am missing something obvious?
Unable to write state file for project Project Error: Unable to create file "/home/aruna/lazarus/examples/lib\x86_64-linux/testall.compiled": No such file or directory
As you can see I fixed the path delimiters so that they work also on Linux and Unix systems.Yes I saw that after I had sent out my email.
'/' in path settings works also on Windows. The IDE at some point converts it to '\' for Windows. No need for {$ifdef linux} in XML.[EDIT] No wonder... I want to see how and where the IDE is converting this I was quite perplexed when it did work fine on both windows and my linux. Now I know the reason haha :)
Why you have '\' there? I don't know.Initially because I had checked out a branch which did not have your fix and now because 'I' went and changed it to trigger the error. It is all good now. Thank you. Sorry for causing any confusion.
Maybe you checked out (git checkout) a revision earlier than commit 337b198136.Yes that was why.
Maybe you have local changes after you played with the commit history. Then do "git reset --hard" but be careful with it. You may lose changes you wanted to keep.The main branch I check out when I need to but I am mostly on fixes_2_2 because that is the branch that has the other examples that need work.
I assume you have the "main" branch active.
The main branch I check out when I need to but I am mostly on fixes_2_2 because that is the branch that has the other examples that need work.You mean the examples that were deleted from "main"? The examples that were not deleted, were moved to another directory and can still be found in "main".
I want to see how and where the IDE is converting this I was quite perplexed when it did work fine on both windows and my linux. Now I know the reason haha :)Unit LazFileUtils has function SwitchPathDelims(). Search for it in all Lazarus sources, whole words only. You should get 52 matches. Study the code that calls it.
I just moved all 'testall' files to lcl/tests in branch fixes_2_2 on my local repository and pushed to my remote everything went well. Now when I try to create a merge request gitlab starts complaining please see attached screenshot.Don't use fixes_2_2 branch when you participate in the development process. You must use the "main" branch.
So I have toYou can skip the GitLab merge request process if you don't like it. Patches are still supported.
- fork the Lazarus Repo, then..
- clone the fork to my local system, then..
- somehow get the local repo to fetch/pull from the original Lazarus main/trunk.
Since I started working again time has become a very limited commodity for my personal projects.Do you also work with carrots? Or some other vegetables maybe? ;)
Do you also work with carrots? Or some other vegetables maybe? ;)I have tried to grow my own vegetables but I live in a condominium apartment so it has had limited success. I do not have land to plant on. I have to use small pots or bottles along the living room window so they get some sunlight. I am not sure if this will work but here are some pictures of my attempts at growing herbs. (https://arunajh.neocities.org/juha/)
@JuhaManninen and @dbanon I tried everything and am still unable to 'sync' the Lazarus/main repository with my own fork. I have given the bash output at each stage and if someone can figure out a fix it would be most welcome. Else I am simply going to delete my fork and start from scratch.
I have been struggling with this over a week now :-( Please see below for details.
I created a remote 'personal' which is my forked repository and a 'upstream' which is lazarus/main.
If you look at the "git log --oneline --graph --all" then you should see
(or "git log --oneline --graph -n 50 main upstream/main personal/main")
)
You haven't done a "git pull personal".
git push --force-with-lease personal main
This will override the remote branch.
That is, the current "main" on the upstream remote will be replaced (deleted) by the new "main" as it is in your local repo (and that is up to date with upstream).
Just Zip the TestAll project and upload it here. :)I will do that Juha but I want to get things working using GitLab because at some stage I will have to start using Gitlab to contribute. I have also started to study the testall code in depth and now I realize all it actually tests are the mouse functions mostly but the full code is IMHO a very useful resource so I will keep digging and learning and hopefully zip an upload here but may not be any time soon.
The other thing is I used a credit card and verified my identity in Gitlab but now it tells me prepcache has failed. Please see attached screenshot. Sigh... I suppose drop kicking Gitlab in the head is out of the question eh? %)Do you mean you paid something for the account? You don't need to. A free account is enough for these FOSS projects.
Just Zip the TestAll project and upload it here. :)Hello @Juha I have attached a testall.zip. Please see if you can get this back into the main trunk when you have time. Thank you.
Sorry I failed to notice your post earlier.No worries..
Do you mean you paid something for the account? You don't need to. A free account is enough for these FOSS projects.No no just used it to verify I am who I say I am nothing was paid.
I also feel uncomfortable with the GitHub and GitLab interfaces and server branches because I have not practiced much.I have sent in a testall.zip and once you get it added back to the Lazarus sources I will start improving it. The testall.zip has all the original files with no changes. I think what you have said will be much easier than trying to get things working with Gitlab. So I will do what you asked me to and try to send in patches :)
For you it would be much easier to skip all that and contribute with patches. They are still fully supported as I wrote earlier. Create local feature branches and switch between them. Sometimes rebase against "main". When a feature or fix is ready, create a patch and upload it to bug tracker or somewhere. Easy!
You can continue studying and improving the TestAll project also after it gets added to Lazarus sources. Release early, release often. FOSS development.
Hello @Juha I have attached a testall.zip. Please see if you can get this back into the main trunk when you have time. Thank you.I placed it in lcl/tests/testall/ and tried to compile. I got :
I have sent in a testall.zip and once you get it added back to the Lazarus sources I will start improving it. The testall.zip has all the original files with no changes. I think what you have said will be much easier than trying to get things working with Gitlab. So I will do what you asked me to and try to send in patchesI thought you fixed some issues for Linux, but adding the original files is perfectly OK, too.
This error is due to a path issue because we moved the files into a new location lcl/tests/testall. Instead of one level we have to now go up three levels so Lazarus can find the *.res files. Fix is shown below. The file is testallform.pp and line numbers are 171 and 172.Hello @Juha I have attached a testall.zip. Please see if you can get this back into the main trunk when you have time. Thank you.I placed it in lcl/tests/testall/ and tried to compile. I got :
Error: Can't open resource file "/home/juha/SW/lazarus/lcl/tests/testall/../images/components_images.res"
Yes I did but then I thought let us just start from scratch the way it was. I did a git shortlog examples/testallform.pp in branch fixes_2_2 and I think attribution is important and I have no idea once we add the files I sent to lcl/tests/testall if the git history of who did what and when will remain intact? See below..I have sent in a testall.zip and once you get it added back to the Lazarus sources I will start improving it. The testall.zip has all the original files with no changes. I think what you have said will be much easier than trying to get things working with Gitlab. So I will do what you asked me to and try to send in patchesI thought you fixed some issues for Linux, but adding the original files is perfectly OK, too.
Yes, when you work with local feature branches and patches, you don't need to create a fork in GitLab. Just clone the official repo like everybody else and then work locally.I stopped trying to get Gitlab to work it is simply too time-consuming and frustrating. Your way is very much simpler and hopefully will work for me. Thank you.
I do the same thing basically. I happen to have commit rights and thus I do "git push" instead of uploading a patch somewhere.
I have many feature branches here. Most of them are experimental and will never be used for the official repository.
This error is due to a path issue because we moved the files into a new location lcl/tests/testall. Instead of one level we have to now go up three levels so Lazarus can find the *.res files.Yes, it was easy to fix.
Yes I did but then I thought let us just start from scratch the way it was. I did a git shortlog examples/testallform.pp in branch fixes_2_2 and I think attribution is important and I have no idea once we add the files I sent to lcl/tests/testall if the git history of who did what and when will remain intact?It will remain intact in "main" and in "fixes_2_2". Nothing will change the existing history.
I feel it is important to keep this info but I do not know how we are going to do this if we just plug the files into lcl/tests/testall? Or as usual I am not seeing the obvious?The version in lcl/tests/ will have its own commit history once we start committing code.
Anyway the TestAll project should be copied from "main" branch before its deletion from the examples directory, thus including all changes. Is this version from there?As it is right now in "main" branch if you check for testall by running ls -alh examples/test* there is nothing. Testall was removed at some point from "main" but it is still there under branch "fixes_2_2" and I copied it from branch "fixes_2_2". I vaguely remember asking where is "testall" and @dbannon pointed me in the right direction by saying I can find it under branch "fixes_2_2" but it is most definitely no longer in branch "main".
As it is right now in "main" branch if you check for testall by running ls -alh examples/test* there is nothing. Testall was removed at some point from "main" but it is still there under branch "fixes_2_2" and I copied it from branch "fixes_2_2". I vaguely remember asking where is "testall" and @dbannon pointed me in the right direction by saying I can find it under branch "fixes_2_2" but it is most definitely no longer in branch "main".It got bugfixes in "main" branch before it was removed. Thus you must go to the last commit before the removal and copy it. I even explained it in some earlier post in detail.
It got bugfixes in "main" branch before it was removed. Thus you must go to the last commit before the removal and copy it. I even explained it in some earlier post in detail.
So I am guessing the commit I must go back to is commit 95ca76e85edc433d7d03f14daf28aafbcd92fa36 Author: mattias <nc-gaertnma@netcologne.de> Date: Sat Oct 1 00:38:04 2005 +0000 ?Don't go so far in history. See the third post in this thread for details.
Oh my goodness you told me exactly what to do but I did not understand this at that time, I do now. Thank you Juha.So I am guessing the commit I must go back to is commit 95ca76e85edc433d7d03f14daf28aafbcd92fa36 Author: mattias <nc-gaertnma@netcologne.de> Date: Sat Oct 1 00:38:04 2005 +0000 ?Don't go so far in history. See the third post in this thread for details.
I added the latest TestAll project from "main" examples/ directory to lcl/tests in c1e41c6f962c. Please test.Juha thank you very much but what you added does not have the necessary git history. You can see this below.
Why does it test only a small subset of LCL controls? The name TestAll is misleading. Can you Aruna please take a look?This was how I found the original source. Only 4 controls were tested the others had placeholders but someone has to write code to test. If you go through testallform_include.inc starting at line 117 you will see the reason why. Some code is below.
Further code improvements must happen as patches or merge requests.Understood and will comply. Thank you Juha.
Why does it test only a small subset of LCL controls? The name TestAll is misleading. Can you Aruna please take a look?