If I write a new parser generator:
- I don’t want to have to send an upstream PR to implement support in Dune. (This is too early, I don’t know if my project will work out.)
- I certainly don’t want to ask that my project be added as an incubated tool in the OCaml Platform. (At this point there is only one user, me.)
- I still would like prospective adopters to be able to give my tool a try without having to copy-paste obscure rules for each invocation of the tool in their project.
I’m aware of discussions to implement a plug-in system in Dune to solve this specifically.
Indeed, I participated to a retreat to discuss this topic in autumn 2017. To my knowledge nothing has been done since.
Note that I am not trying to suggest that solving this problem should be specifically the responsibility of dune. The “principles” document does not mention any one tool specifically, and some of its design principles are not currently a reality, they are more forward looking. You propose the principles that tools should be “unified”, and I point out a difficulty that I see with going in this direction: there seems to be a tension between “existing tools are unified” and “it is easy to integrate new tools in my development environment”. I think this may be worth thinking about in principle, independently of dune.
I’m not sure what you have in mind by “auto-discovering” tools.
Suppose I am implementing a new linter for OCaml code. If the platform vision is that all tools should be usable directly from vscode without going through the command-line, I would like to be able to use the same approach with my linter, instead of feeling like a second-class citizen all the time. Is there some metadata that I can add to a given project to enable an option to run my linter in the GUI? (Again, this might be solved using dune, but the question is not dune-specific.) This is what I have in mind as auto-discovery: future tools, that are not part of the platform and probably never will be, have a way to become integrated in the development experience by declaring themselves (somehow).