Suppose I have a dune project with such a basic structure:
dune-project src/ dune main.ml lib/ dune myFile.ml
If I have a different version of
main.ml) in-memory only, I want to use dune to compile that version of the file and get the compilation output for errors or warnings.
is one of this possible?:
- can I ask dune to compile that edited source code from stdin and get the compilation output ? (ideal scenario)
- can I save the file to a temp directory and ask dune to build just that file from a project directory ?
- If not possible can I ask dune for some compilation flags and use ocamlc to do the compilation ?
context: this is for editor integration. I don’t use LSP/merlin.