View Issue Details

IDProjectCategoryView StatusLast Update
0037126FPCUtilitiespublic2020-05-21 23:17
ReporterSimon Ameis Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version3.3.1 
Fixed in Version3.3.1 
Summary0037126: fpdoc ignores ostarget
DescriptionThe command line parameter ostarget is passed to the parser in mkfpdoc.pp line 277. However the parser ignores this as the option poSkipDefaultDefs is set.

Thus conditions in unit interface secion are skipped at all when generating the documentation.
Additional InformationThe appended patch removes the option poSkipDefaultDefs,. so the ostarget switch is actually used. The most usefull solution would be to parse everything without interpreting the defines, OS or CPU target and add them as comment in the generated documentation.
Tagsfpdoc, patch
Fixed in Revision45453
FPCOldBugId
FPCTarget3.2.0
Attached Files

Activities

Simon Ameis

2020-05-21 10:43

reporter  

mkfpdoc.patch (563 bytes)   
diff --git "a/utils/fpdoc/mkfpdoc.pp" "b/utils/fpdoc/mkfpdoc.pp"
index 058577e1fb..de47b7b537 100644
--- "a/utils/fpdoc/mkfpdoc.pp"
+++ "b/utils/fpdoc/mkfpdoc.pp"
@@ -274,7 +274,7 @@ begin
         if FProcessedUnits.IndexOf(Cmd)=-1 then
           begin
           FProcessedUnits.Add(Cmd);
-          ParseSource(Engine,Cmd+' '+Arg, Options.OSTarget, Options.CPUTarget,[poUseStreams,poSkipDefaultDefs]);
+          ParseSource(Engine,Cmd+' '+Arg, Options.OSTarget, Options.CPUTarget,[poUseStreams]);
           end;
       except
         on E: EParserError do
mkfpdoc.patch (563 bytes)   

Michael Van Canneyt

2020-05-21 10:49

administrator   ~0122975

Ignoring the defines is not possible, since doing so it will result in invalid source code in many places.

I will look at the poSkipDefaultDefs.
It was introduced exactly for the documentation.
Maybe the defines need to be handled after the poSkipDefaultDef is set.

Michael Van Canneyt

2020-05-21 11:01

administrator   ~0122976

Fixed as suggested, thanks for reporting!

Issue History

Date Modified Username Field Change
2020-05-21 10:43 Simon Ameis New Issue
2020-05-21 10:43 Simon Ameis File Added: mkfpdoc.patch
2020-05-21 10:43 Simon Ameis Tag Attached: fpdoc
2020-05-21 10:43 Simon Ameis Tag Attached: patch
2020-05-21 10:46 Michael Van Canneyt Assigned To => Michael Van Canneyt
2020-05-21 10:46 Michael Van Canneyt Status new => assigned
2020-05-21 10:49 Michael Van Canneyt Note Added: 0122975
2020-05-21 11:01 Michael Van Canneyt Status assigned => resolved
2020-05-21 11:01 Michael Van Canneyt Resolution open => fixed
2020-05-21 11:01 Michael Van Canneyt Fixed in Version => 3.3.1
2020-05-21 11:01 Michael Van Canneyt Fixed in Revision => 45453
2020-05-21 11:01 Michael Van Canneyt FPCTarget => 3.2.0
2020-05-21 11:01 Michael Van Canneyt Note Added: 0122976
2020-05-21 23:17 Simon Ameis Status resolved => closed