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

ocamldep does not take included module types into account. #5870

Closed
vicuna opened this issue Jan 2, 2013 · 3 comments
Closed

ocamldep does not take included module types into account. #5870

vicuna opened this issue Jan 2, 2013 · 3 comments

Comments

@vicuna
Copy link

vicuna commented Jan 2, 2013

Original bug ID: 5870
Reporter: jm
Assigned to: @alainfrisch
Status: resolved (set by @alainfrisch on 2013-01-02T16:08:24Z)
Resolution: suspended
Priority: high
Severity: major
Version: 4.00.1
Category: tools (ocaml{lex,yacc,dep,debug,...})
Related to: #7470

Bug description

% head -n -0 *.ml
==> a.ml <==

==> t.ml <==
module type M
= sig
module A
: sig
type t
end
end
module type MM
= sig
include M
val a : A.t
end
% ocamlc -i t.ml
module type M = sig module A : sig type t end end
module type MM = sig module A : sig type t end val a : A.t end
% ocamldep t.ml
t.cmo : a.cmo
t.cmx : a.cmx

This dependency on a.cm[ox] should not be.

@vicuna
Copy link
Author

vicuna commented Jan 2, 2013

Comment author: @bobzhang

I also hope that ocamldep can go a bit into the typing level to guarantee its correctness

@vicuna
Copy link
Author

vicuna commented Jan 2, 2013

Comment author: jm

see also: #5624

@vicuna
Copy link
Author

vicuna commented Jan 2, 2013

Comment author: @alainfrisch

This is not really related to #5624, which gives a case where ocamldep failed to report real dependencies. It is rather similar to #4081, and this is a well-known class of limitations of ocamldep.

ocamldep is a very syntactic tool. One could indeed argue that it could do some kind of downgraded type-checking to address simple cases like the one provided here, but it is not clear where to stop and it would be difficult to provide a clear specification of what is done.

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

2 participants