Modules and class oddities (Was: [plt-scheme] Dialog% not accepting frame% subclasses as parent?)

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Oct 18 16:40:58 EDT 2002

At Fri, 18 Oct 2002 08:40:51 -0600 (MDT), Matthew Flatt wrote:
> I must be missing something basic. Can you send me code that I can run?

Erich sent me code...

The problem was

  (require (lib "mred.ss" "MrEd"))

on a case-insensitive filesystem. The result is that the "mred.ss"
module was loaded an extra time, once with a path containing "MrEd"
instead of "mred".

This is really a problem with way that module names and filenames are
connected. When distinct paths (e.g., different cases) arrive at the
same file, the different paths generate different modules. This is
particularly a problem if the programmer doesn't think of the paths as
being different (as in this case).

A closely related problem is that MzScheme's `normal-path-case' is
broken. It's platform-specific when it should be filesystem-specific.
Arguably it shouldn't exist at all, and anything that relies on path
normalization should be reconsidered.

Matthew



Posted on the users mailing list.