View Issue Details

IDProjectCategoryView StatusLast Update
0037629FPCUtilitiespublic2021-04-12 17:05
ReporterDon Siders Assigned ToMarco van de Voort  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
PlatformWindows x86-64OSWindows 
Product Version3.0.4 
Summary0037629: FPDOC Code Analyzer fails on PLATFORM and EXPERIMENTAL hint directives
DescriptionThe FPDOC code analyzer skips a unit when it encounters the PLATFORM or EXPERIMENTAL hint directive. The offending unit in this example is components/lazcontrols/extendedtsabcontrols.pas in the Lazarus project.

$ fpdoc.exe --project=lazcontrols-chm-project.xml --dry-run --verbose
FPDoc - Free Pascal Documentation Tool
Version 3.2.0 [2020/07/07]
(c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, sg@freepascal.org
(c) 2005 - 2012 various FPC contributors

Info: Opening source file "../checkboxthemed.pas".
Info: Opening source file "../dividerbevel.pas".
Info: Opening source file "../extendednotebook.pas".
Info: Opening source file "../extendedtabcontrols.pas".
Error: ../extendedtabcontrols.pas(244,114): Expected "," or ":" at token ";" in file ../extendedtabcontrols.pas at line 244 column 114
Ignoring error, continuing with next unit (if any).
Info: Opening source file "../listfilteredit.pas".
Info: Opening source file "../listviewfilteredit.pas".
Info: Opening source file "../lvlgraphctrl.pas".
Info: Opening source file "../shortpathedit.pas".
Info: Opening source file "../spinex.pp".
Info: Opening source file "../treefilteredit.pas".
Done.

The offending line(s) in the unit contain:

property ActivePage: TExtendedTabSheet read GetActiveTabSheet write SetActiveTabSheet; experimental; platform;
property Pages[Index: Integer]: TExtendedTabSheet read GetTabSheet; experimental; platform;

While this seems to be a problem in fcl-passrc, it is being reported in the context in which it was discovered.
Additional InformationThis was tested with FPDoc from both FPC 3.0.4 (Lazarus 2.08) and FPC 3.2.0 (Lazarus 2.0.10). I do not have a trunk compiler installed to test a newer revision of the tool.
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Activities

Marco van de Voort

2021-03-28 13:33

manager   ~0129934

Last edited: 2021-03-28 15:16

View 2 revisions

Can't find a laz-controls-chm-project.xml in lazarus sources to duplicate?

Anyway, I suspect that with 200+ fcl-passrc revisions in 3.2.0 and 3.2.2 this might have been resolved?

Don Siders

2021-03-28 17:41

reporter   ~0129959

The project file did not exist... so I created one. I cannot test with the 3.2.2RC at the moment. I am attaching the project, style, and footer files.
lazcontrols-chm-project.xml (2,499 bytes)   
<?xml version="1.0" encoding="utf-8"?>
<docproject>
  <options>
    <option name="ostarget" value="Win64"/>
    <option name="cputarget" value="x86_64"/>
    <option name="format" value="CHM"/>
    <option name="hide-protected" value="false"/>
    <option name="show-private" value="false"/>
    <option name="warn-no-node" value="false"/>
    <option name="stop-on-parser-error" value="false"/>
    <option name="parse-impl" value="false"/>
    <option name="dont-trim" value="true"/>
    <option name="emit-notes" value="false"/>
    <option name="auto-index" value="true"/>
    <option name="auto-toc" value="true"/>
    <option name="chm-title" value="Lazarus Controls Package"/>
    <option name="css-file" value="lazcontrols.css"/>
    <option name="footer" value="lazcontrols-footer.xml"/>
    <option name="footer-date" value="dd mmm yyyy"/>
  </options>
  <packages>
    <package name="lazcontrols" output="lazcontrols" content="lazcontrols.xct">
      <units>
        <unit file="../checkboxthemed.pas"/>
        <unit file="../dividerbevel.pas"/>
        <unit file="../extendednotebook.pas"/>
        <unit file="../listfilteredit.pas"/>
        <unit file="../listviewfilteredit.pas"/>
        <unit file="../lvlgraphctrl.pas"/>
        <unit file="../shortpathedit.pas"/>
        <unit file="../spinex.pp"/>
        <unit file="../treefilteredit.pas"/>
        <unit file="../extendedtabcontrols.pas"/> <!-- omit to avoid fcl-passrc errors -->
      </units>
      <descriptions>
        <description file="checkboxthemed.xml"/>
        <description file="dividerbevel.xml"/>
        <description file="extendednotebook.xml"/>
        <description file="listfilteredit.xml"/>
        <description file="listviewfilteredit.xml"/>
        <description file="lvlgraphctrl.xml"/>
        <description file="shortpathedit.xml"/>
        <description file="spinex.xml"/>
        <description file="treefilteredit.xml"/>
         <description file="extendedtabcontrols.xml"/> <!-- omit to avoid fcl-passrc errors -->
      </descriptions>
      <imports>
        <import file="../../../docs/chm/rtl.xct" prefix="ms-its:rtl.chm::/"/>
        <import file="../../../docs/chm/fcl.xct" prefix="ms-its:fcl.chm::/"/>
        <import file="../../../docs/chm/lcl.xct" prefix="ms-its:lcl.chm::/"/>
        <import file="../../../docs/chm/lazutils.xct" prefix="ms-its:lazutils.chm::/"/>
      </imports>
    </package>
  </packages>
</docproject>
lazcontrols-chm-project.xml (2,499 bytes)   
lazcontrols.css (2,848 bytes)   
/*
  Default style sheet the for LazControls  documentation
  This is a modified version of the lazdocs.css file
*/

body {
  background: white
}

body, p, th, td, caption, h1, h2, h3, ul, ol, dl {
  color: black;
  font-family: sans-serif;
  font-size: 12pt;
}

tt, span.kw, pre {
  font-family: "Courier New", Courier, monospace
}

body, p, th, td, caption, ul, ol, dl, tt, span.kw, pre {
  font-size: 1em;
}

A:link {
  color: blue
}

A:visited {
  color: darkblue
}

A:active {
  color: red
}

A {
  text-decoration: none
}

A:hover {
  text-decoration: underline
}

h1, h2, td.h2 {
  color: #005A9C
}

/* Especially for Netscape on Linux: */
h3, td.h3 {
  font-size: 1.125em;
}

/* source fragments */
span.code {
  white-space: nowrap
}

/* symbols in source fragments */
span.sym {
  color: darkred
}

/* keywords in source fragments */
span.kw {
  font-weight: bold
}

/* comments in source fragments */
span.cmt {
  color: darkcyan;
  font-style: italic;
}

/* directives in source fragments */
span.dir {
  color: darkyellow;
  font-style: italic;
}

/* numbers in source fragments */
span.num {
  color: darkmagenta;
}

/* characters (#...) in source fragments */
span.chr {
  color: darkcyan;
}

/* strings in source fragments */
span.str {
  color: blue;
}

/* assembler passages in source fragments */
span.asm {
  color: green;
}

td.pre {
  white-space: pre
}

p.cmt {
  color: gray
}

span.warning {
  color: red;
  font-weight: bold;
}

/* !!!: How should we define this...? */
span.file {
  color: darkgreen;
}

table.remark {
  background-color: #ffffc0;;
}

table.bar {
  background-color: #a0c0ff;
  margin-top: .25em;
}

span.bartitle {
  font-weight: bold;
  font-style: italic;
  color: darkblue;
}

span.footer {
  font-style: italic;
  color: darkblue;
}

/* modified  */
/* definition list */
dl {
 /*
 border: 3px  #ccc;
 */
 padding: 0.5em;
}

/* modified  */
/* definition list: term */
dt {
 /*
 float: left;
 clear: left;
 padding-right: 1.25em;
 */
 width: auto; /* normally browsers default width of largest item */
 font-weight: bold;
 color: darkgreen;
}

/* modified  */
/* definition list: description */
dd {
 margin: 0 0 0 2.5em;
 padding: 0 0 0.5em 0;
}

/* for browsers in standards compliance mode */
td p {
  margin: 0;
}

/* added */
table.footer-bar {
  width: 100%;
  background-color: #a0c0ff;
  font-weight: 500;
  font-size: .85em;
  margin: 1em 0 0 0;
  padding: 0;
}

/* added */
table.footer-bar tr td {
  width: 33%;
  padding: .25em .35em;
  text-align: center;
}

/* added */
table.footer-bar tr td.file {
  text-align: left;
}

/* added */
table.footer-bar tr td.date {
  text-align: right;
}
lazcontrols.css (2,848 bytes)   
lazcontrols-footer.xml (280 bytes)   
<!-- update prior to build   -->
<!-- uses style classes not present in lazdocs.css -->
<table class="footer-bar">
  <tr>
    <td class="file">LazControls Package</td>
    <td class="rev">Revision 64596</td>
    <td class="date">Created 17 Feb 2021</td>
  </tr>
</table>
lazcontrols-footer.xml (280 bytes)   

Marco van de Voort

2021-03-28 17:45

manager   ~0129960

Thanks.

Marco van de Voort

2021-03-28 21:35

manager   ~0129967

Tested with trunk, still the case. Also some new errors:

Bad format imported node: name="GraphMath" link="ms-its:lcl.chm::/Operators graphmath/graphmath operators.html"
Bad format imported node: name="Anchoring" link="ms-its:lcl.chm::/Controls controls/anchoring controls.html"
Bad format imported node: name="Control" link="ms-its:lcl.chm::/coordinates controls/control coordinates.html"
Info: Opening source file "../checkboxthemed.pas".
Info: Opening source file "../dividerbevel.pas".
Info: Opening source file "../extendednotebook.pas".
Info: Opening source file "../listfilteredit.pas".
Info: Opening source file "../listviewfilteredit.pas".
Info: Opening source file "../lvlgraphctrl.pas".
Info: Opening source file "../shortpathedit.pas".
Info: Opening source file "../spinex.pp".
Info: Opening source file "../treefilteredit.pas".
Info: Opening source file "../extendedtabcontrols.pas".
Parser error: ../extendedtabcontrols.pas (244,106): Expected "Identifier" at token ";" in file ../extendedtabcontrols.pas at line
244 column 106
Ignoring error, continuing with next unit (if any).

Don Siders

2021-03-29 00:16

reporter   ~0129969

I'll look at the new messages. Thanks for testing.

Don Siders

2021-03-29 02:32

reporter   ~0129971

I looked at the new messages:

All 3 are <topics> elements. None of the topic names have the space character that appears in the error message. Not sure where that's coming from... it's not in the XML source. They ms-its::/ paths are oddly formed too.

> Bad format imported node: name="GraphMath" link="ms-its:lcl.chm::/Operators graphmath/graphmath operators.html"
> Bad format imported node: name="Anchoring" link="ms-its:lcl.chm::/Controls controls/anchoring controls.html"
> Bad format imported node: name="Control" link="ms-its:lcl.chm::/coordinates controls/control coordinates.html"

Marco van de Voort

2021-04-12 17:05

manager   ~0130314

Those ms-its errors are gone with xct from the new snapshot. I suspect a mistake in copying the .xct files, so that old ones were used?

Issue History

Date Modified Username Field Change
2020-08-23 17:24 Don Siders New Issue
2021-03-28 13:33 Marco van de Voort Assigned To => Marco van de Voort
2021-03-28 13:33 Marco van de Voort Status new => feedback
2021-03-28 13:33 Marco van de Voort FPCTarget => -
2021-03-28 13:33 Marco van de Voort Note Added: 0129934
2021-03-28 15:16 Marco van de Voort Note Edited: 0129934 View Revisions
2021-03-28 17:41 Don Siders Note Added: 0129959
2021-03-28 17:41 Don Siders File Added: lazcontrols-chm-project.xml
2021-03-28 17:41 Don Siders File Added: lazcontrols.css
2021-03-28 17:41 Don Siders File Added: lazcontrols-footer.xml
2021-03-28 17:41 Don Siders Status feedback => assigned
2021-03-28 17:45 Marco van de Voort Note Added: 0129960
2021-03-28 21:35 Marco van de Voort Note Added: 0129967
2021-03-29 00:16 Don Siders Note Added: 0129969
2021-03-29 02:32 Don Siders Note Added: 0129971
2021-04-12 17:05 Marco van de Voort Note Added: 0130314