-
Notifications
You must be signed in to change notification settings - Fork 20
Description
At the moment, when a generated file does not compile, the file
name which is printed to locate the error is the one of the generated
file, rather than the name of the source file from which the file
to be compiled has been generated from.
This is even more misleading given that the generated files do
not contain comments making it clear that they are generated and frowhich
source file.
These problems should be addressed by adding as first lines of foo.ml.in
something like:
(* @configure_input@ *)
#3 "foo.ml.in"
For this to also work with the stdcompatpp preprocessor, this tool should
be able to handle the @configure_input@ token, which in turn means it
needs to know which file it is reading and to which file it is writing. This
suggests that, rather than reading from its standard input and writing to
its standard output, the tool could for instance take the input and output
file names as its comomand-line arguments, which will result in
slightly simpler Dune rules.