[Lazarus] Package filenames with _package

Michael Van Canneyt michael at freepascal.org
Sun Jan 7 10:42:33 CET 2018



On Sun, 7 Jan 2018, AlexeyT via Lazarus wrote:

>
>> I am glad to read this, I also think the _package is completely 
>> redundant.
>
> many Laz packages have suffix anyway: Dsgn, Pkg, pkg, maybe others.

True. And this is unfortunate, because it is not functional at all.

The "problem" is that the pascal unit generated for a package has the
same name as the package and often conflicts with a unit in the package. 
IMO it would be better to prefix it automatically.  (fpmake does this when
it makes a build unit)

MyPackage.lpk -> build_Mypackage.pas
or maybe
MyPackage.lpk -> run_Mypackage.pas
MyPackage.lpk -> ide_Mypackage.pas
Depending on what you chose for package options.

That way you would not need to prefix your package name with anything, 
unless you split your package in a design and runtime package. In the latter
case the prefix (or suffix) is still functional: it tells you that it is run
or design...

Michael.


More information about the Lazarus mailing list