Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2012-12

fpdoc output "parsing used unit..."

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

This seems new in FPC 2.7.1. I have some 15-20 units in my .xml project file that fpdoc uses, but only a select few units generate output like "Parsing used unit ..."

What does that output mean? Is in some error? And why the output only for a few units, and not all units?

----8<-------------8<-------------8<-------------8<-------------8<---- $ ./fpdoc --project=fpgui-docs-project.xml
FPDoc - Free Pascal Documentation Tool
Version 2.7.1 [2012/12/02]
(c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, (c) 2005 - 2012 various FPC contributors

Parsing used unit "fpg_stringhashlist" with commandLine "-Fi../src -Fu../src/corelib/ ../src/corelib/fpg_stringhashlist.pas" Parsing used unit "fpg_form" with commandLine "-Fi../src -Fu../src/gui/ -Fu../src/corelib/ ../src/gui/fpg_form.pas"
Parsing used unit "fpg_basegrid" with commandLine "-Fi../src -Fu../src/gui/ -Fu../src/corelib/ ../src/gui/fpg_basegrid.pas" Parsing used unit "fpg_tree" with commandLine "-Fi../src -Fu../src/gui/ -Fu../src/corelib/ ../src/gui/fpg_tree.pas"
Parsing used unit "fpg_ColorWheel" with commandLine "-Fi../src -Fu../src/gui/ -Fu../src/corelib/ ../src/gui/fpg_colorwheel.pas" Done.

----8<-------------8<-------------8<-------------8<-------------8<----

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 8 lines
Hi, This seems new in FPC 2.7.1. I have some 15-20 units in my .xml project file that fpdoc uses, but only a select few units generate output like "Parsing used unit ..." What does that output mean? Is in some error? And why the output only for a few units, and not all units?

Ah. This has to do with the referencing and ordering of units.

Imagine unit A and unit B. Unit A references unit B. You create somewhere in A's documentation a link to an identifier in unit B.

You specify units A and B on the command line, in that order. If everything is done in the order as specified on the command-line, when parsing and documenting A, fpdoc cannot yet find a reference to an element in unit B, because B was not yet processed.

So now, if it encounters unit B in the uses clause, and finds unit B also in need of documenting, unit B is processed first (recursively).

Then all references to identifiers in unit B in the documentation of unit A will be resolved.

Michael.

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt
Michael Van Canneyt wrote
Imagine unit A and unit B. Unit A references unit B. You create somewhere in A's documentation a link to an identifier in unit B.

OK thanks. I'll try and reorder my units in the project file to see if this can be improved.

I thought order was not import for fpdoc, and that the documentation object model is populated first, then references resolved. I guess a one-pass is more efficient than a two-pass process.

Thanks for the info...

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 7 lines
On 2012-12-04 16:52, Michael Van Canneyt wrote: > > Imagine unit A and unit B. Unit A references unit B. > You create somewhere in A's documentation a link to an identifier in unit B. OK thanks. I'll try and reorder my units in the project file to see if this can be improved.

It should not be necessary to do so, but you will get rid of the warning.

I thought order was not import for fpdoc, and that the documentation object model is populated first, then references resolved. I guess a one-pass is more efficient than a two-pass process.

That too.

But the main problem is finding all the links 'afterwards'.
1. There is no list of links to resolve
2. The HTML is already written in the first pass.

Michael.

Reply by email