| Anonymous | Login | Signup for a new account | 2013-06-19 21:56 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 | |||||||
| 0003028 | OCaml | OCaml general | public | 2004-08-01 03:45 | 2012-01-30 15:36 | |||||||
| Reporter | administrator | |||||||||||
| Assigned To | ||||||||||||
| Priority | normal | Severity | feature | Reproducibility | always | |||||||
| Status | resolved | Resolution | won't fix | |||||||||
| Platform | OS | OS Version | ||||||||||
| Product Version | ||||||||||||
| Target Version | Fixed in Version | |||||||||||
| Summary | 0003028: Two small error text glitches involving -pack | |||||||||||
| Description | Hi! I'm playing around with making a new build tool, and I just noticed an inconsistency working with the -pack option. When you compile a .ml file that has a .mli but not yet a .cmi, you get the following message: $ ocamlc -c test1.ml File "test1.ml", line 1, characters -1--1: Could not find the .cmi file for interface test1.mli. When you try to pack a new .cmo or .cmx with a .mli but not yet a .cmi, you get the following message: I/O error: test2.cmi: No such file or directory It all comes down to the same thing, really, but it might be worth making the error from -pack consistent with at least line two of the -c output. The other minor reporting problem is if you combing -pack with -i and a .ml file. In this circumstance, you get the confusing output: $ ocamlc -i -pack -o test2.cmo test1.ml val a : int Please specify the name of the output file, using option -o It would be really really nice if this combination instead produced: module Test1 : sig val a : int end (I'm currently thinking about producing intermediate .mli files for both ocamlc -c and ocamlc -pack actions in order to simplify things a bit.) But barring that, reporting that -pack and -i conflict might be a good idea. (It *does* work if you give it .cmo files, but only because -i does nothing when given .cmo files.) Oh--and as for why I think I want to produce .mli files automatically for -pack targets: they're needed to use ocamldep to produce any dependency information at all for such targets, since ocamldep does not report on modules it can't find a source for in its -I search path. It still might not be quite satisfactory, I have to think about it a bit more: but I really don't want to have to either re-implement ocamldep internally or use a camlp4 hack for this. We'll see. Here are the test files to reproduce: -- test1.ml let a = 1 -- test1.mli val a : int -- test2.ml module Test1 : sig val a : int end $ ocamlc -c test1.ml File "test1.ml", line 1, characters -1--1: Could not find the .cmi file for interface test1.mli. $ ocamlc -c test1.mli $ ocamlc -c test1.ml $ ocamlc -pack -o test2.cmo test1.cmo I/O error: test2.cmi: No such file or directory | |||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
Notes |
|
|
(0000230) administrator (administrator) 2005-01-12 18:01 |
Thanks for your bug report, > When you try to pack a new .cmo or .cmx with a .mli but not yet a > .cmi, you get the following message: > > I/O error: test2.cmi: No such file or directory I have fixed this in the CVS version. > The other minor reporting problem is if you combing -pack with -i and > a .ml file. In this circumstance, you get the confusing output: > [...] > > It would be really really nice if this combination instead produced: > > module Test1 : sig > val a : int > end I will file this as a feature wish, as it's not so obvious to implement. -- Damien |
|
(0000231) administrator (administrator) 2005-01-12 18:02 |
Error message : done 2005-01-12 DD Feature wish: ocamlc -i -pack |
|
(0006843) doligez (manager) 2012-01-30 15:36 |
As of 3.12.0, options -i and -pack are incompatible and using both will trigger an error. I don't think it is possible to implement -i with -pack because -pack accepts .cmo files and the types cannot be recovered from these. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2005-11-18 10:13 | administrator | New Issue | |
| 2012-01-30 15:36 | doligez | Note Added: 0006843 | |
| 2012-01-30 15:36 | doligez | Status | acknowledged => resolved |
| 2012-01-30 15:36 | doligez | Resolution | open => won't fix |
| 2012-01-30 15:36 | doligez | Description Updated | View Revisions |
| Copyright © 2000 - 2011 MantisBT Group |