Re: [Lazarus] Masks: the naming of ...
27.10.2021 18:50, Bart via lazarus пишет: Hi, I thought I better start a new therad for this one, otherwise I get lost in the previous "TMask revisited" thread. I would like to rename some stuff, now we still can. Easier to remeber IMO: WindowsQuirksAllAllowed -> AllWindowsQuirks WindowsQuirksDefaultAllowed -> DefaultWindowsQuirks MaskOpCodesAllAllowed -> AllMaskOpcodes MaskOpCodesDefaultAllowed -> DefaultMaskOpcodes property RangeAutoReverse -> AutoReverseRange Internal consistency: TMaskWindows -> TWindowsMask TMaskListWindows -> TWindowsMaskList (Because of the Matches* functions we already have) Consitent coding style: TMaskParsedCode enums: mpcXXX TMaskFailCause enums: mfcXXX Opinions please. Looks good to me. -- Best regards, Maxim Ganetsky mailto:gan...@narod.ru -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Masks: the naming of ...
On Wed, Oct 27, 2021 at 11:56 PM Maxim Ganetsky via lazarus wrote: > > Opinions please. > > Looks good to me. Done. -- Bart -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Masks: the naming of ...
Bart, please run the TMask unit test project while you change the code. I fixed its compilation in 3c7586c0f8 but many tests fail. A unit test is especially useful with such text manipulation code. It is a good idea to run the tests after every change. Keep the test project open when changing. Regards, Juha -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Masks: the naming of ...
On Tue, Nov 2, 2021 at 8:21 PM Juha Manninen via lazarus wrote: > Bart, please run the TMask unit test project while you change the code. How to run that exactly without having to run the entire test suite? -- Bart -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Masks: the naming of ...
On Tue, Nov 2, 2021 at 9:43 PM Bart wrote: > How to run that exactly without having to run the entire test suite? OK, looked at the wrong test folder... I fixed the filename 'a[b]c' not matching the mask 'a[b]c' in DisableRange. TestSpecial: to test this feature mocAnyCharOrNone must be set, which is excluded from DefaultMaskOpCodes. TestWindows: the tests for wqFilenameEnd I think only work if mocAnyCharOrNone is enabled: José commented that quirk with This presents a problem, since DefaultMaskOpCodes excludes mocAnyCharOrNone , but DefaultWindowsQuirks requires it. I see 2 solutions: 1. On TWindows* mocAnyCharOrNone will be enabled by default, while it is not on TMask* 2. Remove wqFilenameEnd from DefaultWindowsQuirks and describe that adding that quirk implies that mocAnyCharOrNone will be enabled. A cleaner solution would be to NOT have wqFilenameEnd depend on mocAnyCharOrNone , but I have no idea how to do that. -- Bart -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Masks: the naming of ...
On Tue, Nov 2, 2021 at 8:21 PM Juha Manninen via lazarus wrote: > Bart, please run the TMask unit test project while you change the code. Whilst doing that I fiddled around with bot the tests and the masks unit. I then wanted to commit (push) these changes seperately. I got stuck. In svn I could commit a single file, then another. I git I don;t know how to do that. My workflow currently is: make changes git commit files I changed (solve one problem per commit) git pull (I have pull.rebase=true) git push I resorted to do a git restore on the changes to the test suite, then commiited and pushed the changes to masks unit. (And then I found out my changes to the testsuit were unnecessary, so that saved me from doing the changes all over again...) PS. The test suite runs fine again (but see my remarks on the wqFilenameEnd quirk. PS 2: building any program in the lazarus tree pollutes my tree and git gives warnings about untracked files: Here's what git tells me after building the test suite for masks unit: C:\devel\lazarus>git status On branch main Your branch is up to date with 'origin/main'. Untracked files: (use "git add ..." to include in what will be committed) components/lazutils/test/backup/ components/lazutils/test/testmasks.or nothing added to commit but untracked files present (use "git add" to track) Is there a way to suppress the warning about untracked files alltogether? Orr whould all this be added to our .gitignore file? -- Bart -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Masks: the naming of ...
On Tue, Nov 2, 2021 at 8:21 PM Juha Manninen via lazarus wrote: > I fixed its compilation in 3c7586c0f8 but many tests fail. Thank you for that (a bit late, but nevertheless). -- Bart -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Masks: the naming of ...
I am away from my development computer now. Short comments about the git issues: I use "git gui" for commits. It shows untracked files in a separate pane which does not bother much. IIRC there is a setting to not show them at all. You can make many commits and push them sometime later. Actually you can modify, join and reorder them before pushing which is handy. Regards Juha -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Masks: the naming of ...
On Tue, Nov 2, 2021 at 10:59 PM Bart wrote: > I see 2 solutions: > 1. On TWindows* mocAnyCharOrNone will be enabled by default, while it > is not on TMask* > 2. Remove wqFilenameEnd from DefaultWindowsQuirks and describe that > adding that quirk implies that mocAnyCharOrNone will be enabled. > > A cleaner solution would be to NOT have wqFilenameEnd depend on > mocAnyCharOrNone , but I have no idea how to do that. A third solution: Include mocAnyCharOrNone in DefaultMaskOpCodes. It is very unlikely that this will cause regressions, since in the old implementation [?] would only match a literal '?'. Then, setting wqFilenameEnd in Quirks on TWindows* should implicitely acitvate mocAnyCharOrNone... -- Bart -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Masks: the naming of ...
On 11/2/21 6:24 PM, Bart via lazarus wrote: Untracked files: (use "git add ..." to include in what will be committed) components/lazutils/test/backup/ components/lazutils/test/testmasks.or nothing added to commit but untracked files present (use "git add" to track) Is there a way to suppress the warning about untracked files alltogether? Orr whould all this be added to our .gitignore file? yes, put them in your .gitignore if you don't want them tracked and you want no notifications about them changing... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list where it belongs!* -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Masks: the naming of ...
On Tue, Nov 2, 2021 at 10:59 PM Bart wrote: > 2. Remove wqFilenameEnd from DefaultWindowsQuirks and describe that > adding that quirk implies that mocAnyCharOrNone will be enabled. Or a variant of this: remove it foem default and when added , aslo add mocAnyCharOrNone ... -- Bart -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Masks: the naming of ...
On Wed, Nov 3, 2021 at 12:27 AM Bart via lazarus < lazarus@lists.lazarus-ide.org> wrote: > Whilst doing that I fiddled around with bot the tests and the masks unit. > I then wanted to commit (push) these changes seperately. > I got stuck. > In svn I could commit a single file, then another. > I git I don;t know how to do that. > A resolution by file for commits in arbitrary and limiting. Often changes for one feature or bug fix must spread to many files, and often changes made in one file should be split into many commits. "git gui" allows to include/exclude hunks and even single lines in/from a commit. I believe your GUI tool supports the same thing. My workflow currently is: > > make changes > git commit files I changed (solve one problem per commit) > git pull (I have pull.rebase=true) > git push > Make many commits. Some of them may be experimental, no problem. Finally go through them, fix errors, join commits together, remove commits purely for debugging, and finally push. If a feature gets longer to finish, keep it in a local branch and rebase to main sometimes. PS. The test suite runs fine again (but see my remarks on the > wqFilenameEnd quirk. > Here it gives an error from procedure TestWindows. I don't see commits from you in the TestMasks project. Regards, Juha -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Masks: the naming of ...
On Wed, Nov 3, 2021 at 7:30 PM Juha Manninen via lazarus wrote: > Here it gives an error from procedure TestWindows. Fixed now. (Adjusted some tests, since DefaultMaskOpCodes changed, fixed the wqFileNameEnd error.) > I don't see commits from you in the TestMasks project. Because as it turned out the changes I made to it were wrong, so I just reverted them. -- Bart -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Masks: the naming of ...
03.11.2021 1:24, Bart via lazarus пишет: Untracked files: (use "git add ..." to include in what will be committed) components/lazutils/test/backup/ components/lazutils/test/testmasks.or I changed lazutils test projects to make their output to `units` subdirectory (it is already included in .gitignore) and also added `backup` subdirectories to .gitignore. Please test. -- Best regards, Maxim Ganetsky mailto:gan...@narod.ru -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus