Skip to content

Make locations (of error messages) more accurate #64

@shindere

Description

@shindere

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions