Skip to content

ocamldep: add a robust mode #8625

@ghost

Description

ocamldep has a tendency to silently do nothing in case of errors. For instance:

$ ls toto.ml
ls: cannot access toto.ml: No such file or directory
$ ocamldep toto.ml
$ echo $?
0

I'm guessing that this behaviour was designed for use in makefiles. However, it tends to delay errors and make debugging build errors harder. I propose to add a -robust option to ocamldep so that it fails with an exit code of 1 when the input file doesn't exist or cannot be read or parsed.

/cc @sliquister

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions