Ticket #1080 (new defect)
Opened 22 months ago
require is half case sensitive, half case insensitive, which leads to duplicate loading of modules.
|Reported by:||pjb@…||Owned by:|
|Component:||ANSI CL Compliance||Version:||trunk|
If we do:
;; fresh image (require "cocoa") (require 'cocoa)
it works fine, but if we do:
;; fresh image (require 'cocoa) (require "cocoa")
the module is loaded twice, which fails.
The problem is that in ccl::find-module-pathnames, string-downcase is used to build the pathname of the module, but when testing for the presence of module in *module*, string= is used.
CLHS says: "Both functions (require and provide) use string= to test for the presence of a module-name." So module names are case sensitive, and as string designators, one cannot use 'cocoa or :cocoa to designate a module named "cocoa".
So, just use STRING instead of STRING-DOWNCASE in FIND-MODULE-PATHNAME, and check that the found file name has the same case to detect the potential problem in case insensitive file systems (loading a module with a different case). Perhaps truename can be used to check the case, since it returns the path with the true case. (This is what clisp does).