Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPR#5293: improve error message on circular build error #215

Open
damiendoligez opened this issue Mar 3, 2017 · 3 comments
Open

MPR#5293: improve error message on circular build error #215

damiendoligez opened this issue Mar 3, 2017 · 3 comments

Comments

@damiendoligez
Copy link
Member

PR transferred from https://caml.inria.fr/mantis/view.php?id=5293
[original reporter: art1]

Hello,

the actual behaviour is not very helpful. If the compiler detects circular builds, it will be very hard to find out, what is the reason for this. It would be more helpful if the compiler reports the lines in the involved modules. Very very helpful would be if the compiler also reports a more detailled explanation and give hints for resolving such conflicts.

@gasche
Copy link
Member

gasche commented Mar 3, 2017

We improved the printing of cycles in #44 already, but this PR was actually suggesting a hint in the specific case of module self-reference, where you mistakenly write Foo.bar within foo.ml itself. I still think it would make a lot of sense to special-case this situation and provide a more friendly hint than just showing the self-reference cycle.

@whitequark
Copy link
Member

Shouldn't this be fixed in ocamlc rather than ocamlbuild?

@gasche
Copy link
Member

gasche commented Mar 3, 2017

The error message is produced by ocamlbuild, which asks ocamldep for dependencies and complains that there is a cycle; I don't think that ocamlc is invoked on foo.ml at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants