Is there anywhere that I can found out about extensions?
What are the for, what functions do they include?
Ultimately I am trying to work out which extensions, of the ones that are installed on our Prod servers, we are actually using.
So that I can remove or the superfluous extensions and
Keep an eye on updates / do testing etc for the ones that we use.
But - it isn’t mentioned anywhere on that page - which functions are Lucee BIFs and which are provided by an extension - or whether they are all provided by the extension.
Within encodeForSQL() - just like esapiDecode()
there is : Requires Extension: ESAPI extension
So if one was to assume that ALL functions that require the ESAPI extension have this “marker” then I could use the existing documentation - to pull-out all the functions that have “requires ESAPI Extension” and list them “specifically with” the ESAPI extension documentation.
For my current use-case;
I can then use THIS list to search my code-base and determine:
Do I use the ESAPI extension at all?
Can I remove the extension from my installation?
Rinse and repeat for the PDF / Image / CFSpreadsheet / Caching extensions.
The datasource ones are pretty self-evident… do you use a Postgres DB at all? No? : Remove the Postgres extension.
Otherwise - if the Requires Extension: marker is “hand” added - then it is not going to be a reliable method for producing a list of functions that are provided by an extension.
And if this is the case,
How can I go about getting a list of functions that are provided from an extension, so that I can edit the current docs at https://download.lucee.org/ to include them?
Ahh yes, interesting. I’m not actually sure how to programmatically find all the BIFs (or tags) an extension contributes to Lucee. Obviously you can read the source code of the extension, but even that is tricky since functions and tags can be provided via Java or CFML. I was thinking the getFunctionData() or getTagData() BIFs would include this information but it seems they don’t.
I did notice some BIFs in the docs have a “requires extension” entry, but you’d have to check the source code to see how it determines that. I vaguely recall Zac working on that logic.
On a broader note, Adobe’s cfpm tool has an option to scan your codebase and tell you what modules you need to install. Lucee could stand to have a tool like this. Someone could build it in CommandBox, but short of a proper CFML parser, you’d basically be doing regex on the .cfm or .cfc files which can be a bit shoddy.