Use of automatically generated mode transition diagrams #28304
Replies: 2 comments 3 replies
-
This feels like a solution looking for a problem to me. I personally don't think that diagram is that useful as user documentation, and I'm pretty sure we can't use images in our documentation as most terminals don't support that (and neither does neovim as I understand it). As for the testing: it's very interesting personally as I haven't heard about this methodology. I am curious though if the current testing suite doesn't pretty much already ensure conformance though? What would be the benefit of this that isn't covered by the current testing implementation? Does the benefits outweigh the costs of implementing and maintaining the diagram? |
Beta Was this translation helpful? Give feedback.
-
Fair enough, let's forget about user documentation and focus on testing. As evidence of "what this brings to the table" let me mention several previous issues that have been reported and fixed thanks to the automatically generated diagrams. The issues were not covered by tests. |
Beta Was this translation helpful? Give feedback.
-
I've experienced with the automated generation of diagrams showing how keys
transition between modes (insert, normal,…). To sum up, it is possible to
generate this kind of diagram with no manual intervention.
An obvious use case for such diagrams is user documentation, but I think it has
even more potential for developers. As a matter of fact, such diagrams can be
used for conformance testing as follows: given a diagram and a Neovim binary we run
tests (thousands of them) to ensure that the Neovim binary complies with the
behavior specified by the diagram. There are already implementations out there
that carry out conformance testing by generating and running the tests arising
from a diagram. Such testing strategy could be used, for instance, between
major releases of the editor.
I presented the automated generation of such diagrams at the SPIN
conference.
Now, I would like feedback from the community to gauge potential interest.
Beta Was this translation helpful? Give feedback.
All reactions