| Anonymous | Login | Signup for a new account | 2013-05-22 04:40 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 | |||
| 0005738 | OCaml | OCaml tools (ocaml{lex,yacc,dep,browser}) | public | 2012-08-25 09:45 | 2012-08-25 13:37 | |||
| Reporter | hongboz | |||||||
| Assigned To | garrigue | |||||||
| Priority | normal | Severity | major | Reproducibility | have not tried | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | ||||||||
| Target Version | Fixed in Version | 4.00.1+dev | ||||||
| Summary | 0005738: ocamldep is broken (especially when you use first class module) | |||||||
| Description | let f (module A : B) = A.v ;; will generate dependency on module A, actually not. If you happens to have a file A.ml(very likely), it will tries to compile module A. Reading the mantis quite a bit, I found this is a long existing problem. Things become worse if you use first class modules a lot. Is there solutions to work around such problem? I set the severity to be major, because it nearly breaks all my existing repos when I switched to first class modules. Many thanks | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0007979) garrigue (manager) 2012-08-25 11:57 |
Fixed in trunk and 4.00, revisions 12878 and 12879. |
|
(0007980) lefessan (developer) 2012-08-25 12:20 edited on: 2012-08-25 12:22 |
Are you sure it is fixed ? Compiling latest SVN does not solve the problem for me: $ touch a.ml $ touch d.ml $ cat > c.ml module type B = sig val x : int end let f (module A : B) = A.x module X = struct let x = 4 end;; let (module D : B) = (module X : B ) in D.x;; $ ocamlc -c c.ml (works, no dependency on a.ml and d.ml) $ ocamldep c.ml c.cmo : d.cmo a.cmo c.cmx : d.cmx a.cmx (dependencies are still there) |
|
(0007981) lefessan (developer) 2012-08-25 12:22 |
Jacques, could you check if it is fixed, and maybe try my patch that I was about to submit (attached to the bug report). |
|
(0007982) garrigue (manager) 2012-08-25 13:07 |
Sorry, I got confused by Ppat_type :-) Fixed properly now, almost using Fabrice's code. |
|
(0007983) lefessan (developer) 2012-08-25 13:27 |
and add_bindings recf bv pel = let bv' = List.fold_left (fun bv (p, _) -> add_pattern bv p) bv pel in >> let bv = if recf = Recursive then bv else bv' in List.iter (fun (_, e) -> add_expr bv e) pel; bv' Isn't it let bv = if recf = Recursive then bv' else bv in instead ? |
|
(0007984) garrigue (manager) 2012-08-25 13:37 |
Sorry, I'm too sleepy today. I should have reused your code for this part. By the way, the use of a mutable variable for patterns is intentional: the module only comes in scope after processing the whole pattern. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-08-25 09:45 | hongboz | New Issue | |
| 2012-08-25 11:57 | garrigue | Note Added: 0007979 | |
| 2012-08-25 11:57 | garrigue | Status | new => closed |
| 2012-08-25 11:57 | garrigue | Assigned To | => garrigue |
| 2012-08-25 11:57 | garrigue | Resolution | open => fixed |
| 2012-08-25 11:57 | garrigue | Fixed in Version | => 4.00.1+dev |
| 2012-08-25 12:20 | lefessan | Note Added: 0007980 | |
| 2012-08-25 12:20 | lefessan | Status | closed => feedback |
| 2012-08-25 12:20 | lefessan | Resolution | fixed => reopened |
| 2012-08-25 12:21 | lefessan | File Added: patch-5738.txt | |
| 2012-08-25 12:22 | lefessan | Note Added: 0007981 | |
| 2012-08-25 12:22 | lefessan | Note Edited: 0007980 | View Revisions |
| 2012-08-25 13:07 | garrigue | Note Added: 0007982 | |
| 2012-08-25 13:07 | garrigue | Status | feedback => closed |
| 2012-08-25 13:07 | garrigue | Resolution | reopened => fixed |
| 2012-08-25 13:27 | lefessan | Note Added: 0007983 | |
| 2012-08-25 13:27 | lefessan | Status | closed => feedback |
| 2012-08-25 13:27 | lefessan | Resolution | fixed => reopened |
| 2012-08-25 13:37 | garrigue | Note Added: 0007984 | |
| 2012-08-25 13:37 | garrigue | Status | feedback => closed |
| 2012-08-25 13:37 | garrigue | Resolution | reopened => fixed |
| Copyright © 2000 - 2011 MantisBT Group |