Replies: 9 comments 7 replies
-
Blocking #44 |
Beta Was this translation helpful? Give feedback.
-
Perhaps discussing this could also weigh in on #1 |
Beta Was this translation helpful? Give feedback.
-
Despite combining the docs sounding reasonable, at this very moment I have the feeling that it will Yes, splitting the docs, will bring up many duplications, Refs: One can easily toggle between programming languages. |
Beta Was this translation helpful? Give feedback.
-
Another thing on top of my mind - more as a sharing of personal point of view: We can think of something in that direction, but of course not for the API itself, which is the main discussion here. |
Beta Was this translation helpful? Give feedback.
-
We will need to use separate documentation generators for the different languages, since there is no generator which covers all of them. Here's a list of options:
When dealing with each language we need to target the developers who are familiar with the language's ecosystem. So for example a Doxygen-generated website might not be so familiar to Python programmers, unlike Sphinx. I think we need to consult with the frontend dev who will be responsible for the frontend part, in order to see how to integrate output from several documentation generators. For now I can create a simple Doxygen website which covers C/C++ only. |
Beta Was this translation helpful? Give feedback.
-
Even splitting the documentation can share document text. Splitting or combining doesn't have to affect the text source. Both can use a pattern like: namespace ac {
class Provider {
/// ac.provider.create_model
void createModel(...);
};
} package ac;
class Provider {
/// ac.provider.create_model
public void createModel();
} Then at the documentation source the symbol |
Beta Was this translation helpful? Give feedback.
-
We should also add docs for models - generate some doc pages based on a model manifest. Since the model manifest is either actually or equivalent to JSON, perhaps we should invest in client-side code to generate the docs from JSON, thus it could be used for third party manifests as well |
Beta Was this translation helpful? Give feedback.
-
I will remove the doc generation from CMake. Even though CMake does provide some helpful utils for Doxygen (via We don't have (and I'd say we shouldn't have) docs which depend on the current CMake configuration. To burden the binary build with docs seems like a bad idea. Moreover we will very likely not use Doxygen for the Java documentation and with absolute certainty we won't use it for Swift one and many other wrappers that we provide. This means that the nice features which CMake provides for Doxygen will have to be (clumsily) reimplemented for other doc generators. It simply makes no sense. We will have documentation generation independent from CMake. We will employ similar (in terms of tooling scope) solutions for the SDK itself and the wrappers. |
Beta Was this translation helpful? Give feedback.
-
Experimenting with doxygen I was able to make the in-source documentation less obnoxious. Unfortunately the generated XML doesn't structure the information enough. We could switch to sphinx for C and C++ (and all languages supported by sphinx in the future). Doxygen gives us Java though. Javadoc can't output an intermediate format on its own (there's this doclet, but it hasn't been touched in 9 years... could it still be relevant?) We could end-up in a weird situation where we use sphinx for C++ and doxygen for java. Anyway. We need to start creating content. My current plan is to generate xml for the apis we have: C++, C, Java, Swift in separate directories and use an external script to parse the xml output and arrange it into a web page. Exernal as in "not part of this repo". I think it should be part of the website repo, where data from multiple sources can safely be merged. |
Beta Was this translation helpful? Give feedback.
-
How are we going to do it?
We're interested in tools which scrape the source files and produce documentation from them, but we're about to add multiple languages... in multiple repos, no less.
Combining the docs
Should documentation pages have a single page per API entry with tabs for different languages?
Should we look for a tool which can handle multiple languages?
Should we produce something custom? An example of something custom would be using Doxygen to produce XML from C and C++, something else which produces an intermediate format from say swift sources, then parse the intermediates to join into a single documentation (with tabs for language for example).
The API is expected to have slight language-specific differences per entry. How would we deal with them?
In this case the doc tooling should be in a separate repo which has submodules for the relevant implementations.
Splitting the docs
Alternatively we could just have different pages for the different languages, using their own language-specific doc generators. And few (if any) crossrefs.
In this case a lot of text would have to be pasted between the different codebases for the (presumably significant number of) entries which are the same or very similar.
Beta Was this translation helpful? Give feedback.
All reactions