Replies: 13 comments 15 replies
-
@mh182, @ascheman the above text is just a draft - a dump of some ideas. What are your thoughts? |
Beta Was this translation helpful? Give feedback.
-
I'm not sure if it makes sense to go for a version 3.0. A major version change implies either incompatibility or a big feature/change. But first, let's discuss the problems you identified.
Do you have any numbers? What I mean, what is the Gradle startup time compared to the time to generate the document? So I would like to gather some data based on the size of the documentation project.
Do we (as a project) really want to support any technology? If after a couple of years we have Lua, Python, Rust or some other script how do we want to provide support if bugs show up. From experience, people show up, if you are lucky they drop some code and then leave (and never to be seen again). I would rather go with:
I have to think what other problems we have and add those to this issue soon. |
Beta Was this translation helpful? Give feedback.
-
So the core values
Some problems I see at the moment (which are part of the problems you described above):
Easy to solve, but nevertheless important:
Coming back to your solutions.
Maybe I misunderstand you here. If you mean The main functionalities of
Since the core components are Java centric, I would stick to Java assembly (we don't really need a build tool) tools which are:
To be honest, I do not see much value in changing something there. One point we should discuss is, if we want to support packages for Linux OS: Debian and RH. But packaging Java components is PITA, especially for fast changing components. That's all from my side. |
Beta Was this translation helpful? Give feedback.
-
I would like to update to the latest Java 20, Groovy 4, Gradle 8+ etc. ast the first thing |
Beta Was this translation helpful? Give feedback.
-
Also, separate things so they can be invoked outside gradle (i.e. maven) |
Beta Was this translation helpful? Give feedback.
-
Sorry for being late to the discussions but I'd like to bring in my thoughts as well. Thanks for the discussion so far, it has helped me clear my mind. Separation of tools/tasksIn general, I would appreciate a better separation of the single tools for tasks. I would like to be able to call them stand alone and even from misc. orchestrators:
So I would like to make the tools available as separate libraries with perhaps a thin layer of integration into their orchestrators around them. Think of this thin layer as either an integration with Gradle/Maven/..., or a Groovy/JBang/... script with the library as dependency, or whatever would be needed for, e.g., pipeline engines. ConfigurationThe other challenge is the configuration. The current configuration reflects all possible integrations of the currently provided tasks. For example, you can integrate with Atlassian Jira or Confluence as well as you can create a JBake based micro site. This is nice when you want to make use of all aspects of docToolchain. But I suspect, that most users only need a very small part of it. Hence, they are confused by the many parts they never would even imagine to use. Additionally some parts of the configuration depend on each other and are hard to maintain or even configure, e.g., generating html and then performing sanity checks on them. Orchestrated configurationsLets talk about the full-blown docToolchain as we know it today. I would rather like to start with a simple configuration (which is perhaps very opinionated behind the scenes) and then allow to stepwise override the default behaviour. One approach could be a yaml file for configuration which could be empty (not given at all) or very small in the beginning to perform the opinionated approach. Execution of steps could even be dependant on the existence of files. Examples: If there is an
If there is a Open question: how to express dependencies between different tasks (as with html vs. sanity checking), in general, having one task consuming the result of another? Solution idea: Provide a // Configuration (excerpt) for multi documentation output (i.e., handbooks for architecture, development, operations)
docToolchain:
build: generated // generate all documentation artefacts to folder `generated/` instead of `build/` as before
artefacts:
- name: jiratickets
tool: jiraexport
- name: developmentdoc
source: manuals/development // Take the index.adoc from here instead of `src/docs/` as per default)
dependson: [jiratickets] // Make use of exported Jira tickets
- name: architecturedoc
tool: asciidoctor
source: manuals/arch
formats: [html, pdf] // Generate HTML and PDF (not only HTML as per default).
checks:
- name: htmlsanity
tool: htmlsanitycheck
source: generated/*/index.html // File globbing pattern to perform sanity check for all individual docs Stand alone usage/configurationOn the other hand, if I'd separate the tasks as libraries and enable stand alone usage, it will be necessary to individually configure them. An (strongly) opinionated approach could help here as well: Provide as little configuration as necessary to make the tool perform a helpful build (step). Examples:
CompositionsIf a user needed a customized doc build, they could still compile a (Shell) script to call the respective tasks in their project context. Perhaps a general entry point like |
Beta Was this translation helpful? Give feedback.
-
The groovy config has some advantages, because it is dynamic. It allows me
to read environment variables and other nice things.
The result however is just a map.
We could add a feature to read a yaml or json config as map. This would be
10 lines of code.
Do json and yaml have comments? Because this is also an important feature...
… Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
I think we have a different point of view on this topic. Let's take a step back to discuss what docToolchain is. Quoting from docToolchain homepage
Currently, the interface supported by docToolchain are shell scripts: Note: the use of Gradle under the hood is an implementation detail. docToolchain is vendoring all components, including Gradle. Unfortunately, this implementation detail leaks to the user and irritates people who already use a build system like Gradle/Maven. And I can understand that an engineer doesn't want to install the same tooling, in different versions, twice. Now we have to discuss the current implementation of those "set of scripts" (tasks) do:
Appart from a few tasks most of the functionanlities of a task are based on Gradle features. If you "rip out" the part of the code of a task which would not depend on Gradle there is noting left, because Gradle is used to "drive the scripts". But let's assume for a moment we could achieve the goal as you suggested, separating the single tool which could be called by orchestrators.
To put this to test: pick the core task I lack the know-how (and the time) to achieve this.
What about build systems other than Java? I haven't worked with Java since 10 years, and I still need documentation for the systems I design. I can understand that people coming from a Java world are irritated to have "another Gradle" installed by docToolchain.
I could not see why the current docToolchain can't be used by CI/CD systems. Use the Docker container and call
Once again: you already can do that.
I understand what you mean. Please provide a prototype of this thin layer, so we could discuss this further.
I fully agree with you and this was already mentioned in my comment
This means docToolchain would provide an opinionated structure (like for example Maven is doing).
Task dependencies is a different aspect and I would like to separate this from the "simplify configuration" feature. In an ideal world docToolchain should know in which order the tasks have to be executed. At the moment I see this low prio, since we can do it manually.
This makes only sense to discuss if we have a proto-type with a possible interface (technology) as mentioned above.
Dito: this makes only sense to discuss if we have a proto-type with a possible interface (technology) as mentioned above. |
Beta Was this translation helpful? Give feedback.
-
Regarding the small layer and difference between groovy and gradle: the two confluence tasks are a good example. They can be used stand-alone when you add some grab/grape annotations to fetch dependencies. I would like to check if we could wrap them in an if-statement. The asciidocbasic.gradle script currently heavily depends on gradle and the plugins. |
Beta Was this translation helpful? Give feedback.
-
Some people created a small Proof-of-Concept how to migrate away from Gradle scripts towards a class based implementation: #1208 . |
Beta Was this translation helpful? Give feedback.
-
That all sounds great! 🥳 |
Beta Was this translation helpful? Give feedback.
-
First ADR drafted in #1243 Please keep the discussion ongoing and feel free to review :) |
Beta Was this translation helpful? Give feedback.
-
I would like to take the ADR even one step further. We do not use the Gradle features anymore. Even the dependency resolving mechanism is a pain for some types of installation. I guess there are better ways to go. In addition, Gradle startup time is slow and Gradle needs lot of resources. Let's try to avoid Gradle altogether. There is already one small task which shows a different path: https://github.com/docToolchain/docToolchain/blob/ng/bin/doctoolchain#L39 the Gradle wrapper calls bin/doctoolchain as last action and we can divert tasks away from Gradle at this point. We could even create a configurable switch to enable a soft launch |
Beta Was this translation helpful? Give feedback.
-
Hello fellow Documentarians!
We would like to start the work on the next major release of docToolchain and ask for your input and feedback.
The big feature of V2.0 was the docToolchain-Wrapper. It moved all the code out of sight. The main goal was to have only your documents within your repository and all the scipts, HTML templates etc. somewhere else - in a docker container or in an install folder within your home folder.
The idea for V3.0 is to make this approach more modular, flexible and faster. Here are the main thoughts:
Problems identified
slow startup of Gradle
Gradle helped us to get started and it is a great build tool. But docToolchain doesn't use it as build tool anymore. It is mainly used for dependency management for Java based dependencies. The downside of Gradle is that it need quite long to start up.
every thing Java
Through Gradle, docToolchain tasks are mainly Java or Groovy tasks. But we already have lots of tasks which make use of other scripting language like
exportEA
. It would be great if tasks could be written in whatever technology best fitsSolutions
dtcw
should take care of the dependencies of those tasks. Even for runtime environments. So if a tasks needs, let's say python, thendtcw
should go and fetch a python environmentBeta Was this translation helpful? Give feedback.
All reactions