Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000026OCamlOCaml generalpublic2000-01-14 23:312000-03-26 18:11
Reporteradministrator 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000026: Toploop does not complain about missing cmi files
DescriptionFull_Name: Gerd Stolpmann
Version: 2.04
OS: Linux-2.2.13 with glibc-6.1
Submission from: master.proxy.ision.net (195.180.208.40)


If I have a module M as a compilation unit, and a module M' that uses M in the
interface, e.g.

M:
    type t = string
    val f : t -> t

M':
    val g : M.t -> M.t

and if I have a toploop with loaded cmo files of M and M', but
the cmi file of M is missing (not in the search path), I get
misleading error messages:

# g "abc";;
This expression has type string but is here used with type M.t

It would be better if the toploop warns about missing interfaces,
for example at startup for all loaded modules, or after an expression
has been entered (it can simply scan all occurring symbols, here "g",
and check whether all interfaces (direct and indirect) are present).

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000301)
administrator (administrator)
2000-01-17 13:44

> and if I have a toploop with loaded cmo files of M and M', but
> the cmi file of M is missing (not in the search path), I get
> misleading error messages:
>
> # g "abc";;
> This expression has type string but is here used with type M.t

I agree the error message is misleading, and will try to see if we can do
better.

> It would be better if the toploop warns about missing interfaces,
> for example at startup for all loaded modules, or after an expression
> has been entered (it can simply scan all occurring symbols, here "g",
> and check whether all interfaces (direct and indirect) are present).

This looks somehow harder. For instance, there are cases where the .cmi for
a module internal to a library, and not normally visible to the user, is
purposefully not installed.

Best regards,

- Xavier Leroy
(0000302)
administrator (administrator)
2000-03-26 18:11

Fixed as a side-effect of the new, stricter consistency checks in #load (the
user would get an error at #load-time, not at use time). -Xavier, 2000/03/26

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker