Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toploop does not complain about missing cmi files #2360

Closed
vicuna opened this issue Jan 14, 2000 · 2 comments
Closed

Toploop does not complain about missing cmi files #2360

vicuna opened this issue Jan 14, 2000 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Jan 14, 2000

Original bug ID: 26
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_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).

@vicuna
Copy link
Author

vicuna commented Jan 17, 2000

Comment author: administrator

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

@vicuna
Copy link
Author

vicuna commented Mar 26, 2000

Comment author: administrator

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

@vicuna vicuna closed this as completed Mar 26, 2000
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant