Re: [Lazarus] {$warn 5023 off: No warning about unused units}
On Wed, 6 Apr 2016 22:53:43 +0100 Graeme Geldenhuyswrote: >[...] > I see the same thing here with Lazarus v1.7. It is annoying for the SCM, > but I think I figured out the reasoning for that line. Lazarus packages > have somewhere a setting that says the unit managing the package must > (or mustn't) be added to the program using that package. I guess it > helps with forcing FPC to compile all units in question. I always delete > that, as I like my uses clause clean. You are confusing things here. A package needs a unit, that has a uses clause to let the compiler compile all units of the package. A design time package also needs to register its Register procedures. By default this is done by an auto generated unit. You can do this with an unit of your own if you prefer. This unit can also be added automatically to the program, to make sure that all initialization sections of the package are called. This is what you mean with "the unit managing the package must (or mustn't) be added to the program using that package". By default this is not done and this setting has nothing to do whether the unit is compiled aka the $warn. >[...] > Project templates and macros in settings have simplified my life a lot. > My hard drives have plenty of space for non-shared [between projects] > compiled units too. Sharing ppu can be done easily with macros too and packages can compile ppu for each project as well. You are missing the point of packages. The purpose of packages is to make sharing code easier by separating the compilation of program and package sources. For example you can add, rename directories in a package without affecting all programs. You can play around with compiler flags in your program with less worrying that packages are affected. Using macros requires good knowledge of every package you use. As far as I know you, Graeme, created or maintain all packages you use. In that case packages are indeed just shared directories of your own sources and macros might be the better solution. > Lazarus simply has too many "automated functionality" these days that simply > annoy. ... and always lacking this particular feature I need. ;) Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] {$warn 5023 off: No warning about unused units}
On Wed, 6 Apr 2016 23:31:32 +0200 Werner Pamlerwrote: > Since some time, the TurtoiseSVN overlay icons of some of the packages > which I loaded from svn have become practically useless. It is always > the autogenerated package unit which is marked by a red overlay icon as > being out of date. When I open the unit I see that the line > > {$warn 5023 off : no warning about unused units} The IDE automatically adds this line to the auto generated package unit. I changed it now, so it if this $warn is the only difference it does not update the file. > has been added to the unit header. Deleting the unit, updating it from > the svn repository fixes it for the moment, Hint: You can use the TortoiseSVN 'revert' function for that. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] {$warn 5023 off: No warning about unused units}
Here: http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packager/packagesystem.pas?root=lazarus=51771=51770=51771 V. __ Od: Maxim Ganetsky <gan...@narod.ru> Komu: Lazarus mailing list <lazarus@lists.lazarus.freepascal.org> Datum: 07.04.2016 01:13 Předmět: Re: [Lazarus] {$warn 5023 off: No warning about unused units} 07.04.2016 0:31, Werner Pamler пишет: Since some time, the TurtoiseSVN overlay icons of some of the packages which I loaded from svn have become practically useless. It is always the autogenerated package unit which is marked by a red overlay icon as being out of date. When I open the unit I see that the line {$warn 5023 off : no warning about unused units} Which file gives you this warning? -- Best regards, Maxim Ganetsky mailto:gan...@narod.ru -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus <http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus> -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] {$warn 5023 off: No warning about unused units}
Am 07.04.2016 um 00:42 schrieb Maxim Ganetsky: Which file gives you this warning? It is always the package unit - I don't know if this is the correct name, I mean the unit which has the same name as the lkp file and which is autocreated, its first lines say: "This file was automatically created by Lazarus. Do not edit! This source is only used to compile and install the package." I wonder, since this file is autocreated, why must it be under version control then? Not all packages show this warning at the moment. But I must say that I did have the situation that all Lazarus packages in the components folder were "red". I could fix this by a clean install, just like Bart said. Now most (or all?) of the my third-party packages still have this issue: bgrabitmap, zeos, luipack, lazbarcodes, lclextensions, virtualtreeview_new etc. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] {$warn 5023 off: No warning about unused units}
07.04.2016 0:53, Graeme Geldenhuys пишет: On 2016-04-06 22:31, Werner Pamler wrote: There must be something in my Lazarus settings which inserts this line. Could anybody give me a hint where to look? I see the same thing here with Lazarus v1.7. It is annoying for the SCM, but I think I figured out the reasoning for that line. Lazarus packages have somewhere a setting that says the unit managing the package must (or mustn't) be added to the program using that package. I guess it helps with forcing FPC to compile all units in question. I always delete that, as I like my uses clause clean. My suggestion (and personal solution) is to shy away from using packages at all. I used to believe they were the best feature of Lazarus after I moved from Delphi years back. I don't think that any more. Project templates and macros in settings have simplified my life a lot. My hard drives have plenty of space for non-shared [between projects] compiled units too. Lazarus simply has too many "automated functionality" these days that simply annoy. Are you really sure that this message is useful in this thread? Please stop this. -- Best regards, Maxim Ganetsky mailto:gan...@narod.ru -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] {$warn 5023 off: No warning about unused units}
07.04.2016 0:31, Werner Pamler пишет: Since some time, the TurtoiseSVN overlay icons of some of the packages which I loaded from svn have become practically useless. It is always the autogenerated package unit which is marked by a red overlay icon as being out of date. When I open the unit I see that the line {$warn 5023 off : no warning about unused units} Which file gives you this warning? -- Best regards, Maxim Ganetsky mailto:gan...@narod.ru -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] {$warn 5023 off: No warning about unused units}
-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] {$warn 5023 off: No warning about unused units}
On 4/6/16, Werner Pamlerwrote: > {$warn 5023 off : no warning about unused units} > > has been added to the unit header. Deleting the unit, updating it from > the svn repository fixes it for the moment, the "no warning about unused > units" line is gone, and the overlay icon is green. But when I open the > package and recompile it the line comes back, and the icon turns read > again. Had that before. A clean build of Lazarus then fixed it, the lines were left in. (Well, IIRC I had to do that twice for some, inexplainable reason it didn't work the first time) Bart -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] {$warn 5023 off: No warning about unused units}
On 2016-04-06 22:31, Werner Pamler wrote: > There must be something in my Lazarus settings which inserts this line. > > Could anybody give me a hint where to look? I see the same thing here with Lazarus v1.7. It is annoying for the SCM, but I think I figured out the reasoning for that line. Lazarus packages have somewhere a setting that says the unit managing the package must (or mustn't) be added to the program using that package. I guess it helps with forcing FPC to compile all units in question. I always delete that, as I like my uses clause clean. My suggestion (and personal solution) is to shy away from using packages at all. I used to believe they were the best feature of Lazarus after I moved from Delphi years back. I don't think that any more. Project templates and macros in settings have simplified my life a lot. My hard drives have plenty of space for non-shared [between projects] compiled units too. Lazarus simply has too many "automated functionality" these days that simply annoy. Regards, - Graeme - -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] {$warn 5023 off: No warning about unused units}
Since some time, the TurtoiseSVN overlay icons of some of the packages which I loaded from svn have become practically useless. It is always the autogenerated package unit which is marked by a red overlay icon as being out of date. When I open the unit I see that the line {$warn 5023 off : no warning about unused units} has been added to the unit header. Deleting the unit, updating it from the svn repository fixes it for the moment, the "no warning about unused units" line is gone, and the overlay icon is green. But when I open the package and recompile it the line comes back, and the icon turns read again. There must be something in my Lazarus settings which inserts this line. Could anybody give me a hint where to look? I am having this issue with Laz trunk / fpc 3.0 on Win7. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus