Forum > Documentation (Maintaining -)

How to discover information about packages, classes, etc.

(1/3) > >>

Is there a way to discover / browse packages included in fpc/Lazarus and see what functionality they provide?

So far, I've tried:

1. Reference material
     - Online documentation
     - Documentation search
     - Wiki (search and browse)

2. From within Lazarus
     - Menu: View | Code Browser
     - Menu: Package | *
     - Menu: Help | Help (seems to draw from the online docs, and is similarly missing information about available packages)
However, neither technique give any information about the available packages.

Right now the only way for me to discover available packages and what functionality they provide, is to browse the fpc source code directly. For example, I cannot "discover" information about what Generic Collection classes there are and their interfaces without first opening up /usr/local/share/fpcsrc/3.2.0/packages/rtl-generic/src/generics.collections.pas and then reading through the source code or using the Code Explorer.

This is super tedious and I'm sure there must be a better workflow.

What am I missing?

I usually use Google Search Engine and add "Free Pascal" for the search text. For example "Free Pascal Generic Collection". Sometimes I use the documentation from Delphi.

If what I'm looking for is a third party package which is not installed by default, I use Online Package Manager. There I can get a short description about the package and most importantly its official URL, which I will then visit to get the documentation.

I guess you already knew, the documentations of Lazarus and Free Pascal can be improved. There were several discussions about it, unfortunate not much work has been done. Manpower issue.

I think there is no a better workflow. But there are many things we can do to better understand the package. Including examine the source code.


--- Quote from: jouborg on December 26, 2020, 04:14:01 am ---This is super tedious and I'm sure there must be a better workflow.
--- End quote ---

Yes, it's tedious and there's no better workflow: search the docs, search the wikis, search the forum and then the web at large; stop when you find what you're looking for or, if you don't, dive into the sources.

You've just discovered FPC/Lazarus's dirty little secret: there are quite a lot of included packages, extensions, libraries and bindings which are either barely talked about in the wiki (and sometimes here, in the forum) or not documented at all.

But you can help: if you see something you would like to use, use it and learn something worthwhile about it, document it, even if just by adding/modifying a page in the wiki. This is a volunteer project: become one yourself!  :)

Thanks, Handoko and lucamar.

Thinking out loud:

a) the wiki enables a collaborative, editorial perspective without being constrained by source code / package structure. This has certain advantages over a more scalable autodoc (e.g. using fpdoc) approach.

b) a package browser in Lazarus of local packages (any directory) could really help discovery but a standalone app can also help in those cases where someone doesn't use the IDE.

c) broadening the scope of the online docs ( to include ALL the packages that ship with Free Pascal would also help discovery and learning, especially if the package sources are documented well.

I think all three have merit so I'm keen to do something on all 3 fronts.

For (b), a cursory Google search doesn't turn up anything existing so I could spend some time building that.
For (c), I'd like to see whether I can change the build process for to include the broader set of packages. Where is the infrastructure / configuration / source for building the online docs?

I'm not sure but I think you may want to join the bugtracker and try the FPDoc Editor:


[0] Message Index

[#] Next page

Go to full version