| Anonymous | Login | Signup for a new account | 2013-06-18 23:43 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 0005000 | OCaml | OCaml tools (ocaml{lex,yacc,dep,browser}) | public | 2010-03-10 17:09 | 2012-09-17 17:52 | ||||||
| Reporter | goswin | ||||||||||
| Assigned To | |||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||||
| Status | feedback | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | 3.11.2 | ||||||||||
| Target Version | 4.01.0+dev | Fixed in Version | |||||||||
| Summary | 0005000: ocamldep misses dependencies | ||||||||||
| Description | If one has some .mli files but not for all .ml files then oamldep misses dependencies between .cmi files: --- a.ml --- type t = int --- a.mli --- type t = int --- b.ml --- type t = A.t --- c.ml --- type t = B.t % ocamldep *.ml *.mli a.cmo: a.cmi a.cmx: a.cmi b.cmo: a.cmi b.cmx: a.cmx c.cmo: b.cmo c.cmx: b.cmx a.cmi: Adding --- b.mli --- type t = A.t % ocamldep *.ml *.mli a.cmo: a.cmi a.cmx: a.cmi b.cmo: a.cmi b.cmi b.cmx: a.cmx b.cmi c.cmo: b.cmi c.cmx: b.cmx a.cmi: b.cmi: a.cmi In the first case the b.cmi file is generated from b.ml and should have the same dependency (b.cmi: a.cmi) but ocamldep does not output it. As a result if a.mli is modified b.cmi is not rebuild and ocaml gives an error: File "c.ml", line 1, characters 0-1: Error: The files b.cmi and a.cmi make inconsistent assumptions over interface A | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Notes |
|
|
(0005326) xleroy (administrator) 2010-04-18 14:52 |
ocamldep's strategy is the following: if compilation unit B doesn't have a B.mli interface file, clients of B get a dependency on b.cmo instead of b.cmi. This way, dependency-wise, b.cmo acts as a proxy for both b.cmo and b.cmi. Look at the dependencies of c.cmo and c.cmx in your two examples to see this in action. > As a result if a.mli is modified b.cmi is not rebuild and ocaml gives an error I don't see that, because c.cmo depends on b.cmo which depends on a.cmi which depends on a.mli, so b.cmo is rebuilt and b.cmi along with it. Feel free to provdie more details on the problem you actually encountered. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2010-03-10 17:09 | goswin | New Issue | |
| 2010-04-18 14:52 | xleroy | Note Added: 0005326 | |
| 2010-04-18 14:52 | xleroy | Status | new => feedback |
| 2010-07-22 11:53 | ertai | Status | feedback => assigned |
| 2010-07-22 11:53 | ertai | Assigned To | => xclerc |
| 2012-02-02 15:17 | protz | Category | OCamlbuild => OCamlbuild (the tool) |
| 2012-07-10 20:32 | doligez | Target Version | => 4.01.0+dev |
| 2012-07-31 13:36 | doligez | Target Version | 4.01.0+dev => 4.00.1+dev |
| 2012-09-17 17:52 | doligez | Assigned To | xclerc => |
| 2012-09-17 17:52 | doligez | Status | assigned => feedback |
| 2012-09-17 17:52 | doligez | Category | OCamlbuild (the tool) => OCaml tools (ocaml{lex,yacc,dep,browser}) |
| 2012-09-17 17:52 | doligez | Target Version | 4.00.1+dev => 4.01.0+dev |
| Copyright © 2000 - 2011 MantisBT Group |