Hi Robert,
I’m away from my desk, so can’t check, but If I recall correctly there are name canonicalization functions that downcase. I don’t know if these are only applied when a system designator is a symbol or to strings as well.
The underscores would be an issue if the system name was merged with a logical pathname, if a logical pathname was part of the ASDF configuration. In that case, some lisp implementations would reject the resulting pathname as illegal. Some might be more permissive. I have had experiences with path names that work on allegro and not on SBCL.
CL-JSON replaces underscores with 2 hyphens, perhaps you could do something similar and double letters to indicate caps. You could provide some translation of system names to file names like that if you wanted to permit non standard system names.
Of course, you would have to ensure that anyone using one of these systems would also have loaded the extension that found it properly. Honestly, this seems a lot more trouble than it’s worth: the name restrictions aren’t that onerous.
On Sep 14, 2024 at 23:50:11 CDT, Robert Dodier robert.dodier@gmail.com wrote:
On Sat, Sep 14, 2024 at 8:45 PM Faré fahree@gmail.com wrote:
If you're using logical pathnames, you're asking for trouble (especially on SBCL). I wasted weeks of my life on logical pathnames, and STRONGLY recommend that no one should ever use them anymore under any circumstances.
Just to be clear, I don't *want* to use logical pathnames, but I will if it provides a solution to the problem.
If you're not, there should be no problem having a system called Foo_Bar, is there?
Just make sure you use a (defsystem |Foo_Bar| ...) with the same case, no?
I dunno, that doesn't seem to work ... I tried this in SBCL which has ASDF 3.3.something bundled.
(asdf:load-system "Foo_Bar")
provokes a warning: "WARNING: System definition file #P"/home/dodier/tmp/Foo_Bar.asd" contains definition for system "foo_bar". Please only define "Foo_Bar" and secondary systems with a name starting with "Foo_Bar/" (e.g. "Foo_Bar/test") in that file.
and an error: Component "Foo_Bar" not found
Anyway, the documentation says (https://asdf.common-lisp.dev/asdf.html#rule_002dsystem_002ddesignator) that "Foo_Bar" is an unacceptable name since it has both an underscore and uppercase letters.
I find that (defsystem baz_quux ...) in a file named "baz_quux.asd" is loaded successfully without complaint -- I'm surprised that works; I guess the no underscores rule is not actually enforced?
I guess the stated rules about simple component names are not actually enforced by the DEFSYSTEM macro itself ... the do-nothing system
* (asdf:defsystem "Blurf_Mumble") * (asdf:operate 'asdf:load-op *)
succeeds. I guess the stuff about string case only comes into play when the file system gets involved?
FWIW & all the best.
Robert
On Sun, Sep 15, 2024 at 3:42 PM Robert P. Goldman rpgoldman@sift.net wrote:
I’m away from my desk, so can’t check, but If I recall correctly there are name canonicalization functions that downcase. I don’t know if these are only applied when a system designator is a symbol or to strings as well.
I looked at the code (ASDF 3.3.7.1). Downcasing is applied only if the path to the .asd is a logical pathname. So when there are no logical pathnames in sight, there is no downcasing.
The underscores would be an issue if the system name was merged with a logical pathname, if a logical pathname was part of the ASDF configuration. In that case, some lisp implementations would reject the resulting pathname as illegal.
OK by me. If I avoid logical pathnames, I won't encounter that.
Honestly, this seems a lot more trouble than it’s worth: the name restrictions aren’t that onerous.
As I said at the outset, I'm working with other peoples' projects, and I'm not at liberty to change the names of them.
Robert