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

improve error message on circular build error #5293

Closed
vicuna opened this issue Jun 17, 2011 · 4 comments
Closed

improve error message on circular build error #5293

vicuna opened this issue Jun 17, 2011 · 4 comments

Comments

@vicuna
Copy link

vicuna commented Jun 17, 2011

Original bug ID: 5293
Reporter: art1
Status: resolved (set by @damiendoligez on 2017-03-03T14:48:55Z)
Resolution: suspended
Priority: normal
Severity: feature
Target version: later
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Tags: junior_job
Monitored by: @jberdine

Bug description

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.

@vicuna
Copy link
Author

vicuna commented Aug 4, 2011

Comment author: @damiendoligez

What do you call a circular build? Are you talking about the compiler or about the ocamlbuild tool?

@vicuna
Copy link
Author

vicuna commented Aug 5, 2011

Comment author: art1

A very simple example: Module foo.ml:

let foo () = 1;;
let bar () = Foo.foo ();;

Ocamlbuild means:
ocamlbuild foo.native
Circular build detected (foo.cmx already seen in [ foo.cmx;
foo.native ])
Compilation unsuccessful after building 3 targets (0 cached) in
00:00:00.

Hope, this helps... :)

Bye Andreas

@vicuna
Copy link
Author

vicuna commented Jul 28, 2013

Comment author: @gasche

In my experience, making the mistake of using prefixing something with Foo inside foo.ml is rather common (eg. you're adding a function in list.ml and, out of habit, call List.map instead of map). I think the error message for circular build could be improved at least in that very specialized use-case.

@vicuna
Copy link
Author

vicuna commented Mar 3, 2017

Comment author: @damiendoligez

ocamlbuild is now a separate project that lives on GitHub.
PR transferred to ocaml/ocamlbuild#215

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

1 participant