Closed PeterJudgeZA closed 1 year ago
It's time to move on and start using JsonDocumentation, as that will be based on two components that are actively maintained (rcode-reader and proparse). We can talk about that during the PUG Challenge.
Good call, I had just noticed this as well that there's no return type when you have something like List
Could I also ask if any of the existing documentation options support returning the input or output mode for parameters to a class method? Does the AST even report a method parameter's mode, or just the name and datatype? If the AST supports it but ABLDuck and PCTDoc do not use it, does the JsonDocumentation utilize it to properly describe parameters?
Won't fix, use JsonDocumentation task. I confirm that the generics information is available there, as well as the input/output mode.
What does the JsonDocumentation provide that ClassDocumentation does not? Is there a UI wrapper to the produced JSON?
ClassDocumentation won't be maintained anymore (at least not by Riverside). Multiple reasons for that:
And no, there's no UI wrapper to the produced JSON. The existing class documentation tasks (ClassDoc and ABLDuck) can be migrated to use the Json output, pull requests are welcome (see #461).
This is very useful to know regarding the maintenance going forward on ClassDoc and why. Is there a usable example which shows how the JsonDoc should be used and how to consume the results? I've found some of the documentation to be lacking in actual demonstrations of behavior (a shared concern of our own, understandably).
Is there a usable example which shows how the JsonDoc should be used and how to consume the results?
Documentation: https://wiki.rssw.eu/pct/JsonDocumentation.md No example on how to consume the result. @spazzymoto Did you push the updated ABLDuck code somewhere ?
This is where it breaks down. I've followed the documentation to the best of my knowledge, and I have a directory with R-code, supplied a fileset and propath, and nothing is generated. I get a single JSON file with just an empty array. If there's a better way to discuss this, I would expect others to eventually run into the same situation if this is the future of documentation going forward.
<JsonDocumentation
destFile ="${build.html}/json/doc.json"
buildDir ="${build.root}/rcode"
encoding="UTF-8"
indent="true">
<fileset dir="${build.root}/rcode">
<include name="**/*.p"/>
<include name="**/*.cls"/>
</fileset>
<propath>
<pathelement path="${build.root}/rcode"/>
</propath>
</JsonDocumentation>
<fileset dir="${build.root}/rcode">
Mistake is probably here ; you have to point to the source directory (in order to execute the parser)
I may be unclear on what "source" means in this case. Since the Proparse was described as needing the r-code, I assume the source here is not the original .p or .cls files, but something else?
@DustinGrau-PSC Comments are not available from the rcode, so source code is needed. RCode contains the exact structure (even method signatures with .net types), so all methods / properties / ... are extracted from rcode. Then the parser is executed on the source code, and comments are attached to the right method.
I may be unclear on what "source" means in this case
Just the source code of what is in the build directory.
Ah, that makes sense now. I've been able to get a successful run from JsonDocumentation and it appears to produce all the basic information I would expect in the JSON output, though it doesn't seem to include any comments from the code. The format we use is what also works for the other documentation methods, and appears to match what was suggested in the documentation for the task. Is this still under development?
Is there a usable example which shows how the JsonDoc should be used and how to consume the results?
Documentation: https://wiki.rssw.eu/pct/JsonDocumentation.md No example on how to consume the result. @spazzymoto Did you push the updated ABLDuck code somewhere ?
I only have it locally at the moment it still requires some work unfortunately.
I've been able to get a successful run from JsonDocumentation and it appears to produce all the basic information I would expect in the JSON output, though it doesn't seem to include any comments from the code.
Use a development build: https://ci.rssw.eu/job/PCT/job/master/ And the build.xml from this ADE repo: https://github.com/Riverside-Software/cuddly-octo-ade
Thank you! That build.xml is exactly what I was originally looking for, and still taught me a few things I didn't know before. The development build is certainly an improvement--I'm getting more comments in the generated results, and I'm also now aware that these appear in their own "comments" array which I previously missed.
If a class has members that have a type of Progress.Collections.IList<> , or return/consume such values, the XML file created by the ClassDocumentation does not write appropriate values.
For the property, note the UNKNOWN DATATYPE, and that for the method's signature, the return type is missing completely.
To Reproduce Create a class similar to the below.
Expected behavior The ABL datatype should be correctly reflected in the generated XML.
Environment
Additional context In my particular case the property and method definition is in an include, but I would not expect that to make a difference.