You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 3190 Reporter: administrator Status: acknowledged Resolution: open Priority: normal Severity: feature Category: tools (ocaml{lex,yacc,dep,debug,...}) Related to:#5000 Monitored by: nogin
Bug description
Full_Name: Aleksey Nogin
Version: 3.08.1 and CVS
OS: Fedora Core Linux
Submission from: charter-242-009.caltech.edu (131.215.242.9)
Currently, if ocamldep finds an .ml file, but no .mli file while resolving
dependencies, then ocamldep tries to do a make-compatible workaround.
E.g., if files x.ml and x.mli contain "open Y", and only y.ml is present, then
ocamldep will generate:
x.cmi: y.cmo
x.cmo: y.cmo
x.cmx: y.cmx
and "ocamldep -native" will generate
x.cmi: y.cmx
x.cmo: y.cmx
x.cmx: y.cmx
This is all fine in case of a build tool that is only paying attention to
timestamps (as make does). However, in case of a build tool (such as omake)
that:
a) uses checksums to figure out when dependencies change and files need to be
rebuilt,
b) knows that compiling an .ml may produce a .cmi (if no .mli exists),
the current ocamldep behaviour turns out to be suboptimal and even dangerous.
If the y.ml file changes in a way that y.cmo/.cmx change, but the types and
y.cmi remain the same, then the way ocamldep currently generates dependencies,
the x.cmi and x.cmo would end up being rebuilt for no good reason. What's worse,
if somehow a change in types affects the y.cmi, but y.cmo and/or y.cmx remain
unchanged, then the x.cm* files might end up not being rebuilt when they should
be.
In short, I would like to request that an option be added to ocamldep (not sure
what a good name for it would be - may be "-natural"?) to generate the "natural"
dependencies even when only the .ml file is present.
E.g. in the example above, "ocamldep -natural" would generate
x.cmi: y.cmi
x.cmo: y.cmi
x.cmx: y.cmi y.cmx
The text was updated successfully, but these errors were encountered:
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.
Original bug ID: 3190
Reporter: administrator
Status: acknowledged
Resolution: open
Priority: normal
Severity: feature
Category: tools (ocaml{lex,yacc,dep,debug,...})
Related to: #5000
Monitored by: nogin
Bug description
Full_Name: Aleksey Nogin
Version: 3.08.1 and CVS
OS: Fedora Core Linux
Submission from: charter-242-009.caltech.edu (131.215.242.9)
Currently, if ocamldep finds an .ml file, but no .mli file while resolving
dependencies, then ocamldep tries to do a make-compatible workaround.
E.g., if files x.ml and x.mli contain "open Y", and only y.ml is present, then
ocamldep will generate:
x.cmi: y.cmo
x.cmo: y.cmo
x.cmx: y.cmx
and "ocamldep -native" will generate
x.cmi: y.cmx
x.cmo: y.cmx
x.cmx: y.cmx
This is all fine in case of a build tool that is only paying attention to
timestamps (as make does). However, in case of a build tool (such as omake)
that:
a) uses checksums to figure out when dependencies change and files need to be
rebuilt,
b) knows that compiling an .ml may produce a .cmi (if no .mli exists),
the current ocamldep behaviour turns out to be suboptimal and even dangerous.
If the y.ml file changes in a way that y.cmo/.cmx change, but the types and
y.cmi remain the same, then the way ocamldep currently generates dependencies,
the x.cmi and x.cmo would end up being rebuilt for no good reason. What's worse,
if somehow a change in types affects the y.cmi, but y.cmo and/or y.cmx remain
unchanged, then the x.cm* files might end up not being rebuilt when they should
be.
In short, I would like to request that an option be added to ocamldep (not sure
what a good name for it would be - may be "-natural"?) to generate the "natural"
dependencies even when only the .ml file is present.
E.g. in the example above, "ocamldep -natural" would generate
x.cmi: y.cmi
x.cmo: y.cmi
x.cmx: y.cmi y.cmx
The text was updated successfully, but these errors were encountered: