[Lazarus] FPDocManager now handles selectable FCL packages

Michael Van Canneyt michael at freepascal.org
Sat Feb 18 11:21:21 CET 2012



On Sat, 18 Feb 2012, Hans-Peter Diettrich wrote:

> Mattias Gaertner schrieb:
>> On Fri, 17 Feb 2012 19:09:54 +0100
>> Hans-Peter Diettrich <DrDiettrich1 at aol.com> wrote:
>> 
>>> Mattias Gaertner schrieb:
>>>> On Fri, 17 Feb 2012 14:30:17 +0100
>>>> Hans-Peter Diettrich <DrDiettrich1 at aol.com> wrote:
>>>> 
>>>>> [...]
>>>>> Most FPDoc tools fail to work on units which deserve special compiler 
>>>>> options, when the user cannot supply the required options. I.e. you may 
>>>>> not be able to add descriptions in the FPDoc Editor,
>>>> Please report FCL units that fail to parse in Lazarus.
>>> I didn't talk about Lazarus (IDE)?
>
> Clarification: When working on/with the FPDocManager, or with the 
> documentation commandline tools (fpdoc, makeskel...), the fpdoc units can 
> report errors when processing units. This is one scenario.
> When I open these reported units in the IDE, these are not normally part of 
> the current project, so this is another scenario.
>
>
> The file fcl-process/src/pipesipc.pp is broken on many platforms. It only 
> contains:
>  {$define ipcunit}
>  {$i simpleipc.inc}
> but neither dummy/simpleipc.inc nor win/simpleipc.inc care about ipcunit, so 
> that the module lacks unit, interface, implementation clauses and an "end.". 
> This is invalid syntax. When included by simpleipc.pp, the module syntax for 
> "unit simpleipc;" is okay, beforementioned parts reside in simpleipc.pp.

That's how it is meant to be.

>
> Even if pipesipc.pp were a program, a "begin ... end." part is missing, and 
> it's known that fpdoc doesn't accept program modules.
>
> These are definitely bugs in the fcl-process sources, should I file an bug 
> report?

No. Unit pipesipc only works on Unixes.

It's simply not supported on other platforms; if you try any of these platforms, 
obviously it wil not work.

If you check fpmake.pp or the Makefile.fpc.fpcmake, you'll see that this unit is not compiled 
for non-unix platforms:

[target]
units=pipes process
units_beos=simpleipc dbugmsg dbugintf pipesipc
units_haiku=simpleipc dbugmsg dbugintf pipesipc
units_freebsd=simpleipc dbugmsg dbugintf pipesipc
units_darwin=simpleipc dbugmsg dbugintf pipesipc
units_iphonesim=simpleipc dbugmsg dbugintf pipesipc
units_solaris=simpleipc dbugmsg dbugintf pipesipc
units_netbsd=simpleipc dbugmsg dbugintf pipesipc
units_openbsd=simpleipc dbugmsg dbugintf pipesipc
units_linux=simpleipc dbugmsg dbugintf pipesipc
units_win32=simpleipc dbugmsg dbugintf
units_win64=simpleipc dbugmsg dbugintf
units_wince=simpleipc dbugmsg dbugintf
units_qnx=simpleipc dbugmsg dbugintf pipesipc
units_os2=simpleipc dbugmsg dbugintf
units_emx=simpleipc dbugmsg dbugintf

This is one of the reasons why I think the 'include all files' option in fpdoc 
is a bad idea. It just does not work for scenarios where not all units will work on 
all platforms. If someone just happens to be on the 'wrong' platform, and consequently 
runs into problems, he is guided into thinking that there is an error in the sources.
There is no error, the person is just trying to do something which is not supported, 
and which is not meant to be supported. 
But because of the 'automatisms' he runs into trouble...

I prefer to avoid this and force people to think about what they are doing.

Michael.




More information about the Lazarus mailing list