You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compared to some other open issues, this one should be easy.
ocamlbuild should say
Entering directory `/foo/bar/baz'
and
Leaving directory `/foo/bar/baz'
just like gmake does. This is not just a frill, which would be very out of character for a Unix family developer tool. It exists (or so I think) to help emacs [1] locate files mentioned in error messages, to enable making them into hyperlinks. Without this trick, when one wants to start a compile process, there are two choices:
Always make sure emacs current directory is the top project directory. This usually means opening a file in this directory, or switching to a buffer where such a file is already open.
Just start it, and after you click on an error message deal with the annoying prompt "Locate this error in: " or something like that. And you have to deal with it every time you click, emacs doesn't remember the relation between its current directory and the one you answered.
I got so sick of this today that I put together this [2] shell hack. It really shouldn't be necessary.
[1]
And maybe vi too, but I never start builds from vi, or edit Ocaml with it for that matter.
I was not aware that Emacs was using this to set the reference working directory. This is related to #218. The hack you propose is irritating because I don't think it is standard among builder (that solves the problem for Emacs users, but what about the others?) -- I have no strong opinion on integrating it or letting you use your own script for it. The feature of #218, or an automated way to find the root project as done in your script (and as eg. Merlin does), could maybe be combined with improvements in ocaml-distribution tooling, such as the ability to pass a directory prefix to add to Location.filename when reporting error messages. (There is the subtlety that ocamlbuild runs actually happen in a _build/ copy of the project path tree, and you want to direct the users to the source file, not its build copy, so just asking ocamlc to give absolute paths would not be good enough.)
Compared to some other open issues, this one should be easy.
ocamlbuild
should sayand
just like
gmake
does. This is not just a frill, which would be very out of character for a Unix family developer tool. It exists (or so I think) to helpemacs
[1] locate files mentioned in error messages, to enable making them into hyperlinks. Without this trick, when one wants to start a compile process, there are two choices:Always make sure
emacs
current directory is the top project directory. This usually means opening a file in this directory, or switching to a buffer where such a file is already open.Just start it, and after you click on an error message deal with the annoying prompt "Locate this error in: " or something like that. And you have to deal with it every time you click,
emacs
doesn't remember the relation between its current directory and the one you answered.I got so sick of this today that I put together this [2] shell hack. It really shouldn't be necessary.
[1]
And maybe vi too, but I never start builds from vi, or edit Ocaml with it for that matter.
[2]
Gist
The text was updated successfully, but these errors were encountered: