ocamlbuild icon indicating copy to clipboard operation
ocamlbuild copied to clipboard

Textual description of error cases

Open klartext opened this issue 8 years ago • 6 comments

Hello, error-numbers don't say anything useful.

I got this err-msg: E: Failure("Command ''/usr/bin/ocamlbuild' src/libcryptokit_stubs.a src/dllcryptokit_stubs.so src/cryptokit.cma src/cryptokit.cmxa src/cryptokit.a src/cryptokit.cmxs -tag debug' terminated with error code 10")

Error code 10?

Its not saying anything useful. It's not described in the manpage. And it seems, not described anywhere else.

So, please add clear-text / human-readable / human-undersandable error messages.

klartext avatar Nov 01 '16 19:11 klartext

Hi @klartext,

OCamlbuild should in principle print a more detailed explanation of what went wrong, and only then exit with a specific error code. This means that there should exist a human-oriented explanation of what went wrong somewhere, for example in the _build/_log file or somewhere above in your error output. Note that the final Failure("....") message that you are seeing was not, if I understand correctly, printed by ocamlbuild itself, but by the tool that called ocamlbuild (that would be OASIS, I would guess).

On the other hand, you are completely correct that having ocamlbuild error codes listed and explained in the manual or man page would be very useful. Would you interested in submitting a pull request to do this? The manpage is located in man/ocamlbuild.1, the manual is manual/manual.adoc, and the error-codes are listed in src/exit_codes.ml, but you might have, for some of them, to look at their usage in the source to understand what they are for.

gasche avatar Nov 01 '16 21:11 gasche

Hello @gasche, isnt' it possible to get the ocamlbuild-documentationfrom former OCaml-documentation? In OCaml 4.02, ocamlbuild was documented in the refman.

klartext avatar Nov 04 '16 18:11 klartext

Sure, you may find old versions of the manual online, for example:

http://caml.inria.fr/pub/docs/manual-ocaml-4.02/ocamlbuild.html

Please let me know if you find anything in that documentation that is missing from the new manual (or, better, send a pull request to add the informations!).

gasche avatar Nov 04 '16 18:11 gasche

Ah pull-requests... the (in my eyes) messy handling. Is there a way to make Pull-requests completely woithout web-gui, just with cli.tools?

klartext avatar Nov 04 '16 18:11 klartext

So for sending patches around,

git format-patch master..featurebranch --stdout > patchname.patch

should create a file with all the information required for easy patchset application on the maintainer side (including git commit messages, etc., it's better than simply a diff), so you can just send it by email. On the other hand, this does not provide an interface for discussing details of the change, which pull-requests let us do. If there is back-and-forth to be expected on a change, I think it's better to look for a way to submit actual pull requests from the command-line, and hub provides that feature, but see that stackoverflow discussion for other choices.

gasche avatar Nov 04 '16 18:11 gasche

@klartext do you think you will have a chance to send your changes, in any form?

whitequark avatar Mar 01 '17 21:03 whitequark