ocaml-omake / omake

The new home of OMake - docs, downloads, mailing list etc. see:
http://projects.camlcity.org/projects/omake.html
GNU General Public License v2.0
66 stars 25 forks source link

Mangled line numbers in errors when using vmount #18

Open rgrinberg opened 8 years ago

rgrinberg commented 8 years ago

I'm using the very useful tip here to simulate a build output directory like ocamlbuild: http://www.camlcity.org/knowledge/kb_001_omake_recipes.html#objs-in-subdirs

But this tip has one drawback. Whenever compilation fails, say, due to a type error, the error file path reported is mangled. I.e. it points back to the build artifact in _build/ for example. It would be great if there was a way to make sure the error reported on the original file.

gerdstolpmann commented 8 years ago

I've no idea how to improve this (I guess it is important for getting tool support right, like hopping from error to error in emacs). You would have to emit "#" directives for ml/mli files, and this means the files are copied and a "#" directive is put in front instead of simply symlinking them, but this modifies the digests omake is using to control the builds.

I'd have to look up the details to check whether this is possible or not.

Drup commented 8 years ago

fwiw, in ocamlbuild, it's done in a much simpler way, simply change directory to _build. The path returned by ocaml are relatives to $(PWD) ...